Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    ASP




IIS ASP Custom Error Page


why I can't use custom error messages with the asp extension in IIS5.1? I have set up a custom page to handle errors called errorHandler.asp and all HTML is rendered but not the asp.

If i put Hello World in the html body section it renders but if I put the same in a response.write of the asp it won't render.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Custom Error Page
I am still in the debugging of my website, but I'm nearing the end. As a last phase implementation, I want to be able to catch all asp errors and if there is one, send the user to a custom "sorry bout that" page, rather than having the errors displayed on that; if there aren't any errors, let the page load.
I setup the 404 error, but that doesn't seem to accomplish what I want.

Custom 404 Error Page
I downloaded this custom 404 error page which sends an email, was wondering if anyone could have a look at it for me, for some reason, its not picking up the function, I have tried the mailing code and it works fine. Code:

Custom 404 Page
I notice that when you have the defualt setup of 404 error
pages the IIS 5.0 log tracks the page the user was trying
to get to and the page they where at when they tryed to
get to the now missing page. I recently wrote my own 404
error page to make it match my site but when I set IIS to
use my custom page it no longer traks the page that the
user was trying to get.

I was told I needed to add some
code to my page to fix this, but I don't know what code to
add. Can someone tell me? (I am useing ASP on the custom
404 error page) I am returning a 404 error response,
everything works fine it is just that IIS does not log
what page the user was trying to get to.

Custom 404 Asp Page
I created my own custom 404 handler and it works, so when I put in

http://www.domain.com/badxxx.html
it produces the correct 404 error and you see
http://www.domain.com/badxxx.html in the url still which is fine.

But when I put in
http://www.domain.com/asdf

it redirects to
http://www.domain.com/index.html

it gives a 302 (moved temporarily) as well as the 404 error.
Why does it do this for not .html files? I dont redirect it at all, and am
using
thestring = Request.ServerVariables("QUERY_STRING") to get the url

but thestring sometimes does not display the asdf depending what I do after
this command, very odd.

does anybody have anyideas as to how to preserve this
http://www.domain.com/asdf in the url and avoid the 302?

Custom 500 Error
When you have a custom HTTP 500 error handler, how do you go about making sure all your previously opened recordsets/objects/connections/etc.are closed properly?

It would seem to me that once you hit a 500 error, you have no opportunity to close any of the previously opened objects, eventually causing memory leaks.

Custom Redirect 404 Page
I am trying to do the similar to mod rewrite and use the custom 404 rewrite
page to handle the table look up, so www.myweb.com/irish-tapestry-333.html
will redirect to

www.myweb.com?id=333 for the detail pages.
Will google see this forwarding in the 404 redirect page and ignore the
links?Also, how can I make the URL of www.myweb.com/irish-tapestry-333.html
appear in the users url window instead of the www.myweb.com?id=333

Custom 404 Error Handling
When a user tries to visit a non-existant page in our web site they receive a custom 404 error message. I want to capture the URL the user tried to visit. Does anyone know where I can find this string?

Custom Asp Error Messages
On windows xp we can modify 500-100.asp file for custom asp error messages. How can we do this on a windows NT 4.0 and IIS.or what is the similar file on NT and IIS?

Custom Error Pages
is there a way to make custom error pages specific to a particular page?I know you can make customer error pages for iis to use.but if there is an error on a particuar page, can i make a custom error page to be redirected to?

for example,if a user is clicking away and runs into an error,it would display error1.htm.if they were on a different page and an error occured,they would get an error2.hm.

Custom Error Messages To Alert Me
I have a site that currently has custom error messages enabled for all error messages, i.e. any error goes directly to error.asp etc. What I want to do however is have this error.asp email me with a fairly detailed error message outlining the problem that caused the error.

What is the best way of doing this? My server allows me to setup custom messages for any type of error but obviously to do this would be time consuming. Is there a way I can basically email myself an almost exact copy of the error message that I would get if I was viewing the page and the error happened to me?

For example, a 501.100 error can cover any number of error and whereas a message telling me that a person got a 501.100 at 12.43 on 31/5/2004 is ok it isn't very helpful. I want it to say:

501.100 at 12.43 on 31/5/2004
Error Type:
Microsoft VBScript compilation (0x800A03F9)
Expected 'Then'
/kshs/cms/cmsDefault.asp, line 54, column 39

Search Result To Custom Named Page
Here is what I am trying to accomplish.

Language: .asp vbscript

Building a searchable real estate property database (MS Access)

Search page submits form variables to result page.

Works great but I have seen other web sites where the results page is a custom named page. for example.

If you search for homes with the following criteria.

Criteria: Buford, GA 30519

Your results page is named something like the following.

MLS-Buford-GA-30519-10-Distancea-0.aspx

Is this only doable in .aspx or can I accomplish this task in .asp?

Custom Http Error 404 To Catch Subdomains.site.com Requests
I have 404.asp file that catches non existing pages such as www.site.com/es for spanish version of site. Now I would like to move ahead and have es.site.com instead. I started digging into subdomains in IIS and found out that usually when creating subdomain in IIS it creates a separate sub-directory by the same name as the subdomain created. From some reason the custom error 404.asp file I already have is not called when a call to a non existing sub domain page is made.

Anyone knows why?

How do I configure 404.asp to also handle subdomain page requests?

I know that in Unix/Apache I can use .htaccess file to direct calls to es.site.com to www.site.com/es quite easily, can this be done somehow on IIS?

Friendly HTTP Errors Causes Std Error Page In IE (no Its Not An Asp Error!)
I thought this is more of an IE issue but i've had no joy on that group
perhaps somebody here will have a clue.

If i click a link to a web page embedded in Excel (97 OR 2000) i get the
standard error page displayed by IE (you know, the 'cannot find server or
dns error' page).

Turning off 'show friendly http error messages' alleviates this.
(Unfortunately this is the Windows default setting!)

Whats going on?!?! Code:

Custom Hit Counter
I decide to put a custom Hit Counter on my page (below). Then I won't be
reliant on the standard FrontPage one which uses webbots.

It is called by:

<b>Hit Counter: </b><!--#include file="_fpclass/hit_count.inc"-->
The code it includes is below.

OK, it works - sort of.

If I go to Guestbook and then return via the Home button, the counter
increases by 3, not 1.

I can't see why this is happenning.

After returning, a refresh increases it by 2, then another refresh increases
it by 1 ??

I know that many say "Don't use them - it is a sign of an amateur", but I
would at least like to get it working even if I later decide not to use it.

I have thought to make it a conditional include, i.e. if document.referrer
is blank. Is that possible? Code:

Custom Tags
i have a table that users are inserting custom tages ,it looks like :

user_id type value
1 99 television
2 98 beach
3 99 coldplay

etc.
now i have to make a search which will show all the users that typed the same value from the same type .i dont want the query to be a textual query (slow ...)what is the right way to do it ?how can i make a query that JOINs to tables from 2 different databases?

Custom Sessions
how to go about setting up and using custom sessions for user authentication throughout an application?

Custom 404 And Logging
I'm developing an application that uses a custom 404 page to deliver all of my site's content. However, doing things this way renders IIS's regular log files pretty much useless.

Are there any established "best practices" for creating your own logging system? I know that others use this technique and I'm hoping someone has some ideas they can pass along. For example, do you log every single page request or do you just log totals per day, week, or month? How do you deal with the increasing volumes of data? Do you collect referrer data, etc.?

Custom Controls
I have code for remove button.How to make it a common control so that it will be handy to use.

Custom 404 Quesrystring Problem
I've created a custom 404 page that performs redirects based on the incoming
URL cross referenced against a database table.

The problem I have is the way IIS sends on the "not found" information.
Example...

http://www.mysite.com/place/missingpage.asp

is sent on to my custom 404 page by IIS via the Querystring as:

404;http://www.mysite.com/place/missingpage.asp

Which is fine,until I add a Quesrystring to the original URL:

http://www.mysite.com/place/missing...var=10&qwert=11

still comes through as

404;http://www.mysite.com/place/missingpage.asp

without the extra Querystring data from the original URL.

Having researched this online it seems many people have this problem and
looks like IIS 6 solves it. However I've also read of people with IIS 6
having the same issue, and of people with IIS 5 that don't have the problem.
(for exmaple: http://www.webmasterworld.com/forum47/1829.htm)

What I'd like to know is if there is definately no way of achieving this
behaviour on IIS 5 without the use of any extra isapi filters. Perhaps a
server configuration option or something...

Custom Date Formatting In ASP
I would like to generate a custom date format for my ASP output ... i.e.: "5 Apr 06" instead of the "05 April 2006" that the British English 2057 LCID automatically gives me. In other words, I would like a 3 digit month and two digit year.

The code on my page reads as follows now ...

<%= DoDateTime((Recordset1.Fields.Item("StartDate").Value), 1, 2057) %>

Custom MIME Type
I have some simple asp code to send a response to the client with aparticular ContentType defined, code shown below:

Response.Clear
Response.ContentType = "application/x-custom"
Response.Write "<?xml version='1.0' encoding='UTF-8'?><testing/>"
Response.Flush

I have a client side ActiveX control implementing IPersistMoniker that isregistered to handle this MIME type. This seems to work fine on some machines and not others. On some of my machines, the control is not instantiated at all. Instead, a blank page is shown in the browser. If I change the ContentType above to something like "text/xml", the response is shown correctly in the browser. This leads me to believe there is a problem with the client mime handler, but it seems to work on most machines.

Custom Validation Controls
if its possible to create a custom validation control which can enable or disable any given control depending on whether a checkbox is checked or not?Currently my solution involves posting back to the form which in turn enables or disables appropriately.

I have noticed with some of the standard validation controls that the screen does not refresh (postback) for the error message to display.Is it possible to enable/disable a control instead of displaying an error message, and do this without posting back to the form to refresh?I have seen some custom controls which can do this for sale, but they cost $$$.

Creating Custom Controls
i have created a custom control in vs.net, how shall i add that one to my asp.net page. do i need to create new web control library project for creating custom web controls, what i have done is, i just included that one as another class, i am confused about how i would specify the value for the assembly attribute.

Custom Home Pages
I'm looking to do custom homepages based on user login, something like googles homepage, But not as drastic. I'm not sure how i should go about this. any suggestions on the thought process would be nice .

Custom HTTP Header
I have added a http header on a virtual directory. (Content-Type text/html; Charset=utf-8). Is there any way of clearing this or override this in one asp page? In this page I will download a tab separated text file.

I don't want to show this in the browser. I try to set this content type from my COM+ component which is invoked by this asp page. Response.clear will not clear header information (and I guess the added http header is added just before the result is sent to the browser).

If IsNN6 Then
GetObjectContext("Response").contentType = "application/octet-stream"
Else
GetObjectContext("Response").contentType = "application/save"
End If

Custom Scripting Components
I'm trying to alter a asp web site that I've taken over from another programmer. The previous programmer left under bad circustances and I am unable to find where she did her custom scripting components. Anyone have any suggestion on what to do?

ASP/Apache/Linux/ Custom Web App
My company developed a website application that interacts with a database (SQL, ORA, Access).

The pages are written in ASP (classic), but the kicker is that the pages use a .dll to interface with the database. Obviously this is fine for Windows based computers, but what about Linux, is this even possible?

Instantiating Object From Custom ActiveX DLL
I've been provided with a custom ActiveX DLL (written in C++) that reads a certiifcate to generate a signature for a passed XML string, and I'm having trouble instantiating it.
The DLL is registered succesfully on my computer and I've explicitly granted IUSR_<machinename> to use it. Code:

Custom Form--upload Area
I am wondering if it is possible to make an area on a cusomt form were a user can upload a document and be able to email the form along with the document as an attachment. I alreay have the form developmed and it emails to the appropriate people, but now they want to be able to upload a document and receive it as an attachment in their email.

Does anyone know how to do this?

Testing Custom Membership Provider
How can I test a membership provider using a test project within VS 2005? Basically I am stuck trying to read the custom app.config file I added to the project with a <system.websection.

I think the testing environment is more structured than creating a web application to test the provider.

Custom Connection To Access Database
I have an .ASP page with a form on it, which I want the info input into the form to be submitted to a database. I am trying to create a Custom Connection String in Dreamweaver but I am having a hard time. I set the path correctly, etc.

Is it not working because I am trying to run this with an Access database and it's on a Linux server? I thought i'd start out simple before I post a million pages of details.

Regular Expressions & Custom Tags
I have created a template system, and someone pointed a script out that would let me create simple links by using [link]home|http://www.sitepoint.com[/link] which would convert anything between those custom tags into a link, with home being the text displayed and the web address the location.

Now I need a way to be able to edit the script, well the RE Pattern so I can use it for other things. Code:

Gives Page Error
During a Script session, when I hit the browser 'Back' button I get Pag
error.
I get this error only from a couple of the pages.
Would anyone what the problem could be? or how to go about fixin
this?

Error 400 Asp Page
In random case I have the problem of Error 400 bad request. My appliction
is asp pages with visual script, internet explorer 6.0, com+, and sqlserver
2000 as database.

Error Page
i have a link from page1 to page2. this link uses a querystring to transfer data. usually i have no problems using querystring t transfer data. bt for the first time page2 does not display.an eror page displays. i had a look at the properties of the error page to see if the url is correct and i noticed somthng iv never seen before.this is

it:
res://C:WINDOWSSystem32shdoclc.dll/http_500.htm#http://gisserver/verslag/Trans_Edit...tId=141&TId=264

Error On Web Page
what this error means?

HTTP Error 404 - File or directory not found.
Internet Information Services (IIS)

Use Error Page
I'd like to discuss the concept of creating an error page which will handle the website content display. I need it for Search Engine Optimization. The problem is that SE does not read pages with querystrings like:

website.com/mypage.asp?id=123.

Therefore, there is a solution to it to make a link look like website.com/mypage/id/123 (which does not exist), and error page will display the content of website.com/mypage.asp?id=123 page, if url is website.com/mypage/id/123...Do you think that is a good practice to implement? Can anyone show the example? Should I use Msxml2.ServerXMLHTTP to pull another webpagecontent?

Error Page
I found some websites display nice pages other than a plain error page when you type a wrong URL. How can I do that?

Error In Asp Page
Hey i am getting the following error in my asp page

Microsoft VBScript runtime (0x800A000D)
Type mismatch
/newfolder/temp1.asp, line 135

temp1.asp
invamt = qty * price -----> line 135
qty and price come from the database. i am using Microsoft SQL Server. qty has the value 100 and price has the value 600.00. This same code is running fine with Msaccess 2000 and asp. But its giving me error if i use SQL server and asp. i tried this code with sql server in vb, there also its running fine.

IIS Error ASP Error Page
I have a strange error with my script. I am trying to upload a file to the webserver using clsupload and i egt the following error when the script runs:
The page cannot be displayed
The page you are looking for is currently unavailable. The Web site might be experiencing technical difficulties, or you may need to adjust your browser settings. Please try the following:
If you typed the page address in the Address bar, make sure that it is spelled correctly.If you are trying to reach a secure site, make sure your Security settings can support it.Click the Back button to try another link.
Write Error
I tried usploading using another file upload component and got the same error which makes me thinks it could be IIS permissions related. it doesnt even class it as a 500 error it just says this.

Error Page E-mail
What i'm trying to do is if a person hits an error page, these are differnt error pages not the 404's or 500's.. When they hit that page i want it to send me an e-mail with all the information that was displayed on that page.

Can i do this in java or asp?

Stop ASP Page On Error
How do you do the following?

if(true)
response.write "There was a problem."
***STOP HERE***

more code
more code
more code

Creating An Error Page
my problem is:

i am creating a appointment calender everything is fine except for one page
what I want is to have no duplicate times for example if someone books 2opm on tuesday 22 of june no one else can book the same time.

I have set the database to not allow duplicate entries but I need a page that if someone tries to book the same time it will say sorry that time is taken.

Page 2 - Mappath Error
Server.mappath always returns an absolute disk path to a file, regardless of if you pass a web path that starts from the root of the web or relative to the current directory.

chazukka's example will work fine as long as the script is executed from a page that's in the proper directory, i.e., a page that has subdirectory named database and the mdb file is in that subdirectory.

For example, assuming you're running /myweb/somewhere/myfolder/myasp.asp in a directory /myweb/somewhere/myfolder and the database file is in /myweb/somewhere/myfolder/database/mydb.mdb then

diskp1 = server.mappath("database/mydb.mdb")
diskp2 = server.mappath("/myweb/somewhere/myfolder/database/mydb.mdb")

diskp1 and diskp2 will have identical contents

Error With Manageproducts.asp Page
Im getting this error:

Microsoft JET Database Engineerror '80004005'

Field 'eventDisplay.art_PicThumb' cannot be a zero-length string. /manageproducts.asp, line 160

From this code:

Page Error (Can't Be Found)
I am trying to send two values to a page, this is very similar to a previous post that I saw on this newsgroup, not sure if it was resolved or not.

"Results.ASP" exists, I am thinking there is something wrong with my syntax.

onchange="parent.usbWindow.location.href='connector1=<%=cnt1%>&Results.asp?T
ype='+this.value;"

Error 404 Redirect Page
how can i turn the error 404 page into a template of my choosing in asp microsoft server hosting?

Display Error Page
i would just like to know if there is a way to check if the table exists in the database?

if it does the search query would be carried out but if it does not exist the user would just be redirected to an error page.

Error On Registration Page
I have an Insert Into statement that is working well, but there is no form validation on the text boxes. Is there a "blanket" error check that I can add to the script that performs a data/number check before submitting to the Db?


Copyright © 2005-08 www.BigResource.com, All rights reserved