How to remove .aspx from url
How can i remove .aspx开发者_开发知识库 from my urls as I used UrlRewritingNet and its giving me page not found error when i host the site to the server but its alright in the IDE browser.
You need to tell IIS to let ASP.NET handle all requests. This is known as a wildcard mapping, see option 1 on the following link: http://blog.codeville.net/2008/07/04/options-for-deploying-aspnet-mvc-to-iis-6/
If you are using IIS 7 then you need to use Classic asp.net pool, which supports UrlRewritingNet.
In IIS, in tghe settings for your project. Click on Home Directory, then configuration, then mappings. Find .aspx, click settings, uncheck "Check that file exists".
Um, thats for IIS 6, so getting to the setting is probably a bit different in 7 but it's still there.
精彩评论