Donate

This Site Can’t Provide a Secure Connection Localhost Sent An Invalid Response In ASP Classic Website

Good afternoon fellow programmers!

In the event that you added an ASP Classic site to Visual Studio and when you debug or run the site, it produced an error such as "This site can’t provide a secure connection localhost sent an invalid response. Try running Windows Network Diagnostics. ERR_SSL_PROTOCOL_ERROR". The fix to this error is to comment or remove the rewrite rule in web.config. A sample rewrite node looks like this in web.config.
<?xml version="1.0"?>
<configuration>
  <system.webServer>
    <!--<rewrite>
      <rules>
        <rule name="Redirect to HTTPs"  stopProcessing="true">
          <match url="(.*)"/>
          <conditions>
            <add input="{HTTPS}" pattern="^OFF$"/>
          </conditions>
          <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="SeeOther"/>
        </rule>
      </rules>
    </rewrite>-->
  </system.webServer>
  <system.web>
    <compilation debug="true"/>
  </system.web>
</configuration>

Cheers! :)

Comments

  1. Replies
    1. Hi, the solution is to remove or comment out the node in web.config. See updated answer above.

      Delete

Post a Comment

Donate

Popular Posts From This Blog

WPF CRUD Application Using DataGrid, MVVM Pattern, Entity Framework, And C#.NET

How To Insert Or Add Emojis In Microsoft Teams Status Message

TypeScript Error Or Bug: The term 'tsc' is not recognized as the name of a cmdlet, function, script file, or operable program.