Before everyone reads this, I just want to say that i know that there are related threads out there, but I have either tried them or do not understand. With that being said here
If Folder getting from other, and host file is already generated on ProjectName\.vs\config
folder, then it conflicts with a new one and gets this error.
So delete host file from ProjectName\.vs\config
and restart project once again. It was worked for me
I was trying to run a .net core 3.1 site from IIS 10 on windows 10 pro box, and got this error. Did the following to resolve it.
First turn on the following iis feature on.
Then follow the link below.
https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-3.1#install-the-net-core-hosting-bundle
Install the .net core hosting bundle.
The direct link is
https://dotnet.microsoft.com/download/dotnet-core/thank-you/runtime-aspnetcore-3.1.2-windows-hosting-bundle-installer
I have installed the .net core sdk and run time as well. But this did not resolve the issue.
What made the difference is the .net core hosting bundle.
Please follow these step
In my case, Server had lower version framework than your application. installed latest version framework and it fixed this issue.
I was accessing the project from inside a Virtual Machine - sharing the project folder from the host OS (Windows 10). After trying many of the solutions, and even ensuring the permissions for the IIS_IUSRS
are given, still I could solve this.
Eventually, I copied this folder from the host, onto a path on the guest OS, and now I can properly run that same ASP.NET project without ado. But, I did also go ahead and give the IIS_IUSRS
group full control over this new dir as well... maybe that's not really necessary in this case? I'm lazy to test that ATM.
In my case I needed to install the IIS URL rewrite module 2.0 because it is being used in the web.config and this was the first time running site on new machine.