johna
johna

Reputation: 10752

HTTP/1.1 New Application Failed when allowSessionState is set to false in web.config

I have a classic ASP website that I just moved to a new server and session state is being lost between SSL and non-SSL.

I understand there is a IIS setting for this, but I don't have access to IIS as it is shared hosting.

I found that there was a way to do this in web.config:

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

I did this but when this setting is in web.config no Classic ASP pages are served (ASP.NET and static files are ok), just the message "HTTP/1.1 New Application Failed".

Is there some other settings that are preventing this change?

Upvotes: 2

Views: 7777

Answers (2)

user4791978
user4791978

Reputation: 11

To fix this in IIS Express, find the configuration file, in my case at C:\Users\username\Documents\IISExpress\config\applicationhost.config. After making a backup, open it in a text editor and find the line

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

Upvotes: 1

johna
johna

Reputation: 10752

Problem solved. For anyone else's information, this worked only when wrapped in the location tag:

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

Upvotes: 3

Related Questions