Solved

asp in windows 2000

Posted on 2002-03-09
6
144 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
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…

807 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