I am running a simple ASP.net web application. Chrome is showing the below error after running this.
localhost sent an invalid response.
Try running Windows Network Diagnostics.
ERR_SSL_PROTOCOL_ERROR
but my application is on http, not https.
but the URL is loading with https://localhost:54056/
config is also pointing to http only.
<site name="tan-square" id="2">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="C:\Users\Myfolder\OneDrive\Downloads\tan-square" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:54056:localhost" />
</bindings>
</site>
I don't understand where the problem is. Why is it loading with https?
First, check your site web binding detail by the following detail:
1)Open visual studio, select your project.
2)right-click on the project and select properties.
3)under the Web tab and check your project url.
make sure there no such setting in your web.conifg file like below:
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="Strict-Transport-Security"
value="max-age=16070400; includeSubDomains" />
</customHeaders>
</httpProtocol>
</system.webServer>
When the browser sees this, it will remember, for the given number of seconds, that the current domain should only be contacted over HTTPS. In the future, if the user types http:// or omits the scheme, HTTPS is the default.
Clear your browser cache. another thing you could try to find the cause is open chrome. type chrome://net-internals/#hsts in url and querying for localhost:
The query shows “localhost” as being in the list of domains in the HSTS set.
The solution is deleting the domain from the cache. type “localhost” into the Delete domain text field, and hit Delete. After doing that when you query for “localhost” again you will receive a “Not found”.
Just create new Virtual Directory:
1-right-click on the project and select properties.
2-under the Web tab change your project url by changing the localhost to http://localhost:48333/ .
3- click Create Virtual Directory.
4- make sure you don't have this in web.config
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="Strict-Transport-Security" value="max-age=16070400; includeSubDomains"/>
</customHeaders>
</httpProtocol>
</system.webServer>
If you are running .net core, just run Visual Studio as admin, or go to bin\Debug\netcoreapp3.1 directory, and issue. Wierdly, .net core. .net core surprisingly dont give any error.
%USERPROFILE%\\.dotnet\\tools\\dotnet-lambda-test-tool-3.1.exe --port 5059
change port number to whatever.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With