When your website encounters an error, your web server may not display the actual script error, but will instead show a message such as the one below:
You may also see:
Friendly error messages such as the ones above make it hard to determine which file and what code line is causing the error.
There is a simply trick you can use to turn of friendly error message, using the web.config file.
A. If your site already has web.config file, follow these steps below:
1. Login to your site FTP and download your web.config file. Usually this file is located at the root level.
2. Open your web.config using your preferred text editor.
If you choose to open using notepad, click File > Open then browse to the web.config file location. Choose All files ( *.* ) so that you can see the web.config file.
Click to open the web.config file
3. Now insert the following code below just before the last line </configuration> :
<system.webServer>
<httpErrors errorMode="Detailed" />
</system.webServer>
<system.web>
<customErrors mode="Off"/>
<compilation debug="true"/>
</system.web>
<system.webServer>
.............[your existing code]................
.............[your existing code]................
.............[your existing code]................
</system.webServer>
<system.webServer>
<httpErrors errorMode="Detailed" />
</system.webServer>
<system.webServer>
.............[your existing code]................
.............[your existing code]................
.............[your existing code]................
<httpErrors errorMode="Detailed" />
</system.webServer>
<httpErrors errorMode="Detailed" />
This will cause error to your site as they will be 2 tag of <httpErrors><httpErrors errorMode="Detailed" />
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<httpErrors errorMode="Detailed" />
</system.webServer>
<system.web>
<customErrors mode="Off"/>
<compilation debug="true"/>
</system.web>
</configuration>