Solved

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

Posted on 2009-05-07
9
517 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
[X]
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
  • 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
Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

 
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

Get HTML5 Certified

Want to be a web developer? You'll need to know HTML. Prepare for HTML5 certification by enrolling in July's Course of the Month! It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
A phishing scam that claims a recipient’s credit card details have been “suspended” is the latest trend in spoof emails.
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 this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

617 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