Say you work on your website on whatever language that may be, for this example, I’ll use ASP.

Then you encounter an error message, for this example, say the dreaded500 – Internal server error (picture 1).

500_internal_server_error

 

 So you sit there thinking “Ok, thanks! That doesn’t give me a clue on what my problem is!

 Lets fix that, shell we?

Edit your web.config file, inside the <system.webServer>section put this line in:
<httpErrors errorMode=”Detailed” />

See (picture 2) for an example.

500_internal_server_error_web_config_detailed_errors

 

 

IMPORTANT: If you are using ASP .NET, you also need to add the following inside the <system.web> tags of your web.config (at the end of the tag). If there is no <system.web>, simply create a starting and ending tag before <system.webserver> like so:
<system.web>
<customErrors defaultRedirect=”errors.aspx” mode=”Off” />
</system.web>

 

500_internal_server_error_detailed_error











Ok! Now I know that I forgot my include file … how silly of me!

FYI, that code was bound to break on purpose, since I didn’t really have those includes… this code was just for the purpose of this demonstration and is noted for you, below:

<%@ Language=VBScript %>
<% Option Explicit %>
<!– #include virtual = “/adovbs.inc” –>
<!– #include virtual = “/conn.asp” –>

<!doctype html public “-//w3c//dtd html 3.2//en”>

<html>

<head>
<title>(Type a title for your page here)</title>
</head>

<body bgcolor=”#ffffff” text=”#000000″ link=”#0000ff” vlink=”#800080″ alink=”#ff0000″>

<%
Dim conn,R,SQL,RecsAffected

Set conn=Server.CreateObject(“ADODB.Connection”)
conn.Mode=adModeReadWrite
conn.ConnectionString = aConnectionString
conn.Open




Was this answer helpful? 0 Users Found This Useful (8 Votes)