|
-
Jul 14th, 2003, 01:47 PM
#1
Is there a way to set one error page for all errors?
well the bookie that I'm reading is creating a separate error page for different error numbers. I'm wondering if it is possible to have one error page that would also desplay the specific error that happened. IE, errorReport.aspx would tell the user what error was raised... no idea, is it possible?
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Jul 14th, 2003, 02:02 PM
#2
Frenzied Member
well, you could probably write you own error class. I wrote one for asp to work with the template system I use. I haven't rewritten all my stuff to work with .NET yet, so I'm not sure it will work correctly. I can attach the error class I created for asp if you like.
Being educated does not make you intelligent.
Need a weekend getaway??? Come Visit
-
Jul 14th, 2003, 02:12 PM
#3
Originally posted by Memnoch1207
well, you could probably write you own error class. I wrote one for asp to work with the template system I use. I haven't rewritten all my stuff to work with .NET yet, so I'm not sure it will work correctly. I can attach the error class I created for asp if you like.
sure, but only if your class is in asp.net 
btw this bookie says that I can use an error page by changing the DefaultRedirect tag in web.config (<customErrors...DefaultRedirect=errorpage)
I'm wondering how is it possible to figure out the error that was raised if every error is being redirected to a single page. Is it possible to POST the error code to the page?
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Jul 14th, 2003, 02:24 PM
#4
Frenzied Member
my error class hasn't been rewritten yet to work with .NET
Being educated does not make you intelligent.
Need a weekend getaway??? Come Visit
-
Jul 15th, 2003, 11:25 AM
#5
PowerPoster
try this:
Code:
Exception[] ers = HttpContext.Current.AllErrors;
foreach (Exception e in ers)
Response.Write(e.Message);
-
Jul 15th, 2003, 04:02 PM
#6
hmm lethal, I think HttpContext.Current.AllErrors will only get the errors that have happened in the CURRENT page.
This is what I have in web.config
<customErrors mode="RemoteOnly"
defaultRedirect="errorReport.aspx"
/>
so when an exception is thrown, it will load errorReport.aspx... I tried your code in that page, but the AllErrors method returns nothing since no errors happened in that page.
This is the redirected URL, it tells me what page the error is comming from, but is there a way to also determine what the error was?
http://..../WebApplication2/errorReport.aspx?aspxerrorpath=/webapplication2/journal/Default.aspx
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Jul 15th, 2003, 04:10 PM
#7
PowerPoster
Yeah, I didn't test the code, I thought maybe it would work. I'll do some more diggin' around.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|