views:

212

answers:

6

For anything under the Scripts or Content folders in my ASP.NET MVC application, I am getting the following error:

The page cannot be displayed because an internal server error has occurred

That's the response in its entirety (excepting the headers) - nothing else. I am hosting this on GoDaddy, and have not had problems with this application before. What did I do to screw this up?! Working on 4 hours of sleep isn't helping matters...

+1  A: 

In your web.config file, find the customErrors section and change mode to Off.

<customErrors mode="Off">
</customErrors>

Changing that will give you a more descriptive error.

jrummell
Nope, that doesn't help - the response is directly from IIS on those files themselves.
Jason Bunting
A: 

Can you turn off Simple error messages?

Hurricanepkt
Nope, that's not it.
Jason Bunting
A: 

Perhaps you could try putting

routes.IgnoreRoute("Scripts");
routes.IgnoreRoute("Content");

in your route register?

Also make sure that if you are using the built-in authentication, you have this bit in your web.config, though I think it isn't your problem:

<location path="public">
    <system.web>
    <authorization>
        <allow users="*"/>
        </authorization>
    </system.web>
</location>
Stuart Branham
A: 

Hmm, do you have any control of IIS on that hosting? Maybe they have a wildcard mapping interfering. That's happened to us before with site minder.

RailRhoad
A: 

Download Phil Haack's Route Debugger, then try navigating to one of the Scripts. You might be catching them in your routes.

Martin
+1  A: 

This would be appropriate here:

"It takes considerable knowledge just to realize the extent of your own ignorance."

                                                  -Thomas Sowell

So, when struggling to get a Flash-based, JavaScript-configured component to work in my web app, I added a staticContent node to my web.config, with a mimeMap node as a child:

<configuration>
    ...
    <system.webServer>
        ...
        <staticContent>
            <mimeMap fileExtension=".mp4" mimeType="video/mpeg" />
        </staticContent>
    </system.webServer>
</configuration>

When I commented-out the entire staticContent node, everything worked just fine. I didn't know that adding a mimeMap here would cause all of the default mimeMaps (specified within the server's ApplicationHost.config) to be overridden, because that seems to be exactly what is going on...Then again, I am merely guessing - either way, not very easy to figure out.

Thank you to everyone that responded, I appreciate it!

Jason Bunting