Search code examples
asp.net-corevisual-studio-2019iis-10

Getting error "Unable to get the process ID of the IIS application pool 'xyz' hosting project 'abc'" when running ASP.Net core app from Visual Studio


I have an ASP.Net core app hosted by my localhost IIS server. I can run it without issue by pointing the browser to the IIS site. But when I try to run it from Visual Studio in debug mode, I am getting this error "Unable to get the process ID of the IIS application pool 'DEV_MVC' hosting project 'MvcClient'", where DEV_MVC is the app pool I am targeting and MvcClient is my project name. Here is the app pool as shown in IIS manager enter image description here

and here is the application contained in that app pool enter image description here

here is how I have my MvcCleint project configured enter image description here

Can somebody show me what I am missing here?


Solution

  • I was able to get past the issue by removing the "/MvcClient" from the App URL value of my project configuration. I think what happens when I do this is that the app targets a different app pool which contains the same IIS app but with a Virtual Path value of "Root Application", instead of "/MvcClient". This app pool was automatically created when I load the project in Visual Studio.