{"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"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Don&#039;t you love the real ASP.Net exception page? - Reza Alirezaei&#039;s Blog %<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blogs.devhorizon.com\/reza\/2007\/01\/16\/dont-you-love-the-real-aspnet-exception-page\/\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Reza Alirezaei\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/blogs.devhorizon.com\\\/reza\\\/2007\\\/01\\\/16\\\/dont-you-love-the-real-aspnet-exception-page\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blogs.devhorizon.com\\\/reza\\\/2007\\\/01\\\/16\\\/dont-you-love-the-real-aspnet-exception-page\\\/\"},\"author\":{\"name\":\"Reza Alirezaei\",\"@id\":\"https:\\\/\\\/blogs.devhorizon.com\\\/reza\\\/#\\\/schema\\\/person\\\/cdbb24d283697a65951cb4a14e474938\"},\"headline\":\"Don&#8217;t you love the real ASP.Net exception page?\",\"datePublished\":\"2007-01-16T10:27:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/blogs.devhorizon.com\\\/reza\\\/2007\\\/01\\\/16\\\/dont-you-love-the-real-aspnet-exception-page\\\/\"},\"wordCount\":290,\"commentCount\":0,\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/blogs.devhorizon.com\\\/reza\\\/2007\\\/01\\\/16\\\/dont-you-love-the-real-aspnet-exception-page\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/blogs.devhorizon.com\\\/reza\\\/2007\\\/01\\\/16\\\/dont-you-love-the-real-aspnet-exception-page\\\/\",\"url\":\"https:\\\/\\\/blogs.devhorizon.com\\\/reza\\\/2007\\\/01\\\/16\\\/dont-you-love-the-real-aspnet-exception-page\\\/\",\"name\":\"Don't you love the real ASP.Net exception page? - Reza Alirezaei's Blog %\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blogs.devhorizon.com\\\/reza\\\/#website\"},\"datePublished\":\"2007-01-16T10:27:00+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/blogs.devhorizon.com\\\/reza\\\/#\\\/schema\\\/person\\\/cdbb24d283697a65951cb4a14e474938\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/blogs.devhorizon.com\\\/reza\\\/2007\\\/01\\\/16\\\/dont-you-love-the-real-aspnet-exception-page\\\/\"]}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/blogs.devhorizon.com\\\/reza\\\/#website\",\"url\":\"https:\\\/\\\/blogs.devhorizon.com\\\/reza\\\/\",\"name\":\"Reza Alirezaei's Blog\",\"description\":\"Blogging from the field!\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/blogs.devhorizon.com\\\/reza\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/blogs.devhorizon.com\\\/reza\\\/#\\\/schema\\\/person\\\/cdbb24d283697a65951cb4a14e474938\",\"name\":\"Reza Alirezaei\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3ba940d84e0ecb909e62e93df4c56daf0395c7e53c914467ab2ee73124a7d7b6?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3ba940d84e0ecb909e62e93df4c56daf0395c7e53c914467ab2ee73124a7d7b6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3ba940d84e0ecb909e62e93df4c56daf0395c7e53c914467ab2ee73124a7d7b6?s=96&d=mm&r=g\",\"caption\":\"Reza Alirezaei\"},\"url\":\"https:\\\/\\\/blogs.devhorizon.com\\\/reza\\\/author\\\/rezaa\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Don't you love the real ASP.Net exception page? - Reza Alirezaei's Blog %","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blogs.devhorizon.com\/reza\/2007\/01\/16\/dont-you-love-the-real-aspnet-exception-page\/","twitter_misc":{"Written by":"Reza Alirezaei","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/blogs.devhorizon.com\/reza\/2007\/01\/16\/dont-you-love-the-real-aspnet-exception-page\/#article","isPartOf":{"@id":"https:\/\/blogs.devhorizon.com\/reza\/2007\/01\/16\/dont-you-love-the-real-aspnet-exception-page\/"},"author":{"name":"Reza Alirezaei","@id":"https:\/\/blogs.devhorizon.com\/reza\/#\/schema\/person\/cdbb24d283697a65951cb4a14e474938"},"headline":"Don&#8217;t you love the real ASP.Net exception page?","datePublished":"2007-01-16T10:27:00+00:00","mainEntityOfPage":{"@id":"https:\/\/blogs.devhorizon.com\/reza\/2007\/01\/16\/dont-you-love-the-real-aspnet-exception-page\/"},"wordCount":290,"commentCount":0,"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/blogs.devhorizon.com\/reza\/2007\/01\/16\/dont-you-love-the-real-aspnet-exception-page\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/blogs.devhorizon.com\/reza\/2007\/01\/16\/dont-you-love-the-real-aspnet-exception-page\/","url":"https:\/\/blogs.devhorizon.com\/reza\/2007\/01\/16\/dont-you-love-the-real-aspnet-exception-page\/","name":"Don't you love the real ASP.Net exception page? - Reza Alirezaei's Blog %","isPartOf":{"@id":"https:\/\/blogs.devhorizon.com\/reza\/#website"},"datePublished":"2007-01-16T10:27:00+00:00","author":{"@id":"https:\/\/blogs.devhorizon.com\/reza\/#\/schema\/person\/cdbb24d283697a65951cb4a14e474938"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blogs.devhorizon.com\/reza\/2007\/01\/16\/dont-you-love-the-real-aspnet-exception-page\/"]}]},{"@type":"WebSite","@id":"https:\/\/blogs.devhorizon.com\/reza\/#website","url":"https:\/\/blogs.devhorizon.com\/reza\/","name":"Reza Alirezaei's Blog","description":"Blogging from the field!","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blogs.devhorizon.com\/reza\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/blogs.devhorizon.com\/reza\/#\/schema\/person\/cdbb24d283697a65951cb4a14e474938","name":"Reza Alirezaei","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/3ba940d84e0ecb909e62e93df4c56daf0395c7e53c914467ab2ee73124a7d7b6?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/3ba940d84e0ecb909e62e93df4c56daf0395c7e53c914467ab2ee73124a7d7b6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3ba940d84e0ecb909e62e93df4c56daf0395c7e53c914467ab2ee73124a7d7b6?s=96&d=mm&r=g","caption":"Reza Alirezaei"},"url":"https:\/\/blogs.devhorizon.com\/reza\/author\/rezaa\/"}]}},"_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}]}}