گروه فناوری پرند - Parand Tech Group

Solve Recent Security Issue of ASP.NET

According to KB887459, you can simply solve the issue by adding these lines to your Global.asax:
Sub Application_BeginRequest(Sender as Object, E as EventArgs)
If (Request.Path.IndexOf(chr(92)) >= 0 OR _
System.IO.Path.GetFullPath(Request.PhysicalPath) <> Request.PhysicalPath) then
Throw New HttpException(404, "Not Found")
End If
End Sub

Print | posted on Thursday, October 07, 2004 5:01 PM

Comments on this post

# re: Solve Recent Security Issue of ASP.NET

Requesting Gravatar...
Cool,

I will use it from now on but do you mind explain the security issue with asp.net that this code solves

Thanks for bringing this up
Left by Web developers on Aug 17, 2009 7:02 PM

Your comment:

 (will show your gravatar)
 
Please add 5 and 3 and type the answer here: