Abhi
Abhi

Reputation: 5561

deploying web application on server results in this error

hello guys i am facing this error

enter image description here

How to fix it. My ASP.net website is running fine locally.

Upvotes: 1

Views: 334

Answers (2)

user240141
user240141

Reputation:

Set it to OFF and see what is the error. By default the section is commented in Web.Config. Look for the section custom error in web.config file, uncomment that and set it to off, to see the error on production.

Update

<system.web> -- inside this section just add the line below. 
                If its already there remove existing custom errors and use this
    <customErrors mode="Off" />
</system.web>

Upvotes: 1

Jude Cooray
Jude Cooray

Reputation: 19872

This is happening because of some configuration is different from your local machine and your deployed machine. An error is thrown here because of this. But you actually cannot see the details of the error message because your web.config file probably has customErrors set to be shown only in the local machine or have no custom errors tag. I suggest you turn it to "off" in the web.config file just to see the proper error message on the deployed machine.

Upvotes: 1

Related Questions