"Unable to connect to 'IIS Express'." How do I fix this? - visual-studio

I've been trying to fix this for a while. I'm working on a cloud service and for some reason I get an error every time I try to run it. I've done everything I could think of doing.
I disabled and re-enabled SSL
I set an iplisten for 0.0.0.0 and made sure my computer wasn't currently using the port the project is using
I tried deleting applicationhost.config and even the whole .vs folder
I tried cleaning and rebuilding the project
In combination with messing with applicationhost.config and installing the .NET framework I needed, I restarted my computer
I'm pretty sure I tried a couple other things but they're slipping my mind at the moment. I'm currently using the following/have the following installed:
I'm using Microsoft Visual Studio Community Edition v16.10.31.321.278
.NET Core v5.0.0
.NET Framework 2.0, 3.0, 3.5, and 4.8
I have "Internet Information Services" and "Internet Information Services Hostable Web Core" enabled in my features tab
I'm running the latest version of Windows 10, completely up-to-date
The weird thing about all of this is that it works fine on my boyfriend's laptop, who's working with me on the project. I'm not exactly sure where to find the IIS logs either, if anyone knows and could let me know, that'd be very appreciated. I've grown tired of searching post after post to see that nothing helps. I'll upload the error logs later if I'm able to find them.

Did you try to run VS as Administrator ?
I used to have the same issue and find out it was the only way to solve this.

Related

.NET 6.0 ASP.NET Core Web App Page Not Found Error

I created a brand new ASP.NET Core Web App project to test out the new features of .NET 6.0.
But when I tried to run the application with F5 nothing displayed on the web browser but "Page Not Found" error.
Also I tried with IIS Express and the result is same. Also tried http and it's same.
I don't have any idea what may be the problem?
After I rebooted my computer project runs well.
But sometimes later problem occurred again. I tried changing ports, rebooting, close and relaunch visual studio. None of them solved the problem.
Must be a computer specific problem but don't have any idea where to start. Really annoying.
So I keep searching and trying, I came up with this solution:
ASP.NET Core 404 Error on IIS 10
dotnet restore
dotnet run
It works for now but the problem related to debugging still persists.

Blazor: Failed to launch debug adapter

kind of desperate with this problem that I don't know how to fix and I don't know the cause.
Full error when running Blazor app:
It's a WASM application hosted in .net core. Therefore there is a backend and a frontend.
I have set my backend project as Startup project, which will take care of hosting also the frontend.
Both projects are set up on .NET 5.
I have read that multiple factors can cause this error and yet I tried all the possible solutions I have found so far.
I kill manually the app processes that hang running even when I stop debugging, closed VS, deleted the whole .vs folder and then restarted VS.
I disabled script debugging
Also tried enabled and disabled:
Tried also to start it with latest version of Microsoft Edge instead of Chrome, sometimes it works and doesn't give troubles sometimes it doesn't
in a post I have read from the official support that it's a bug that is being solved already in the 16.10 VS preview version. I downloaded and installed it, still nothing.
tried both iisExpress and .net CLI as hosting profile.
Moreover when starting the app a normal blank page only opens on the browser:
Don't know honestly what to try anymore. Could anyone help? Thanks in advance!
I have had the same problem exactly with the same setup, this on a couple times and on both occasions I have deleted the VS folder, did a rebuild and then rebooted my PC.
I know this is not a root cause solution, but it has worked for me.
In my case it was missing the latest ASP.NET Core framework...
Make sure you get the hosting bundle.
.NET location: C:\Program Files\dotnet\
The following frameworks were found:
6.0.9 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Learn about framework resolution:
https://aka.ms/dotnet/app-launch-failed
To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.AspNetCore.App&framework_version=6.0.10&arch=x64&rid=win10-x64
I had to restart VS after installing..
Updating to the latest hosting bundle did the trick for me.
I also threw out the .vs folder as well as any obj and bin folders in the solution projects to ensure a nice and clean environment.
Reboot. Rebuild. Rejoice.

Error occurred while starting debugger for ASP.NET Core application on VS2015.3

I am teaching myself how to build websites using asp.net core/mvc6. For the same, I installed VS2015 update 3 community edition. I have extensive background with C# and .NET Framework, but not much with web applications
I am just trying to create a simple project and start debugging, but the debug mostly (say 90% times) fails with the below message
An error occurred attempting to determine the process id if the
{APPLICATION} which is hosting your application
You can reproduce my issue by following the below steps:
Create a new "ASP.NET CORE" application in visual studio, using default selections
Build the project successfully without errors or warnings
Click the "Start Debugging" button
I get the "Debug is starting" progressbar,
After that it mostly fails but sometimes succeeds in starting the debug session. When it fails, I get the below message.
When it succeeds I first get a dialog complaining about 64 bit debugging and then the debug session starts fine.
I have tried the below with no luck
I can run fine the website through Visual Studio without debugging.
I can also debug and run fine a .NET core console application from within VS.
I have Avira (antivirus) and ZoneAlarm (Firewall) installed on the machine where I am trying all this. I have tried exiting ZoneAlarm and stopping real-time protection on Avira and set my UAC to not prompt, and then try debugging, but no luck. I cannot uninstall those items for trying.
I have tried repairing VS2015.3. I have also tried uninstalling and installing cleanly VS2015.3.
If I follow the below steps, the debugger starts fine (sometimes with the 64 bit debugging warning). I am sure that attaching the debugger to the running website would also work fine:
Start Debugging using F5
Right click IIS Express and browse to the application quickly
The debug works fine, if I use the kestrel web-server
I have tried using ASP.NET Core 1.0.1 and 1.1.0.
Using IE instead of Chrome did not make any difference
I even tried using VS 2017 RC2
I would like to be able to debug without any "hacks" and also, get rid of the 64 bit slowness complains
It works fine in my VS2015.3 (version 14.0.25431.01) based on your steps and successful no matter how many times I debug it.
Please check your .NET Core version to make sure it is the latest version first. The latest version should be NET Core 1.0.3. You could get it from this link: https://www.microsoft.com/net/download/core
And according to the message when you could successful debugging, your are using some 3rd party networking software. So please make sure you closed all other programs when debugging.
In addition, I found you are debugging using Chrome. Please choose Internet Explorer to confirm whether this issue related to the Chrome.

HTTP verbs PUT and DELETE stopped working

I have a ASP.NET Web API project where I use PUT and DELETE frequently. Sometime during the last couple of months PUT and DELETE stopped working. The web.config is still the same and the verbs works fine on my other machine.
I haven't worked with the project during this time. The only things I recall I have done is the Windows 10 anniversary update and a couple of Visual Studio updates, but I have done the same updates on my other machine.
During this time my WCF services stopped working too. In attempts to get them to work I reinstalled some Windows components. I have installed everything that has to do with IIS.
Can this verb problem have anything to do with missing Windows components? I have no idea what it can be.
Apparently I managed to install support for WebDav publishing when I reinstalled the Windows features for IIS. I removed it and got my PUT and DELETE back!

Azure SDK 1.4 - Cannot debug in VS2010 with multiple sites

I have a newly installed laptop running Win7/x64 and installed Visual Studio 2010, then VS2010 SP1, and then the Windows Azure SDK 1.4.
When I attempt to debug a cloud service project in the local compute emulator environment, I get an error: "The was an error attaching the debugger to the IIS worker process for URL 'http://127.0.0.1:5102/' for role instance..."
Some searching turned up quite a few discussions on this issue with the Azure SDK 1.3 update and I've narrowed down the issue to my having multiple sites in the same Web Role in my Azure application. If I comment out the sites entries in the ServiceDefinition.csdef, there's no error and debugging works fine. I tried the other recommended solutions, reinstalling .NET, re-registering ASP, rebooting while facing Redmond, but same problem.
I'm surprised by this issue on a new VS/Azure 1.4 installation and I'm hoping someone else has resolved supporting multiple sites for local debug.
Thanks!
I ran into the same problem, and have two suggestions:
If you've pointed to the "Published" output of a website and not the source location in ServiceDefinition.csdef, you'll get this error. Point to the source location of the web site when you're debugging. You can always switch the location later if you'd rather deploy a published web site rather than the source.
Ensure that you have debug set to false in the each of the web application's web.config file. While obvious, this catches me from time to time.

Resources