Good morning, I want to deploy a solution built on ASPnet, the development was done in WindowsSO / IIS, on a Centos Operating System using NginX Web server.
I'm using Centos-6.8, Nginx-1.10 and mono-4.6.1.5.
My nginx configuration file is:
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
root /usr/share/nginx/html;
#root /usr/share/nginx/html/Site;
location / {
index index.aspx index.html index.htm index.aspx default.aspx Default.aspx Global.asax;
fastcgi_index Global.asax;
fastcgi_pass 127.0.0.1:9000;
include fastcgi_params;
}
...
}
In the file fastcgi_params I include:
fastcgi_param PATH_INFO "";
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
And later I start the Mono service
fastcgi-mono-server4 /applications=/:/usr/share/nginx/html /socket=tcp:127.0.0.1:9000 &
By accessing link to test if it shows results.
When I invoke the solution through link is where I have problems, it shows the following message:
System.Web.HttpException
This type of page is not served.
Description: HTTP 403.The type of page you have requested is not served because it has been explicitly forbidden. The extension '.asax' may be incorrect. Please review the URL below and make sure that it is spelled correctly.
Details: Requested URL: /Site/Global.asax
Exception stack trace:
at System.Web.HttpForbiddenHandler.ProcessRequest (System.Web.HttpContext context) [0x00073] in <d3ba84a338d241e2ab5397407351c9cd>:0
at System.Web.HttpApplication+<Pipeline>c__Iterator1.MoveNext () [0x00dd7] in <d3ba84a338d241e2ab5397407351c9cd>:0
at System.Web.HttpApplication.Tick () [0x00000] in <d3ba84a338d241e2ab5397407351c9cd>:0
Assign permissions to the nginx user on the Site folder that is where I have the solution, maybe I need to add some dependency in the Web.Config of the application, any ideas?
Thank you.