简体   繁体   中英

Visual Studio 2019 Default Web Apps Broken

I'm using VS Studio 2019 16.8.5.

I loaded a .NET 5.0 core web app someone else created, but could not get it to work when I ran it in VS. I thought it was their project, until I went and created a brand new .NET 5.0 web app with all default settings. I was expecting the welcome page as always, but instead got the same error. The browser just shows an error page saying "Hmmm… can't reach this pageThe connection was reset.". There are no errors in the console. I don't see any evidence that code is being hit. I put breakpoints in Startup.cs and nothing ever hits it.

I then went and created a brand new default .NET 4.8 web app, and got the same behavior. I put a breakpoint in Application_Start and it never hits.

I tried doing a Repair of VS 2019, created new default projects, and got the same behavior.

I uninstalled VS Studio 2019 and the installer, reinstalled everything, created new default projects, and get the same behavior.

I try my existing project .NET 4.8 project that I was previously was working on, and that works .

I verified that VS IIS is listening to the port defined in the project settings.

C:\WINDOWS\system32>netstat -a -b | findstr :44330

  TCP    0.0.0.0:44330          DESKTOP-DC5F9MF:0      LISTENING

I ran my old app on port 53145 and I get a response from the server. The default app on port 44330 gets no response.

C:\WINDOWS\system32>curl http://localhost:53145
<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href="/Account/Login">here</a>.</h2>
</body></html>

C:\WINDOWS\system32>curl http://localhost:44330
curl: (56) Recv failure: Connection was reset

I'm at wits end.

Anyone have any clues as to what is going on?

Thanks, Rich

I used CURL to hit the app URLs and it worked. I got a response from the server and the startup breakpoints were hit.

Both MS Edge and Chrome would return no connection errors.

I had already checked Kasperksy Free to see if it was blocking the network connections, but I saw not evidence of this.

Not sure why it blocked the connection in only the browser (Edge and Chrome). They both had no Kasperksy extensions enabled.

In any case, removed Kaspersky from my machine. Restarted, and now everything works again.

Leaving this here, in case anyone else runs into the same problem...Wasted a lot of time on this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM