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

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -