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 here.</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.
Related
How do I debug an always pending request? This morning something strange started to occur, one request (which should download an PDF file) stopped working. When I reproduce the error I can't see anything in the web browser (tried multiple browsers just in case) or any log files on the server.
All the other requests works fine which makes everything seems strange. I have checked at another server with identical code and there it works just fine, also I have tried to do an iisreset without any success. On the hardware side everything seems great (cpu, ram, disk, network).
We use windows server 2012 and IIS 8
Any ideas on where can I start look for errors?
I was changing OAuth/Owin settings and Azure publish settings in a Web Application project this morning, but soon after we decided deployment will be to a specific IIS Azure VM (now visible across our local domain). All code/setting changes have been reverted.
At one point I also changed the drivers\etc\hosts file to allow a dummy name for Microsoft OAuth, but that has been reverted.
Notes:
My startup URL is http://localhost:22222/
I am running under IIS Express (as my local Dev VM will not allow me to install full IIS)
When I start the Web Application with IE I simply get "This page can't be displayed"
If I start it with Chrome I get "This webpage is not available", but it also changes the browser URL to https://localhost (note the s, i.e. using SSL).
I have pulled the project down fresh from source control. No change.
The project is under TFS source control.
Another developer on the same project has the latest files and it works fine.
If I run any other Web Application project, they work just fine.
All OWIN registration of providers has been commented out. No change.
Deleted the entire project folder and pulled fresh from TFS. No change. This probably means a local machine setting somewhere is the cause?
What could I have damaged in my Web Application to cause this problem? I have been scratching my head for hours now and nothing we try is working. The application simply will not start in any browser.
Project Web Settings tab:
Answer at bottom, given to this chromium issue [issue 444479] helped me:
Same here - I also believe caused by HSTS - see
http://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security
If you have (developed) any other localhost sites which send a HSTS
header...
eg. Strict-Transport-Security: max-age=31536000; includeSubDomains;
preload
...then depending on the value of max-age, future requests to
localhost will be required to be served over HTTPS.
To get around this, I did the following.
In the Chrome address bar type "chrome://net-internals/#hsts"
At the very bottom of a page is QUERY domain textbox - verify that localhost is known to the browser
If it is, DELETE the localhost domain using the textbox above
Your site should now work using plain old HTTP
HTH,
Jay
ps. This is not a permanent solution, but will at least get it working
between projects. If anyone knows how to permanently exclude localhost
from the HSTS list please let me know :)
Give it a try.
Visual Studio 2013 Update 3 and IIS 8.5
I started an MVC 5 project and have been messing around with ssl. Everything worked great until I opened IIS and added a website that pointed to my project. Now, I can run the project with ssl enabled but NOT with it disabled. If I disable ssl, I get the following Error Message in Chrome.
I'm fairly certain my project is setup correctly in Visual Studio. "SSL Enabled" is false and the "Project Url" is http://localhost:#####/ straight form the project's properties.
When this started happening, I figured it was IIS and so I deleted the Site from IIS. This obviously did not fix it. So I tried looking online but couldn't find anything helpful. The only other ounce of information is a photo of the request being redirected in Chrome's network window.
Keep in mind when I run locally with ssl, everything works fine.
I have an MVC 5 web application that runs perfectly fine in VS when I debug it but the moment I deploy to my IIS server (Windows 2012 R2) I get a 500 internal server error. I have even enabled debug=true in the web.config on the server but get no detailed error. Nothing is showing in the event log I have restarted the web site in IIS and recycled the app pool with no change. What do I have to do to figure out what is not working on the server side?
By default, IIS hides debug information from remote connections. This means you need to log on to the server and browse the site there, or you need to turn off Custom errors in your web.config (change from RemoteOnly to Off).
Many kinds of configuration errors in IIS however, will only show up properly if you browse on the server.
While I did not find exactly what was wrong. I ended up rebuilding my site from the group up and in doing so I did figure out that it was something to do with the web.config but there is so much of the web.config file I left out of the new site I don't know the exact code in it that caused the problem.
We're switching our MVC3 application from IIS 6 to 7.5. I'm working on setting up my local development environment on Windows 7. The app works fine for the most part, but I just discovered that ONE out of the many different MVC Areas I have doesn't work.
When I try hit an action under this area, I get a 503 Service Unavailable error back. This does not happen anywhere else in my application.
There is only one application pool for the whole website.
MVC 3
.Net 4.0
64 bit
Failed request tracing doesn't see these requests.
There is nothing relevant in the Windows application or system logs.
The area works fine under visual studio 2010 cassini, problem happens when I run it under local iis 7.5 (not express)
App pool isn't crashing or otherwise stopped
There's nothing in my ELMAH log
Everyone full control on entire tree in the filesystem security
The url is http://localhost/reports
I'm totally stumped. I can't find any evidence that IIS is even getting the request at all. Is there some other log file beside the ones I listed?
[Update]
Is there any way to view the http.sys URL reservations? I have found some talk about SQL Reporting services calling dibs on /Reports url.
I figured it out. It was due to SQL Reporting services having reserved the http://+:80/Reports url in http.sys.
I didn't actually have reporting services installed, but it apparently still reserved the url.
I fixed it with the following command:
netsh http delete urlacl url=http://+:80/Reports
Check the account / IIS -> Application Pool -> Advanced Settings -> Process Model -> Identity under which your pool is running. I had my password changed, and didn't get a log on invalid password, but rather assemlby load failure, which in turn caused the app pool to be shut off, and the "503 Service Unavailable" was given to the user.
Another solution is, I had the same problem with my http://ApplicationURL/Reports
And yes the SSRS was the issue.
A better solution for this one is
OpenReporting Services Configuration Manager.
Connect to your local service usually COMPUTERNAME\MSSQLSERVER
Go to "Report Manager URL" Option
Modify your virtual directory with another name instead of Reports.
Just remember with this change you reports for SSRS will be in the name that you defined.
Carlos
Are you using any ODBC or other components in this area that you are not anywhere else? I have experienced this error (or one similar, can't remember off the top of my head) when running the app pool in 64bit mode and the underlying calls are referencing at 32bit 'something'. You could try enabling 32bit applications in the application pool settings to see if it affects the outcome.
As mentioned before it is related to SQL Reporting services
You can follow this approach to fix this problem:
Log on to the server that hosts SSRS.
Go to Start > Programs > SQL Server 2008 R2 > Configuration Tools > Reporting Services Configuration Manager
Connect to the server in question (usually your local server)
Go to the Web Service URL section
Change the TCP port to an open port other than port 80 (81 happened to work on my server) and hit Apply
Go to the Report Manager URL section
Click Advanced
Click the entry with a TCP port of 80 and then click the Edit button.
Change the TCP Port entry to the same thing you changed it to in the Web Service URL section previously and Click OK.
Click OK again.