Solved

asp in windows 2000

Posted on 2002-03-09
6
142 Views
Last Modified: 2010-05-03
hi, i'm using win2000 server (previously win NT) and i'm about trying my asp pages, then I found if something error in my code, the browser will display page not found and doesn't tell me what's wrong, it makes me difficult to debug. Is there any solution to show "user friendly error" ?
0
Comment
Question by:powerfool
6 Comments
 
LVL 39

Accepted Solution

by:
abel earned 75 total points
ID: 6852507
Under Advanced in Internet Options in IE you'll find "Show Friendly HTTP Error messages". Make sure this one is not checked and you should see the normal error message.

Yet, Page not found still means page not found. That should have nothing to do with your code, it's just a URL that's incorrect here.

Abel
0
 
LVL 33

Expert Comment

by:hongjun
ID: 6852517
abel is correct. If you have any queries to what the exact error message means, inform us.

hongjun
0
 
LVL 17

Expert Comment

by:inthedark
ID: 6852520
It is also good practice to change the page not found standard message to redirect the user to your home page.


0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 33

Expert Comment

by:hongjun
ID: 6852526
testing
0
 
LVL 17

Expert Comment

by:inthedark
ID: 6852545
Furthermore, I would stongly advise not to use ASP for you main applciation; call a VB ActiveX DLL instead becuase you get fantasic reliability and much better debugging. You will get your project done much faster.

Here is an example ASP to call a VB ActiveX, you may be doing this already - but if you are not save yourself months of pain.



<%
Option Explicit
DIM VIP

On Error Resume Next
Err.Clear
Do

Set VIP=Server.CreateObject("VIPASP30.Pager") ' a link to your project
If Err.number<>0 Then
        Session("ErrorMessage") = "Step 1020 Error: " & cstr(err.number) & " - " & Err.Description
     Response.Redirect "DLLDown.asp"
        Exit Do  
Else
     VIP.Register Server, Request, Response, Application, Session
        If Err.number<>0 Then
            Session("ErrorMessage") = "Step 1050 Error: " & cstr(err.number) & " - " & Err.Description
         Response.Redirect "DLLDown.asp"
            Exit Do      
        End If

        VIP.GetPage
        If Err.number<>0 Then
            Session("ErrorMessage") = "Step 1090 Error: " & cstr(err.number) & " - " & Err.Description + "~ " VIP.Stage
         Response.Redirect "DLLDown.asp"
            Exit Do
        Else
            Session("CrashCount) = 0        
        End If
End If
exit do
Loop
Set VIP = Nothing

%>


Your DLLDown.ASP can send you an email with the error details and the rediect to you home page if
Session("CrashCount) is zero Like:

Session("CrashCount)=cLng(Session("CrashCount)) + 1
if Session("CrashCount) < 2 Then
    Response.Redirect "http://youserver/youhomepage.asp"
else
   ' tell them sorry
   Response.Redirect "http://youserver/astaticpage.htm"
end if
0
 
LVL 1

Author Comment

by:powerfool
ID: 6856361
thanks all!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

932 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

12 Experts available now in Live!

Get 1:1 Help Now