0

On production server I am trying to run dotnet core api under IIS 8.5 i am getting error

Application 'MACHINE/WEBROOT/APPHOST/MySite' with physical root 'D:\MyFolder\' failed to start process with commandline '"" ', ErrorCode = '0x80070057 : 0.

I am able to run my API in Kestrel using command prompt without any issue. However i am not able to invoke the API via IIS. I am getting above error in event viewer.

Note: I also have development server where i have installed IIS 8.5, .Net Core 1.0.1 and Windows Server Hosting 1.0.1. But In development environment i am able to access API via IIS.

However the error is happening in new production server where i have installed IIS 8.5, .Net Core 1.0.4 and Microsoft .Net Core 1.0.4 & 1.1.1 - Windows Server Hosting

Since in production i can run application in Kestrel with .Net Core 1.0.4 i dont think its the issue with .net core version.
I am guessing its happening because of Microsoft .Net Core 1.0.4 & 1.1.1 - Windows Server Hosting. This version is different in development and production.

Question
How do i fix this error?
Where would i find old versions of Windows Server Hosting installation files. ( they are not here)

Update 1
Below is final deployed web.config

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <!--
    Configure your application settings in appsettings.json. Learn more at http://go.microsoft.com/fwlink/?LinkId=786380
  -->
  <system.webServer>
    <handlers>
      <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
    </handlers>
    <aspNetCore processPath="dotnet" arguments=".\Api.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false" />
  </system.webServer>
</configuration>

i tried changing processPath to C:\Program Files\dotnet.exe with no luck

Update 2
and here is project.json

LP13
  • 30,567
  • 53
  • 217
  • 400

1 Answers1

0

It was my mistake. Initially i deployed my application to C:\MyFolder and IIS web site was pointing to C:\MyFolder but then i changed the deployment to C:\MyFolder\Api but forgot to update IIS website physical path.

LP13
  • 30,567
  • 53
  • 217
  • 400