I have a COM object developed in VB. It makes ADODB calls. When it fails it
Raise Error. I am using the COM object in my ASP using Server.CreateObject.
Whenever a function call fails I wanted the system to catch the 500-100
error and redirect to the configured page in IIS. But nothing happens. I
don't have "on error resume next" in my COM object.
If I create ADO objects directly in my ASP code using Server.CreateObject it
works fine.
when coming to ASPError object. how to use this object. I am not understanding. one of my friend suggested w3schoools.com is best site for learning ASP. So i am learning from that. explain about this ASPError Object with a sample . Do we have to add any custom error asp file in the webser(IIS 5.0) ?
I'm attempting to use the ASPError object to generate a custom page when a user encounters a 500-error. I want the page to generate an email to alert my department of the problem.
In Internet Explorer: If I force a 500 error, I get the custom page AS LONG AS THE VBScript CODE isn't longer than about 165 characters (but it won't send me an email). If the VBScript exceeds 165 characters, then the whole code of the error page is revealed.
In Netscape: the browser thinks I'm trying to download an application of type application/octet-stream. I've found postings about this problem with custom error pages & Netscape dating back to 2000, although I haven't found any solutions to the problem. The previous postees seem to have resolved their problem with Netscape.
Need help with some basic error trapping. This code traps the error and successfully redirects to the error handling page.
If Err.Number <> 0 Then Response.Redirect("../main/ErrorHandler.asp?error=noconnection") End If On Error GoTo 0
I meant to use this code to send myself an email with error details but it is not working. I get my nicely formatted email but instead of error values there is nothing. Why would all Err. be empty?
I suspect that the problem is with the error occuring on one page but actual handling of the error is meant to be on some other page but I am not sure here. Code:
I am pulling documents (PDF, to be exact) from a remote server, and it all seems to work fine. However, I cannot control that particular database in which the documents are stored.
Currently, the DB where the documents are stored is down, and when I use the object above, naturally, I get the 500 error(my error log states that it's a timeout). How can I write a custom error message to display in a browser, instead of the usual HTTP 500 Internal server error page?
i want to perform error trapping on the connection to a server,so if the SQL server is inaccessible the site does not crash.I'm using javascript and hoped the try.catch might work.this is want I've tried in an existing piece of ASP script:
where App_TRSConnectionString is declared elsewhere. It still attempts to connect and because i'm testing with an inappropriate connection string the page crashes.
I want that every error in every asp/javascript/ etc... will trappped to a central asp page (not dotnet), which I declare on my site.suppose I have a dotnet site platformed - is the declaration for that may be the same for not dotnet declarations.
i need the best way to catch any error on a specific page.
i have a page that connects to a database on an AS/400 and there is a possibility that a certain condition might exist on the 400 that causes my page to bomb. i have no real way of specifically testing for this condition (not easily anyway) so i just want to write out a general error message if ANY error occurs on the page since it will be very rare.
How can I trap errors from the FileSystemObject ("Permission Denied, File Not Found, etc.)? I tried the "Err" object, but it doesn't return an error number...
Is it possible with "classic" ASP to set up a process where anytime someone encounters a server-side error, it will e-mail the error message to me? I know I've done this with .NET, just can't remember exactly how.
I have a data-driven website that allows users to enter records for sales leads. It all works perfectly. The only thing I want to do right now is prohibit users from entering the same lead twice.
I have a PK field in the MS Access database that, obviously, disallows duplicate records. However, when such an attempt is made, the browser redirects to some generic ODBC error page with some cryptic numbers and other information that will stymie the users. "It doesn't work", they will say. The text of that error indicates that they tried to add a record that violates the PK rule of disallowing duplicate records. But they probably won't read it and it's truly ugly anyway.
How can I redirect to a custom error page or trap the error before the ODBC error page is displayed and just display a msgbox or something telling the user they attempted to add a record that already exists?
I have a mail script but don't know how to catch any errors so that it will display email address that failed to send. Here is my code...
Dim mail Set mail = Server.CreateObject("CDO.Message") mail.From = "from@mail.com" mail.Bcc = "bcc@mail.com, bcc2@mail.com" mail.To = "to@mail.com" mail.Subject = "This is the subject of the email" mail.HTMLBody = "I am the message that will be displayed in the body" mail.Send() Set mail = Nothing
How can I display a message that says that there's an error with sending the mail?
1) User enters their details to create a new account in my db.
2) They press the submit, the system successfully creates their new account and then displays a page saying 'well done you've created your new account'.
3) The doofus (or clever clogs) clicks the Refresh button, which in turn submits the details back to the db and creates a duplicate entry in my db. I don't have a duplicate account num, as the system takes the max last one and adds one to it so really no errors are generated, but it does mean that they have 2 accounts now.
As mentioned above, this scenario crops up when doing a New Account page and when they've just posted their order via the shopping cart final page (shall we say). The latter worries me because duplicate orders would cause a lot more hassle.
I am looking for a way that I can trap the single quotation mark. If an encoder uses single quotation mark on a textbox field, it always give me an error because I use single quotes on the SQL statement.
I am inserting a record in a table(Trans_Master) using ado recordeset.I have also created trigger on the same table after INSERT where RollBack transaction is done when a condition is not met.
the created trigger is working fine.But the problem I am having is How do I can trap thus rollback in asp.One posssile solution I may see is traping raiserror in asp but don't know HOW?
how to trap the error if the cause is the concurrent user. from iis server my 500-100.asp page is coded to trap errors that came from crytal report. below is the code that has been used.
if instr(lcase(objASPError.file), "rdcrptserver11.asp") <= 0 then SendEmailNotification objAspError end if
this piece of codes means if theres a error from rdcrptserver11.asp it would send a notification to me right? what if i dont want to get email notification if ther error is exceeding the concurrent user. what would i do stop the sending of notification when that happens.