[Mono-list] MVC site on fastcgi + nginx produces NotImplementedException in System.Web.Routing.Route.GetRouteData unless PATH_INFO is specified
Sergii Volchkov
s.volchkov at gmail.com
Wed Aug 5 10:57:20 EDT 2009
Hello,
I am trying to host an MVC Web site on Mono 2.4.2.3 using
fastcgi-mono-server2 and nginx. Attempt to open any page that should
be routed to a controller produces the following error:
System.NotImplementedException: The requested feature is not implemented.
at System.Web.Routing.Route.GetRouteData (System.Web.HttpContextBase
httpContext) [0x0013b] in
/home/volk/mono/svn/mcs/class/System.Web.Routing/System.Web.Routing/Route.cs:110
at System.Web.Routing.RouteCollection.GetRouteData
(System.Web.HttpContextBase httpContext) [0x0007e] in
/home/volk/mono/svn/mcs/class/System.Web.Routing/System.Web.Routing/RouteCollection.cs:131
at System.Web.Routing.UrlRoutingModule.PostResolveRequestCache
(System.Web.HttpContextBase context) [0x00011] in
/home/volk/mono/svn/mcs/class/System.Web.Routing/System.Web.Routing/UrlRoutingModule.cs:102
at System.Web.Routing.UrlRoutingModule.PostResolveRequestCache
(System.Object o, System.EventArgs e) [0x00007] in
/home/volk/mono/svn/mcs/class/System.Web.Routing/System.Web.Routing/UrlRoutingModule.cs:82
at System.Web.HttpApplication+<RunHooks>c__Iterator1.MoveNext ()
[0x001aa] in /home/volk/mono/svn/mcs/class/System.Web/System.Web/HttpApplication.cs:1027
at System.Web.HttpApplication+<Pipeline>c__Iterator2.MoveNext ()
[0x0063f] in /home/volk/mono/svn/mcs/class/System.Web/System.Web/HttpApplication.cs:1238
at System.Web.HttpApplication.Tick () [0x00000] in
/home/volk/mono/svn/mcs/class/System.Web/System.Web/HttpApplication.cs:915
The Web site I use is a standard ASP.NET MVC 1.0 project created in
Visual Studio and published to Mono.
related nginx configuration section:
server {
listen 8081;
location / {
root /home/volk/xsp_home/test;
index index.html index.htm index.aspx default.aspx Default.aspx;
fastcgi_index Default.aspx;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
Since System.Web.Routing.Route.GetRouteData is likely to throw
NotImplementedException only if (Request.PathInfo != String.Empty), I
tried to add the following parameter to nginx.conf:
fastcgi_param PATH_INFO "";
After the change, everything worked properly.
Could anyone please shed some light whether this is a required
parameter (in such case, the doc at
http://www.mono-project.com/FastCGI_Nginx is incomplete), or the
parameter is in fact optional and it is a bug that Mono fails to check
it properly?
Thanks!
More information about the Mono-list
mailing list