asp.net - Web Forms Url Routing in Mono -
i'm new mono , trying run simple hello world application routing. while application runs fine on iis, i'm getting 404 error when browse root of site. i've got route mapped follows:
routetable.routes.mappageroute("default", string.empty, "~/site/home.aspx") browsing directly file (http://myhostname/site/home.aspx) works.
i tried using following web.config -- both , without system.webserver section:
<configuration> <system.web> <compilation strict="false" explicit="true" targetframework="4.0" /> <customerrors mode="off"/> </system.web> <system.webserver> <modules runallmanagedmodulesforallrequests="true"> <add name="urlroutingmodule" type="system.web.routing.urlroutingmodule, system.web, version=4.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a" /> </modules> <handlers> <add name="urlroutinghandler" precondition="integratedmode" verb="*" path="urlrouting.axd" type="system.web.httpforbiddenhandler, system.web, version=2.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a" /> </handlers> <validation validateintegratedmodeconfiguration="false" /> </system.webserver> i'm using nginx fastcgi-mono-server4 , fastcgi_index set default.aspx (i tried lowercase index.aspx).
anything i'm missing here or mono support routing mvc?
it turned out nginx configuration issue. hadn't specified root in site's config.
server { listen 80; location / { root /var/www/comparebetween/; fastcgi_index /; fastcgi_pass 127.0.0.1:9000; include /etc/nginx/fastcgi_params; } } i've seen blogs suggesting bare minimum config setting fastcgi_index default.aspx , specifying fastcgi_pass , fastcgi_params hope above helps runs same problem.
Comments
Post a Comment