Reputation: 363
I'm trying to host .Net Core2 default WebApi project on my Local IIS Server in Windows 10.
I just published the default project to a local folder without making any change on it and hosted it on IIS. But it gives me this error when I try to access the URI
My web.config file as follow:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="dotnet" arguments=".\ToHost2.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
</system.webServer>
</configuration>
<!--ProjectGuid: 3be731b8-79e8-4828-a016-54606c34c081-->
Please help me to track where I have made mistake.
Thanks in advance
Upvotes: 1
Views: 1292
Reputation: 53
Convert the Web api project folder as application in IIS tool.
right click on api project folder and convert as application i think it will be work for you
Upvotes: 0
Reputation: 3882
You need to install the .NET Core Windows Server Hosting bundle
Upvotes: 1