ASP.NET 2.0 and 4.0 seem to treat the root url differently in Forms Authentication

一笑奈何 提交于 2019-11-27 23:16:16

Found the culprit. As part of our WebDeploy 2.0/WebMatrix server side changes this hotfix is recommended by the WebMatrix Server Validator:

MS KB:980368 - A update is available that enables certain IIS 7.0 or IIS 7.5 handlers to handle requests whose URLs do not end with a period

Installing this hot fix causes ASP.NET 4.0 to change the Forms Authentication behaviour where just the domain name part of a url is requested.

Update 1:

This QFE is also part of Windows 2008R2 SP1 and will also break ASP.NET 4.0's Forms Authentication in the manner described above.

Update 2:

In addition this also breaks default document handling when running classic ASP applications in an application pool configured to run as ASP.NET & Classic Pipeline mode.

The server returns a 404.2 - Not Found error.

The same breaking change applies to Windows 2008R2 SP1.

Update 3:

I reported this to MS PSS and they confirmed a breaking change in behaviour. They created this KB article in response to us (and presumably others) having been affected by it:

Web services may fail on Microsoft Internet Information Services (IIS) 7.5 and Windows 7 Service Pack 1 with .NET Framework 4.0 due to extensionless URL handlers

In my own case I basically remove (or advise customers to) the extensionless handlers if impacted by this problem:

<configuration>
  <system.webServer>
    <handlers>
      <remove name="ExtensionlessUrl-Integrated-4.0" />
      <remove name="ExtensionlessUrl-ISAPI-4.0_64bit" />
      <remove name="ExtensionlessUrl-ISAPI-4.0_32bit" />
    </handlers>
  </system.webServer>
</configuration>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!