CSPro Web Server on IIS

Discussions about CSEntry
Forum rules
New release: CSPro 8.0
jfigueroa
Posts: 100
Joined: August 28th, 2014, 12:46 pm

Re: CSPro Web Server on IIS

Post by jfigueroa »

Hi dear josh and savy,
Thank you so much for your reply.

I had done what you suggested and the result is the following:
The response when I acces to: http://localhost/cspro-rest-api/api/server is:
CSPro_WS6.JPG
CSPro_WS6.JPG (28.76 KiB) Viewed 8550 times
Error HTTP 404.0 - Not Found
The resource you are looking for has been removed, its name has been renamed or is not available at this time.
CSPro_WS7.JPG
CSPro_WS7.JPG (32.24 KiB) Viewed 8550 times
Detailed error information:
Requested URL -http://localhost:80/cspro-rest-api/api/server-
Physical Path -C:\inetpub\wwwroot\cspro-rest-api\api\server-

Then on the ui.log file there is:

Code: Select all

[2016-11-23 10:12:16] CSPro UI.INFO: Matched route "GET_". {"route_parameters":{"_controller":"Controllers\\LoginController::login","_route":"GET_"},"request_uri":"http://localhost/cspro-rest-api/ui/"} []
[2016-11-23 10:28:50] CSPro UI.INFO: Matched route "GET_". {"route_parameters":{"_controller":"Controllers\\LoginController::login","_route":"GET_"},"request_uri":"http://localhost/cspro-rest-api/ui/"} []
[2016-11-23 10:43:34] CSPro UI.INFO: Matched route "GET_". {"route_parameters":{"_controller":"Controllers\\LoginController::login","_route":"GET_"},"request_uri":"http://localhost/cspro-rest-api/ui/"} []
There is no api.log file inside \cspro-rest-api\logs folder.

And if it helps, inside api, setup and ui folders my web.config file has the following:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
</configuration>
 
And I have previously done what savy said on IIS configuration manager:
IIS_Default_Document.JPG
IIS_Default_Document.JPG (36.28 KiB) Viewed 8550 times
I will appreciate any comment about it.
Regards.
savy
Posts: 159
Joined: December 27th, 2012, 1:36 pm

Re: CSPro Web Server on IIS

Post by savy »

Sorry for the delayed response. Your web.config file is incorrect in setup, ui and api folders. Please copy all the web.config files from the original sources into the respective directories.
jfigueroa
Posts: 100
Joined: August 28th, 2014, 12:46 pm

Re: CSPro Web Server on IIS

Post by jfigueroa »

Hi savy,
Thank you so much for your response.

I have copied the original web.config files to the setup, ui and api folders of my C:\inetpub\wwwroot\cspro-rest-api directory.
Now on my web.config files of this folders I have the following:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="cspro ui rewrite rule">
                    <match url="^(.*)" />
                    <conditions>
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                    </conditions>
                    <action type="Rewrite" url="index.php" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>
But, I get this result when I try to acces to the CSPro Web Server login page.
CSPro_WS8.JPG
CSPro_WS8.JPG (65.05 KiB) Viewed 8541 times
Error HTTP 500.19 - Internal Server Error
The requested page can not be accessed because the related configuration data on the page is invalid.
Configuration File \\?\C:\inetpub\wwwroot\cspro-rest-api\ui\web.config
And also when I try to acces on IIS Default document for this folders, I get the following error message:
CSPro_WS9.JPG
CSPro_WS9.JPG (49.97 KiB) Viewed 8541 times
Error in performing this operation
Details:
File name \\?\C:\inetpub\wwwroot\cspro-rest-api\ui\web.config
Error
Default documents could not be retrieved.

Any comment about what could be happening is very apreciated.
I really want to test it, but I´m not able. :?
Thank you so much to everyone.
Regards.
savy
Posts: 159
Joined: December 27th, 2012, 1:36 pm

Re: CSPro Web Server on IIS

Post by savy »

Thanks for helping us test the product. Can you please check if you have installed the URL rewrite 2.0?
You can install it from here https://www.iis.net/downloads/microsoft/url-rewrite

The reason you are having these problems is probably because you have not used the Web Platform Installer to install your PHP as recommended in the helps. Like you said, your experience will help other users who might potentially run into similar problems. :)
jfigueroa
Posts: 100
Joined: August 28th, 2014, 12:46 pm

Re: CSPro Web Server on IIS

Post by jfigueroa »

Thank you so much for your reply savy.

I have installed the URL rewrite 2.0 as you suggested.
Now it looks that I can finally see the light at the end of the tunnel. Hahaha.

I´m now just getting this error message when I try to login at the CSPro Web Server:
CSPro_WS10.JPG
CSPro_WS10.JPG (37.01 KiB) Viewed 8525 times
Any suggestion what could be about?

Any comment about it will be very appreciated.
And yes, I really hope my experience will help other users, because it has been like an endless road. :? Hahaha
Thank you so much to everyone, to CSPro Team and CSPro community.
Regards.
savy
Posts: 159
Joined: December 27th, 2012, 1:36 pm

Re: CSPro Web Server on IIS

Post by savy »

Great! It seems like you did not start mysql. Make sure that you have mysql running.
You can do this by typing "start mysqld" from the command prompt from your mysql bin folder.
If that does not work, please send us the api.log and ui.log files located in the logs folder.
jfigueroa
Posts: 100
Joined: August 28th, 2014, 12:46 pm

Re: CSPro Web Server on IIS

Post by jfigueroa »

Hi savy,
Thanks for your reply. I have mysql running, and still getting the same message while trying to login.

On my api.log file I have the following:

Code: Select all

[2016-12-07 15:03:15] CSPro API.INFO: Matched route "POST_token". {"route_parameters":{"_controller":"[object] (Closure: {})","_route":"POST_token"},"request_uri":"http://localhost/cspro-rest-api/api/token"} []
[2016-12-07 15:03:15] CSPro API.INFO: > POST /cspro-rest-api/api/token [] []
[2016-12-07 15:03:15] CSPro API.INFO: < 200 [] []
[2016-12-07 15:08:21] CSPro API.INFO: Matched route "POST_token". {"route_parameters":{"_controller":"[object] (Closure: {})","_route":"POST_token"},"request_uri":"http://localhost/cspro-rest-api/api/token"} []
[2016-12-07 15:08:21] CSPro API.INFO: > POST /cspro-rest-api/api/token [] []
[2016-12-07 15:08:21] CSPro API.INFO: < 200 [] []
And on the ui.log file:

Code: Select all

[2016-12-07 15:03:03] CSPro UI.INFO: Matched route "GET_". {"route_parameters":{"_controller":"Controllers\\LoginController::login","_route":"GET_"},"request_uri":"http://localhost/cspro-rest-api/ui/"} []
[2016-12-07 15:03:15] CSPro UI.INFO: Matched route "login_check". {"route_parameters":{"_controller":"Controllers\\LoginController::loginAction","_route":"login_check"},"request_uri":"http://localhost/cspro-rest-api/ui/login_check"} []
[2016-12-07 15:03:15] CSPro UI.DEBUG: Failed Authenticating  User. <br /> <b>Deprecated</b>:  Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. in <b>Unknown</b> on line <b>0</b><br /> <br /> <b>Warning</b>:  Cannot modify header information - headers already sent in <b>Unknown</b> on line <b>0</b><br /> {"access_token":"a525636fa337925256fdba771bc3c45e976895ce","expires_in":3600,"token_type":"Bearer","scope":null,"refresh_token":"ff679250dba97058b7ab7b486f7d70e4fe3e23c0"} [] []
[2016-12-07 15:08:10] CSPro UI.INFO: Matched route "GET_". {"route_parameters":{"_controller":"Controllers\\LoginController::login","_route":"GET_"},"request_uri":"http://localhost/cspro-rest-api/ui/"} []
[2016-12-07 15:08:20] CSPro UI.INFO: Matched route "login_check". {"route_parameters":{"_controller":"Controllers\\LoginController::loginAction","_route":"login_check"},"request_uri":"http://localhost/cspro-rest-api/ui/login_check"} []
[2016-12-07 15:08:21] CSPro UI.DEBUG: Failed Authenticating  User. <br /> <b>Deprecated</b>:  Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. in <b>Unknown</b> on line <b>0</b><br /> <br /> <b>Warning</b>:  Cannot modify header information - headers already sent in <b>Unknown</b> on line <b>0</b><br /> {"access_token":"6022433db9cac81cd3c218d8de0373501ae3bb1d","expires_in":3600,"token_type":"Bearer","scope":null,"refresh_token":"1522be846e9edff8681021629e16e5dcc46af1c9"} [] []
I will appreciate any comment about it.
Regards.
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: CSPro Web Server on IIS

Post by josh »

This is a known issue with newer versions of PHP (5.6 and above I think). If you follow the instructions in the error message in the log file and set

always_populate_raw_post_data = -1

in your php.ini it should fix the problem. Savy is looking into a more general fix.
jfigueroa
Posts: 100
Joined: August 28th, 2014, 12:46 pm

Re: CSPro Web Server on IIS

Post by jfigueroa »

Thank you so much for your reply Josh.

Wow, now finally, I finally managed to login to CSPro Web Server.
CSPro_WS11.JPG
CSPro_WS11.JPG (32.37 KiB) Viewed 8519 times
Thank you so much for your replies Savy and Josh. I really thank you. You helped me a lot guys.
That´s fine Josh, if Savy founds a more general fix, is really welcome.

Now finally I can test CSPro 7.0 beta. :D
I really hope that I won´t get any other issue at this point.

For everyone that is wondering, I am using:
OS: Windows 10
Web Server: IIS 10
PHP installed manually, configurated manually. Version: 5.6.28
And using DB: MySQL version: 5.7.16


I really hope to test without any other issues related to my web server.
Thank you so much to everyone.
Thank you so much to CSPro Team and to this great Community.
And if I have knowledgre about something you are asking, I will try to help you guys as always.
Regards from Guatemala.

Joshua Figueroa.
ctrapence
Posts: 3
Joined: September 22nd, 2017, 7:43 am

Re: CSPro Web Server on IIS

Post by ctrapence »

Team,


Where can i get the cspro-rest-api.I have looked in the CSPro installation folders but i cant get it.

Any help please.

Thanks

Clement
Post Reply