3

I have an ASP.NET Web Application which is working properly in localhost. But when hosted in IIS the following error message displays:

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.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".

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

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

What can I do to correct this?

Grant Thomas
  • 44,454
  • 10
  • 85
  • 129
Nithesh Narayanan
  • 11,481
  • 34
  • 98
  • 138
  • What error are you getting just turn on the custom error mode and find the real error. – Karan Shah Aug 23 '11 at 12:01
  • This is not the error message, just a hint that you should switch customErrors to "Off" in order to SEE the real error message. – Olaf Aug 23 '11 at 12:01
  • Sry it was a mistake while am copying... pls chk the question nw.... – Nithesh Narayanan Aug 23 '11 at 12:03
  • That isn't the error. That's the message shown instead of the error in order to hide implementation details from the client. You need to log into the server and browse your website there. Or, just check the application log for the exception details. Without that information, this is not a question that is answerable. –  Aug 23 '11 at 13:32
  • 2
    what a complete mess. The guy clearly needs help, yet any of the many potential options of what it could be are being downvoted and now the question is closed???? pointless! all the answers are relevant. – Baldy Aug 23 '11 at 15:39

3 Answers3

2

I don't believe that is the error message in its entirety, but I am led to believe that it is part of a message that you're getting which is asking you to turn off custom errors in order to see what the underlying cause of the problem actually is.

If you open your web.config file and find the customErrors element, change the mode to Off and upload it - now when you hit your web page with the error, you should get a detailed exception message about what is going wrong.

Grant Thomas
  • 44,454
  • 10
  • 85
  • 129
0

It means there's some error n your application which may be caused due to many reason's. Do what the error says....that is add

 <customErrors mode="Off"/>

under

  <system.web>

Then reload webconfig file in server....now when you run the app... you ll be pointed in the direction from where the error is coming. Then you will know what exactl is happening and rectify the problem.

Neelam
  • 1,028
  • 12
  • 25
-1

This error is common when the incorrect version of the .net runtime is loaded against a web application developed in asp.net.

Establish which application pool your web app is using, and then check which version of the asp.net runtime this is using (right click the app pool -> advanced settings -> .net framework version)

Baldy
  • 3,621
  • 4
  • 38
  • 60