The Artima Developer Community
Sponsored Link

.NET Buzz Forum
Microsoft fixes Canonicalization issues with ASP.NET

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Sudhakar Sadasivuni

Posts: 418
Nickname: sadasivuni
Registered: Nov, 2003

Sudhakar Sadasivuni is a Microsoft .NET MVP, a project engineer for Wipro technologies.
Microsoft fixes Canonicalization issues with ASP.NET Posted: Oct 11, 2004 5:30 PM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Sudhakar Sadasivuni.
Original Post: Microsoft fixes Canonicalization issues with ASP.NET
Feed Title: {Sudhakar's .NET Dump Yard;}
Feed URL: http://www.asp.net/err404.htm?aspxerrorpath=/ssadasivuni/rss.aspx
Feed Description: using Sudhakar.Dotnet.Blog.Main;
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Sudhakar Sadasivuni
Latest Posts From {Sudhakar's .NET Dump Yard;}

Advertisement

Microsoft has released tools & Code to check and fix the Canonicalization issue which I have mentioned in the previous post.

01. A code snippet to programmatically check for these issues in ASP.NET
(To be added in Application_BeginRequest event handler of Global.asax file)

void Application_BeginRequest(object source, EventArgs e) {
    if (Request.Path.IndexOf('\\') >= 0 ||
        System.IO.Path.GetFullPath(Request.PhysicalPath) 
            != Request.PhysicalPath) {
        throw new HttpException(404, "not found");
    }
}

02.
A HTTP Module to do this thing automatically for you..

DownloadDownload the VPModule.msi package now.

What the VPModule.msi does

The installer first extracts a file that is named Microsoft.Web.ValidatePathModule.dll. The installer then updates all the Machine.config files that exist on the system so that the files have an entry that looks like the following:

 <system.web>
   <httpModules>
      <add name="ValidatePathModule" type="Microsoft.Web.ValidatePathModule,
Microsoft.Web.ValidatePathModule,Version=1.0.0.0, Culture=neutral,
PublicKeyToken=eba19824f86fdadd"/>
</httpModules>
</system.web>

The installer then adds the Microsoft.Web.ValidatePathModule.dll file to the Global Assembly Cache (GAC).

Related KB Articles

887459 Programmatically check for canonicalization issues with ASP.NET
318785 Determine whether service packs are installed on the .NET Framework
887289 HTTP Module to check for canonicalization issues with ASP.NET

Read: Microsoft fixes Canonicalization issues with ASP.NET

Topic: Movin' out Previous Topic   Next Topic Topic: MailCasting

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use