Solved

asp in windows 2000

Posted on 2002-03-09
6
141 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
Comment Utility
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
Comment Utility
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
Comment Utility
It is also good practice to change the page not found standard message to redirect the user to your home page.


0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 33

Expert Comment

by:hongjun
Comment Utility
testing
0
 
LVL 17

Expert Comment

by:inthedark
Comment Utility
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
Comment Utility
thanks all!
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

762 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

10 Experts available now in Live!

Get 1:1 Help Now