【问题标题】:HTTP/1.1 New Application Failed when allowSessionState is set to false in web.config当 web.config 中的 allowSessionState 设置为 false 时,HTTP/1.1 新应用程序失败
【发布时间】:2013-06-16 02:04:29
【问题描述】:

我有一个经典的 ASP 网站,我刚刚移动到新服务器,并且会话状态在 SSL 和非 SSL 之间丢失。

我知道有一个 IIS 设置,但我无法访问 IIS,因为它是共享主机。

我发现在 web.config 中有一种方法可以做到这一点:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
    <asp>
      <session keepSessionIdSecure="false" />
    </asp>
  </system.webServer>
</configuration>

我这样做了,但是当这个设置在 web.config 中时,没有提供经典 ASP 页面(ASP.NET 和静态文件都可以),只有消息“HTTP/1.1 新应用程序失败”。

是否有其他设置阻止了此更改?

【问题讨论】:

    标签: iis asp-classic


    【解决方案1】:

    问题解决了。对于其他人的信息,这仅在包含在位置标签中时才有效:

    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
      <location path="Default Web Site">
        <system.webServer>
          <asp>
            <session keepSessionIdSecure="false" />
          </asp>
        </system.webServer>
       </location>
    </configuration>
    

    【讨论】:

      【解决方案2】:

      要在 IIS Express 中解决此问题,请找到配置文件,在我的例子中是 C:\Users\username\Documents\IISExpress\config\applicationhost.config。 备份后,在文本编辑器中打开并找到该行

      <section name="asp" overrideModeDefault="Deny" />
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2011-06-02
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多