Running Sample projects without Extensionless URL's [Answered]RSS

1 reply

Last post Jul 19, 2010 04:22 PM by HumanCompiler

  • Running Sample projects without Extensionless URL's

    Jul 19, 2010 12:16 PM|tzmedia|LINK

    From Issue: Extensionless URLs do not find .cshtml/.vbhtml files on IIS 7 or IIS 7.5

    http://learn.iis.net/page.aspx/872/webmatrix-beta-release-readme/:

    On IIS 7 or IIS 7.5, requests with a URL like the following are not able to find pages that have the .cshtml or .vbhtml extension.

    What does the second work around do?

    I know my host does not support URL rewriting as of now.
    ----------------------------------
    Work Around text fron link above:
    If you do not have control over the server computer (for example, you are deploying to a hosting website), add the following to the website's Web.config file:

    <html>

    <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
    </system.webServer>

    </html>

    ------------

    Just took a quick look and it seems the Bakery project is the only one that uses a web.config, as far as I can tell, that was a surprise.

    remote server Url Rewrite

  • Re: Running Sample projects without Extensionless URL's

    Jul 19, 2010 04:22 PM|HumanCompiler|LINK

    That workaround should work for you.  Here's some more info on it: http://forums.iis.net/t/1031243.aspx

    Yes, it is a goal for ASP.NET Web Pages to use little or no web.config.

    Erik Porter
    ASP.NET PM
    http://about.me/erikporter