tags:

views:

47

answers:

1

Hi I've got a site where I get the classic:

Server Error in '/' Application.

Runtime Error

Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
</configuration>

<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
    </system.web>
</configuration>

The problem is that although I change CustomErrors to On I can't see the error, and the xml of the web.config is not malformed since I've tried inducing this error and IIS told me, so it must be something else, but what should I look for?

Edit I Should mention, that I only get this error when I publish my site, web.config doesn't return an error locally, only when I upload to production. I can't even get an html page to display, it still returns the web config error to me

A: 

If your using a web.config then I am assuming that you have an ASP.Net application. The web.config stores configurational data for a .NET application. If you don't create an application within your virtual directory then you will see the error you are because there is no application for IIS to serve. This link should help.

Paulie Waulie
Yeah but no subapplications. It's on a mochahost cloud so I haven't got access to mess with the appPool and such, but the settings should be correct and resemble my local settings with a .net 4.0 framework environment
Jakob
if you'd like to I can post my webconfig file?
Jakob
Could be an idea, firstly though if you have CustomErrors set to "Off" do you see the exact same error message? Is your web.config at in the root directory of your website? If you get the same error message after ensuring both of those I would contact your hosting company and ask if they can check that your directory is setup to execute ASP.NET. If you post it here either I or someone else might spot the problem. Thanks Paul
Paulie Waulie
I'm such an idiot - There's no way to say this without making a fool of myself... There was no customerrors Off... Thanks for your persistence, and for asking the right questions :)
Jakob
No problem, glad you got it sorted. :0)
Paulie Waulie