Search code examples
asp.netasp.net-mvcvisual-studioiis-expressvisual-studio-2019

Process with an ID of #### is not running. output says: "The program '[4560] iisexpress.exe' has exited with code 0 (0x0)."


so I was previously using VS2015 in Windows 10. I had built one simple ASP.NET MVC project and never faced any issue while running it. However, I have been using Windows 8.1 now and installed VS2019. Running the same application and been facing the error "Process with an ID of #### is not running". output says: "The program '[4560] iisexpress.exe' has exited with code 0 (0x0)." So I tried to open a new dummy ASP.NET Web MVC project to check if that works and it didn't.

Now, there are a myriad range of solutions provided all over and I have tried every last one of them. With no luck. 1. Delete the hidden .vs file. 2 Rename/ remove the IISExpress folder and its config file under documents. 3. Removed the specific code snippet from the solution .csproj file 4. Of course tried running VS as ADMIN. 5. Realised that IIS exress was not installed. So completed that. 6. Then realised that VS 2019 needed to have the IIS support for ASP.net core installed additionally, so done that.

Now I'm out of ideas. It would be really helpful if you could provide some more suggestions or work arounds for this problem.

Thanks.


Solution

  • So, what finally worked for me were the following steps:

    1. Install IIS using this link - IIS Manager in Windows 10

    2. Run the IIS from command line by following this link - https://learn.microsoft.com/en-us/iis/extensions/using-iis-express/running-iis-express-from-the-command-line

    3. Opened VS 2019 in admin mode.

    4. Project -> (right click)Properties -> Web -> Servers -> Select local IIS from dropdown. -> Create Virtual Directory -> click ok. -> ctrl+S

    5. Run the application.