Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2009-05-07
9
Medium Priority
?
524 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 200 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
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…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

886 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