Author: Misfit Geek: msft | Posted on: 2/10/2010 3:38:00 PM | Views : 1015

So I’m building an ASP.NET application to host Podcasts and in the post submission logic I want folks to be able to submit markup, but not JavaScript. ASP.NET automatically traps suspicious posts to the server, but the results have to unfortunate defines. First is the ugly resulting page. We’ve all seen them. And the second is that I may want to be able to add some SPECIFIC logic to handling that Security exception because it probably means someone is intentionally trying to hack my web site. It turns out that this is another that ASP.NET makes easy to solve. First, add a Global.asax file to your solution and code the global Application_Error event handler as follows. 1: protected void Application_Error( object sender, EventArgs...(read more) ...

Go to the complete details ...