Unable to start IIS Express when runnin VS in SafeMode - visual-studio-2013

I am getting the error message "Unable to launch the IIS Express Web server" when trying to debug a web app in SafeMode. I am kicking off safemode with the devenv.exe /SafeMode switch and it loads my solution fine and it builds fine. But when I try and run the web app I get the aforementioned error message.
When I run VS normally (outside of SafeMode), all works as expected.
Just an FYI on why I am running in safe mode. There are times that I need to run my windows instance in a VM instead of booting into it. When this happens, trying to run VS (with all the plugins) is unbearable. So I just started using the SafeMode switch to disable all the plugins instead of turning them all off then having to turn them back on later. I did not think that turning off the plugins would make it so I could not kick off a sub process like IIS express...
Any suggestions. I am also very open to other ways to automate the launch of VS with/without plugins.
I am running Visual Studio 2013 Ultimate on Windows 8.1

Yes, currently there is a issue blocking debugging managed application under /safemode.
A possible workaround it to use "devenv.exe /rootsuffix", E.g. "devenv /rootsuffix LessPlugin". This way the Visual Studio will have no VSIX-based extensions. This won't be as clean as /safemode, but still faster if you have lots of your own VSIX installed. You may even install VSIX under the new root hive and still get it back the next time you start with the same /rootsuffix parameter.
This is the same command used to start Visual Studio if you have been writing VS extension with VSSDK. See here and here for more explanation on rootsuffix.

Related

Docker container running in Docker Destop after closing Visual Studio 2019

I would like to make an API with Visual Studio and put it in a container, to be able to execute in any other computer BUT without using Visual Studio. Just running the container.
I launched Visual Studio 2019, selected a new project with the API template and I got the weatherforecast Web Application example with the controller and the WeatherForeCast class. I launch it with 'IIS' and runs perfect, I run it with 'Docker' and runs great (it create the container and I verify it via Docker Desktop). I try the app writing in Chrome/FireFox/IE: https://localhost:container_port/weatherforecast
After that, if close Visual Studio and I still have the container running, and I try again https://localhost:container_port/weatherforecast, it doesn't work.
I have checked the ports, I have also stopped the container and run it again (it start with new ports, checked in docekr desktop or with 'docker ps' with power shell) and I try again with https://localhost:container_new_port/weatherforecast and it doesn't work until I start again Visual Studio and click on 'Docker'.
It seems there is a link between the container and Visual Studio, something I don't understand because container are really to be independent from anything.
Other people has the same problem, but no solution worked for me:
How to access a website running on docker after closing the debug on Visual Studio
ASP.NET Core Docker container only responds when debugging in visual studio
why is my docker container ASP.NET core app not available after ending debugging in Visual Studio
¿Any help? If anybody ask you to build an app with visual studio BUT to be run in a container without using VS, what would you do?
Thanks for your time.
You seem to have run into an artifact of the debugging optimizations used in VS: http://aka.ms/containerfastmode. If you do a full build of the Dockerfile (right click in VS, or build from the command line [Note: the build context is the solution folder by default]) you'll get an image that works w/o VS running.

Visual Studio's terminal stops opening when the debugger is launched

I use Visual Studio's Node debugger on a website on the MEAN stack (Typescript on server side, Angular 2 on client side).
I was used to see VS terminal open when I "Run: script dev" and see the logs scroll in it.
Since yesterday, running the debugger makes nothing happen in the terminal.
I've tried to:
reboot VS
reboot the laptop
remove, autoremove, purge and reinstall VS
But the problem remains.
However it still works on my back-up laptop.
I really need to debug.
configuration:
Ubuntu 22
Visual Studio 1.71.0
It seems related to last VS Code version: it works with the previous one.
please make sure you have added commands in your launch.json
launch.json

"Opening and creating websites on iis requires running visual studio under an administrator account"

I'm seeing this error in a pop-up window when attempting to run/debug my web project from Visual Studio
The following error occurred when trying to configure IIS Express. Opening and creating websites on iis requires running visual studio under an administrator account
This happened completely out of the blue. One second I was working as normal, regularly going in and out of debug in my browser, then this error pops up. It happens when attempting to run any web project, and it doesn't matter if it's in debug, release mode or what.
Stuff I've tried:
Run Visual Studio as Administrator
Uninstall/Reinstall IIS Express (via "Turn Windows Features On or Off" in Control Panel)
Update Visual Studio
Delete project's .vs folder
But still the error persists.
Is there anything else I can reinstall, update or otherwise check?
Thanks.
Solved it by going through a day of hell, and to be honest the 'solution' was very brute force...
TL;DR: Fully deleting and reinstalling Visual Studio seemed to do the trick.
Since the usual methods weren't working, I tried a full reinstall of Visual Studio. That didn't help. I then tried a System Restore. That made everything far worse, with my project showing about 500 error messages!
I then undid the System Restore, completely deleted all traces of Visual Studio from my computer, reinstalled everything, then tried VS2019 preview edition, tried 2017 edition again, uninstalled and reinstalled NetCore 2.0, 2.1, 2.2... all just to get around the minefield of error messages I'd created for myself.
In the end I just needed to do a full NuGet clear and restore then run dotnet restore --force in the NPM console, after which all those error messages were gone. As well as this, the original IIS Administrator error was gone too, presumably fixed via the original reinstall of Visual Studio.
Lost a whole day to this quagmire.
Downloading & Installing IIS Express from Microsoft worked for me. No need to update VS or remove/re-add the project.

How to make Visual Studio 2012 uninstall the app when I stop debugging?

VS 2012 installs the app to the system to debug, which is fine in theory. But it's annoying to uninstall the app every time I stop the debugger. I want a simple and easy way to simply test the application like old VS. I hope there is a setting in VS that I have missed somehow.
Below is the link of the steps recorder file to understand the issue better.
steps

How do I keep the development web server (Cassini) running in Visual Studio 2008?

I'm using Visual Studio 2008 to develop ASP.NET applications. Currently I'm debugging with running on IIS. I would like to switch to the development web server (Cassini) for debugging, so that I can use features like edit and continue. The reason that I'm not, is because the development web server only starts up when you are in debug mode. Is there any way to keep it running all the time, and just have Visual Studio attach to the existing server process like it does with IIS?
Rihan is partially correct...
In your Project Property page, Web tab: Enable Edit and Continue
If checked - The Development server will close when the app (not VS) stops.
If unchecked - Development server keeps running
You can also start your cassini server from the command line which takes alot of pain out of the whole "debug" effort...
Check out a good snippet here on how to do this: https://thoughtjelly.wordpress.com/2009/05/13/launch-cassini-from-the-command-line/
Once started, the built-in web server continues executing even when you stop debugging, as long as your VS2008 project is still open. Just start up the debugger when you want to start debugging again. I typically have another browser window open and interact with the built-in web server from there instead of the browser window that it opens so I can keep working with the application in the same state even after turning off the debugger (which closes the opened browser window).
I'm running VS2008 on Windows XP SP3.
The simplest way I have found to acheive that is by launching the debugger as normal. Then in Visual Studio goto the Debug menu, and select detach all. It detaches from the Cassini web engine, but it does not shut it down, as it does when stopping debugging.
I am quite sure you are know that there is command line swithces that you can you use to launch the cassini engine, but my guess is you are looking for something slightly easier.
Detaching does not close the browser window that visual studio launched, and if you do close that spesific web window then it will stop debugging.
I am running VS 2008 SP1 on Vista 64x SP1 without IIS.
Hope it helps
Rihan Meij
I have 3 web sites, with Single sign on between each site so I need to start all 3 with attach to process. However, there was no process to attach the debugger to, and whenever I started a project with F5 then stop it, the visual studio web server closed.
The Enable Edit and Continue option didn't change anything.
So to start the web server and keep it running so that you can attach the web project to the process, I simply did a "view in Browser" (ctrl+shift+W). This started the server process but not the project nor the debugger. I could then attach to process easily.
In Visual Studio 2015 you do this by going to Tools > Options > Debugging > General and unchecking the "Enable Edit and Continue" option:

Resources