Troubleshooting ASP.NET site

In most cases the error should display on the screen.

However if it does not you can enable error reporting by editing your web.config file and adding the following inbetween <system.web> and /<system.web> tags:

<customErrors mode="Off"/>

Once done a more detailed error should appear on screen.

The error usually will indicate what the issue is.

If missing libraries. You may not be referencing the libraries to be used correctly within the web.config file


more common is that the DB details are incorrect or missing or the db connection name does not match.

For example this error is returned from a particular site:


Server Error in '/' Application.

Could not find connection string with name 'conn' in application config file

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.ArgumentException: Could not find connection string with name 'conn' in application config file


As the error above indicates the connection name is wrong. Hence the connection string must be changed to the following in the web.config file:

<add name="conn" connectionString="Data Source=dbserveriporhostname;Persist Security Info=True;Initial Catalog=dbname;User ID=dbusername;Password=dbpassword;MultipleActiveResultSets=True;" ProviderName="System.Data.SqlClient" />

  • 0 Users Found This Useful

Was this answer helpful?

Related Articles

Sending Email via C# and ASP.NET

Add the following to your web.config file:  <>    <mailSettings>...

Force to HTTPS

In the following example we will redirect HTTP to HTTPs using URL Rewrite:Edit your web.config...

User not local; please try a different path. when trying to send through your form on plesk

User not local; please try a different path. The server response was: Sender address is not valid...

ASP.NET Session Timeout

This in-depth analysis helps you know the problem and workaround when you experienced ASP.NET...

How to Enable ASP.NET Debugging in Plesk

here may be times you need to see more logging or debugging information for your ASP.NET...