MVC 添加 httpHandlers 支持 .aspx 页面访问

<?xml version="1.0"?>
<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->
<configuration>
  <system.web>
    <compilation debug="true" targetFramework="4.0"/>
    <httpRuntime/>
    <httpHandlers>
      <add verb="*" path="*.aspx" type="System.Web.UI.PageHandlerFactory" />
 
    </httpHandlers>
    <pages controlRenderingCompatibilityVersion="4.0"/>
  </system.web>
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
    <validation validateIntegratedModeConfiguration="false"/>
    <urlCompression doStaticCompression="true" doDynamicCompression="false"/>
    <handlers>
      <add path="*.aspx" name="DefaultHttpApplication" type="System.Web.UI.PageHandlerFactory" verb="*" />
 allowPathInfo="true"/>
     </handlers>
  </system.webServer>
</configuration>

 

posted @ 2015-06-23 14:37  释迦苦僧  阅读(592)  评论(0编辑  收藏  举报