Does web hosting tell me that I need to add http handlers for static content in my web.config?

I have an MVC2 application on shared hosting with a company ... we will call them Hosters.

I did not think that Hosters support MVC2, but when I connected the chat to ask them to put a ticket, and they will install MVC2 for me! Very cool!

After a quick wait (Hosters are very responsive, and overall it's good for me), I received a message saying that my site is now configured for MVC2. After much discussion that I should use on the MVC2 blog, I am using the latest AtomSite for a new hosting, and I am dying to get this going. Success! When I visit my site, I get an installation wizard. But everything looks a little torn off. I have never used AtomSite before, and this is at an early stage of his life, so I don’t think anything about it. In any case, the story is rather boring, the reason why it looked a bit disconnected is that it did not show any static files.

All static files give me .NET error:

System.Web.HttpException: Failed to Execute URL.

This means that all requests are processed by the .NET engine. If I add a handler to 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 that I needed to do this for all the extensions that I would like to handle StaticFileHandler.

Does this seem to me wrong? Are they wrong? Do I really need to find out ALL the extensions that need to be added to the httpHandlers section? If not, what do I need to tell them to figure it out? I have never had to do this with MVC2 in the past, even on my dev machine with IIS6.

I can provide additional information if I do not want anything important! Thank!

+3
source share
1

, IIS URL- , "" ... ".txt |.png |.pdf |.gif | *.jpg" ..

0

Source: https://habr.com/ru/post/1775641/


All Articles