TaskBoard icon indicating copy to clipboard operation
TaskBoard copied to clipboard

Running TaskBoard on IIS

Open Wraith2 opened this issue 4 years ago • 7 comments

I downloaded taskboard 1.0.2 zip and placed the contents in a subdirectory in my wwwroot served by IIS. I enabled readwrite permissions for the /api subdirectory. Navigated to https://server/tasks and the login page renders. At this point in the browser dev console i can see a POST https://server/tasks/api/login 404 which is probably ok and the login dialog is displayed. So up to here php is working assets are served and the javascript seems ok because it tried to auth and failed forcing me to the login prompt.

To Reproduce at the login page use the default user and pass (admin, admin) and hit the login button, does not login, dev console shows exception trace:

core.js:4197 ERROR TypeError: Cannot read property 'forEach' of undefined
    at n._next (login.component.ts:51)
    at n.value (Subscriber.js:183)
    at n.value (Subscriber.js:122)
    at n.value (Subscriber.js:72)
    at n.value (Subscriber.js:49)
    at n.Zone.__load_patch.e.Subscriber.next (zone-patch-rxjs.js:163)
    at n.value (innerSubscribe.js:42)
    at n.value (innerSubscribe.js:10)
    at n.value (Subscriber.js:49)
    at n.Zone.__load_patch.e.Subscriber.next (zone-patch-rxjs.js:163)

Expected behavior Taskboard works as it would on apache/linux

Please complete the following information:

  • OS: Server windows server 2016 (effectively windows 10 1607), IIS with php and urlrewrite installed and working (running pmwiki in another subdirectory)
  • Browser, Edge chromium version, latest

Additional context Note that htaccess does not work under IIS. Url rewrite is installed and that functions in a similar way but the htaccess files provided contain expressions that the importer doesn't understand.

Can this work? and if so what needs changing?

Wraith2 avatar Nov 29 '20 18:11 Wraith2

Does this wiki page help?

kiswa avatar Nov 30 '20 14:11 kiswa

Unforuntately no. I hadn't found that but i've now started cleanly and followed those instructions where possible and I get the same result. I don't think the vendor download in the article is needed because those (and more) dependencies are already in the package. The first set of rewrite rules for the api subdirectory are ok but the second set with the RewriteBase isn't importable. The current version of taskboard also has a root htaccess which that article does not mention.

I get the same javascript forEach error message in the dev console when trying to use the page.

Wraith2 avatar Nov 30 '20 17:11 Wraith2

Yeah, I should probably go through those steps myself and see if I can set it up in IIS (once I have access to a Windows machine/VM). That page was provided quite a while ago and applied to the pre 1.0 versions.

Would you provide output from the "Network" tab of the dev tools? That might provide some insight on the issue.

kiswa avatar Dec 01 '20 20:12 kiswa

Ok, couldn't find a way to save it as text so screenshot. Capture

the zone call response body is "{ message: "Matching API call not found." }" which seems to indicate that it's the api subdir rules.

Wraith2 avatar Dec 01 '20 21:12 Wraith2

I have the same problem with Windows Server 2019 and PHP 7.4.1.

lucapada avatar Jan 12 '21 20:01 lucapada

I have the same problem with Windows Server 2019 and PHP 7.4.1.

If can help to solve the problem, I configured my server following this video: https://www.youtube.com/watch?v=dTguVd0BKYk Other people used to download php package from http://windows.php.net and then configure it as CGI extension in IIS. I tried to install TaskBoard on XAMPP web server and it works well. So, may this problem depends on the way of php setup in IIS? Thank you so much for this awesome platform and for your work!

lucapada avatar Feb 04 '21 14:02 lucapada

the IIS Setup Procedure from the Wiki tries to import Rules from HTACCESS that are not supported. I just ignored the rewrite for that and it works. The other discrepancy is, that the file to rewrite to in the API folder is named index.php, not api.php. Last, you should pay attention to the rewrite path. I work with subdomains like Taskboard.localhost so the rewrite path has to be shortend accordingly (/api/index.php)

michael1maass avatar Sep 07 '21 21:09 michael1maass