Question

I have an MVC2 app on shared hosting with a company... we'll call them Hosters.

I didn't think Hosters supported MVC2, but when I connected live chat to ask they said to put in a ticket and they'll install MVC2 for me! Very cool!

After a quick wait (Hosters is very responsive and overall has been good to me), I got an email saying my site is all setup for MVC2 now. After much deliberation of which MVC2 blogging engine I should use, I deploy the latest release of AtomSite to the new hosting, and am dying to get it going. Success! I get the setup wizard when visiting my site. But everything looks slightly off. I've never used AtomSite before, and it's early in its life, so I don't think anything of it. Anyway, enough boring story, the reason it looked slightly off is because it wasn't showing any static files.

All static files are giving me a .NET error:

System.Web.HttpException: Failed to Execute URL.

This means all requests are being handled by the .NET engine. If I add a handler to the web.config:

<httpHandlers>
    ....
    <add verb="*" path="*.txt" type="System.Web.StaticFileHandler" />
</httpHandlers>

The site now shows txt files just fine. When I contacted Hosters, they said I needed to do that for all extensions I wanted the StaticFileHandler to handle.

This seems wrong to me? Did they set it up wrong? Do I really have to figure out ALL the extensions that need to be added to the httpHandlers section? If not, what do I need to tell them to get it sorted out? I've never had to do this with MVC2 in the past, even on my dev machine running IIS6.

I can provide more information if I left out anything important! Thanks!

Was it helpful?

Solution

this happens when you setup IIS to handle extensionless urls, just 'or' in the other static file types... ".txt|.png|.pdf|.gif|*.jpg" etc

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top