Solved

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

Posted on 2009-05-07
9
507 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
 
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
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Hi All Just a quick one for everybody. I was recently looking into setting the default User Account Picture for all my vista clients within the network but on closer inspection the group policy setting only allows you to set the default pictur…
What is an ISAPI filter?   •      It's an assembly (.dll file) that can add or change the way IIS works.   •      They can be enabled globally for your web server or on a site-by-site basis.   When the IIS server receives a request, enabling the ISAPI fi…
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…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

747 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now