I am attempting to setup a new work space and transfer all of my projects from my old computer to the new one. However, I am getting this error when I try to run IIS Expres
If the above solution doesnt work in VS2017 .Net Core, Run as VS2017 as ADMIN. If no ADMIN access to your machine, you can change the 'launchSettings.json' to work on port 8080 like below and after that follow above 4 steps.
"applicationUrl": "http://localhost:8080/",
My problem resolved by:
Goto: .vs\config\applicationhost.config file and set overrideModeDefault to Allow instead of Deny
<section name="windowsAuthentication" overrideModeDefault="Allow" />
In my case I accidentally install dotnet for x86 platform when my VS 2017 have x64. I reinstall dotnet for platform x64 and it works fine now.
If using IIS
instead of IIS Express
, just restart the service or:
Sites
tree viewsite
Manage Website
click on Restart
buttonSolution for me (without administrator rights) was to:
In my case, I just change modules="AspNetCoreModuleV2"
to modules="AspNetCoreModule"
and working fine. The final web.config looks like as below.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false" startupTimeLimit="3600" requestTimeout="23:00:00">
<environmentVariables />
</aspNetCore>
<httpProtocol>
<customHeaders>
<remove name="X-Powered-By" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>