Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# VB ASP ASP.NET
Hello ,
 
I want to show friendly error Message on any exception on any Error within application scope or IIS scope. For this I have done following thing in application.
 
1-I have proper check for exception in my application every exception is catch and user friendly error message appear fine.
2-i have put the customError Page ON and routing to defaultErrorpage and this work also fine.
 
Issue:
When change the virtual directory name deploy on IIS I got
The resource cannot found and I believe this page is created dynamically.
 
I tried to get the Error in Global.ASAX but as path is not correct so application scope does not start
 
Correct path
http://localhost/myApp/default.aspx
wrong path
http://localhost/mywrongapp/default.aspx
 

Please suggest how to handle this error.
Posted 18-Sep-13 20:08pm
Edited 18-Sep-13 20:53pm
v2
Comments
shabarnadh.vempati at 19-Sep-13 8:54am
   
http://www.asp.net/web-forms/tutorials/deployment/deploying-web-site-projects/displaying-a-custom-error-page-cs
mahboobs at 19-Sep-13 9:13am
   
Thanks for reply
i have read this article and implement accroding to this .
but what if my URL is not write e.g my virtual directory path is not correct then IIS output some Error as i mentioned how to handle this
becuse of path is not correct this error cannot be catch in applicaiotn level

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 8,284
1 Sergey Alexandrovich Kryukov 7,327
2 DamithSL 5,614
3 Manas Bhardwaj 4,986
4 Maciej Los 4,920


Advertise | Privacy | Mobile
Web03 | 2.8.1411023.1 | Last Updated 19 Sep 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100