{"id":1145,"date":"2007-01-16T05:27:00","date_gmt":"2007-01-16T10:27:00","guid":{"rendered":"http:\/\/blogs.devhorizon.com\/reza\/?p=1145"},"modified":"2007-01-16T05:27:00","modified_gmt":"2007-01-16T10:27:00","slug":"dont-you-love-the-real-aspnet-exception-page","status":"publish","type":"post","link":"https:\/\/blogs.devhorizon.com\/reza\/2007\/01\/16\/dont-you-love-the-real-aspnet-exception-page\/","title":{"rendered":"Don&#8217;t you love the real ASP.Net exception page?"},"content":{"rendered":"<p><P>Tired of seeing custom\/friendly exception descriptions&nbsp;(such as &#8220;An unexpeted error has occured&#8221;)&nbsp;in your sharepoint sites specially when you are developing master pages or web parts? why not trying this:<\/P><br \/>\n<P>1) Locate the web.config of your site.<\/P><br \/>\n<P>2) Find &lt;SafeMode&gt;&nbsp;element and enable the CallStack attribute by changing CallStack=&#8221;false&#8221; to CallStack=&#8221;true&#8221;. This ensures that the call stack and an exception message is shown when a system-level exception occurs. You can optionally change AllowPageLevelTrace=&#8221;false&#8221; to AllowPageLevelTrace=&#8221;true\u201d for more monitoring features.<\/P><br \/>\n<P><STRONG>Warning<\/STRONG>: Setting the CallStack attribute to true enables this functionality for all local and *remote* clients. At this point there is no way to differentiate between these two scopes, so think twice about the information disclosure while setting this attribute.<\/P><br \/>\n<P><BR>3) Find &lt;customErrors&gt; and change it to&nbsp; &lt;customErrors mode=&#8221;Off&#8221; \/&gt;or <\/P><br \/>\n<P>Warning: Setting the mode attribute to &#8220;On&#8221; enables this functionality for all local and *remote* clients.&#8221;RemoteOnly&#8221; Specifies that custom errors are shown&nbsp; only to the remote clients, and that ASP.NET generic errors to the local clients.RemoteOnly mode is usually combined with defaultRedirect attribute in&nbsp; <BR>production enviroment to redirect the user to a custom generic error page such as defaultRedirect=&#8221;GenericError.htm&#8221;.<\/P><br \/>\n<P>&lt;customErrors defaultRedirect=&#8221;GenericError.htm&#8221; mode=&#8221;RemoteOnly&#8221;&gt;<BR>&nbsp;&lt;error statusCode=&#8221;500&#8243; redirect=&#8221;InternalError.htm&#8221;\/&gt;<BR>&lt;\/customErrors&gt;<\/P><br \/>\n<P>4) Find compilation element&nbsp;and change it to &lt;compilation batch=&#8221;false&#8221; debug=&#8221;true&#8221;&gt;&nbsp;to have the .Net framework produce debug binaries rather than release (retail) binaries. Make sure you turn this off when you go live in production.<\/P><br \/>\n<P>5)IISRESET or &#8220;%systemroot%sytem32IISAPP.vbs \/a AppPoolNameUnderwhichSiteIsRunning&nbsp; \/r&#8221;<\/P><br \/>\n<HR align=left width=\"50%\" noShade SIZE=10><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Tired of seeing custom\/friendly exception descriptions&nbsp;(such as &#8220;An unexpeted error has occured&#8221;)&nbsp;in your sharepoint sites specially when you are developing master pages or web parts? why not trying this: 1) Locate the web.config of your site. 2) Find &lt;SafeMode&gt;&nbsp;element and enable the CallStack attribute by changing CallStack=&#8221;false&#8221; to CallStack=&#8221;true&#8221;. This ensures that the call stack [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-1145","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/posts\/1145","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/comments?post=1145"}],"version-history":[{"count":0,"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/posts\/1145\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/media?parent=1145"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/categories?post=1145"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/tags?post=1145"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}