c# - ASP.NET Webforms routing with extension -
i have simple asp.net webapplication project url-routing , want "allow" routes fileextension ".html", e.g...
http://www.mywebsite.com/cms/test.html http://www.mywebsite.com/cms/sub/test.html http://www.mywebsite.com/cms/sub/sub/test.html
my global.asax routes looks this:
routes.mappageroute("", "cms/{a1}", "~/default.aspx");
the route matched when access website this: http://www.mywebsite.com/cms/test
if try one, doens't work too:
routes.mappageroute("", "cms/{a1}.html", "~/default.aspx");
edit: 404 error. think .net looks physical file...
any ideas?
i've fixed on over following property "runallmanagedmodulesforallrequests" inside this:
<system.webserver> <modules runallmanagedmodulesforallrequests="true" /> <handlers> <remove name="urlroutinghandler" /> </handlers> </system.webserver>
Comments
Post a Comment