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

x
?
Solved

asp in windows 2000

Posted on 2002-03-09
6
Medium Priority
?
150 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 300 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

Industry Leaders: 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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…
Suggested Courses

885 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