?
Solved

Capture Error Page Url

Posted on 2012-09-04
2
Medium Priority
?
577 Views
Last Modified: 2012-09-04
I've added the code below to my web.config.

How do I capture the url they tried to use?

Example...if they tried to manually type in Home.aspx, and they actually typed in Hone.aspx and end up at my oops page.

<customErrors mode="On" defaultRedirect="~/ErrorPages/oops.aspx?type=error">
            <error statusCode="404" redirect="~/ErrorPages/oops.aspx?type=404"/>
            <error statusCode="405" redirect="~/ErrorPages/oops.aspx?type=405"/>
            <error statusCode="406" redirect="~/ErrorPages/oops.aspx?type=406"/>
        </customErrors>

Open in new window

0
Comment
Question by:lrbrister
2 Comments
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 2000 total points
ID: 38364367
You can either use the Request.URLReferrer or Server.GetLastError()
0
 

Author Closing Comment

by:lrbrister
ID: 38365159
Thanks
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

840 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