Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

HOW TO GET ERROR LINE/CODE IN IIS 7 VISTA .ASP

Posted on 2009-05-07
9
512 Views
Last Modified: 2012-05-06

HOW TO GET ERROR CODE AND ERROR LINE NO IN .ASP PAGE

An error occurred on the server when processing the URL. Please contact the system administrator.
 
If you are the system administrator please click here to find out more about this error.

Open in new window

0
Comment
Question by:FUNNYBIRD
  • 3
  • 2
  • 2
  • +1
9 Comments
 
LVL 16

Expert Comment

by:ThinkPaper
ID: 24328467
Did you go into the browser, tools, settings, and UNCHECK display HTTP friendly errors?
Once you do, run the page again it should display a more detailed error - to help you figure out why it's failing, sometimes (not all) the error lines are included.

You may also want to do some error handling to further locate the problem..  (use of response.write to validate values and response.flush to force the output to show up immediately.
0
 
LVL 54

Accepted Solution

by:
b0lsc0tt earned 50 total points
ID: 24330925
FUNNYBIRD,

A setting needs to be changed in IIS7.  That new version of IIS changed how errors are reported.  Keep in mind this change was made for security reasons so you may want to consider reversing this.  Details on how to do it are at http://blogs.iis.net/bills/archive/2007/05/21/tips-for-classic-asp-developers-on-iis7.aspx in the "Script errors no longer shown in browser by default" section of the page (the 3rd section).  You might also find some helpful info at http://blogs.iis.net/bills/archive/2006/10/19/Improving-Custom-Errors-for-IIS7-Server.aspx for IIS7 error messages and its reporting of them.

Let me know if you have any questions or need more information.

b0lsc0tt
0
 
LVL 54

Expert Comment

by:b0lsc0tt
ID: 24330944
FUNNYBIRD,

One other alternative (and probably the best if the error may occur on a production site and script) is to have good error trapping.  If you expect you might get an error then use On Error Resume Next and the Error collection to report and handle the error.  The specifics will depend on the code.

Let me know if you have a question.

b0lsc0tt
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 6

Expert Comment

by:nirojexpert
ID: 24351582
in asp, you can try
on error resume next
code that can have error
 
response.write err.description
response.write err.number
 
0
 
LVL 6

Expert Comment

by:nirojexpert
ID: 24351585
but again be careful that you dont fall into infinite loop
0
 

Author Comment

by:FUNNYBIRD
ID: 24353544

I Did  UNCHECK display HTTP friendly errors, however I am not able to  GET ERROR LINE/CODE
0
 

Author Comment

by:FUNNYBIRD
ID: 24353774
I got the solution:

just run

%windir%\system32\inetsrv\appcmd set config -section:asp -scriptErrorSentToBrowser:true


thanks everybody

0
 
LVL 54

Expert Comment

by:b0lsc0tt
ID: 24356025
FUNNYBIRD,
I am glad you found the section and command I pointed out.  Let us know if you need any other help with this or have a question about closing it.
nirojexpert,
Thanks for participating but it seems your comment at the very least adds to what I provided in one of my comments if not repeats it.  Please carefully read previous posts and make sure to give credit when adding to what another expert has provided.  If you have nothing new to add then don't just reword and repeat the expert's comment.
bol
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Lync server 2013 or Skype for business Backup Service Error ID 4049 – After File Share Migration
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question