This is a discussion on If you Receive error messages when you try to upload a file to an ASP.NET Web page b within the ASP and ASP.NET Programming forums, part of the Web Development category; Receiving messages when I try to upload a file to an ASP.NET Web page by using the FileUpload control ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Receiving messages when I try to upload a file to an ASP.NET Web page by using the FileUpload control in IIS 5.1 Last edited by kingmaker : 07-24-2007 at 12:10 AM. |
| Sponsored Links |
| |||
| Global.asax file of the Web application to capture the error and redirect the user to a custom error page. The Application_Error method may appear similar to one of the following code examples. protected void Application_Error(Object sender, EventArgs e) { // Code that runs when an unhandled error occurs. // Determine whether the request originates from the file upload Web page (FileUpload.aspx). if (Request.Path.EndsWith("FileUpload.aspx ")) { // Obtain the error details. HttpException httpEx = Server.GetLastError() as HttpException; // Verify the expected error. if (httpEx.GetHttpCode() == 500 && httpEx.ErrorCode == -2147467259) { Server.ClearError(); // Redirect the user to the custom error page (ErrorPage.aspx). HttpContext.Current.Response.Redirect("ErrorPage.a spx"); } } } |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| upload file | Kirubhananth | ASP and ASP.NET Programming | 5 | 03-13-2008 03:19 AM |
| Configuration Error Messages - Meanings | arjkhanna | Computer Hardware | 0 | 01-16-2008 11:44 PM |
| How can I extract just the extension file name from a forms file upload field? | itbarota | HTML, CSS and Javascript Coding Techniques | 1 | 10-22-2007 08:32 AM |
| Can I suppress JavaScript error messages? | itbarota | HTML, CSS and Javascript Coding Techniques | 1 | 09-13-2007 03:09 AM |
| How to read inbox messages in windows mobile and create it as a text file using C#? | mobilegeek | Windows Mobile | 4 | 08-17-2007 07:42 AM |