1
votes

I've read many similar issues but none of the resolutions solved my problem. So, here is my case.

I have a NET Core 2.1.1 app that runs beautifully within VS2017 and when published to my desktop running Win10 Pro and IIS10, i.e. running it outside of VS2017. But, when I deploy the app to a remote server Win2012 R2 with IIS8.5, I get the following issues with it.

I have followed different pages on deploying net core apps like this one. https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/index?view=aspnetcore-2.1

  1. When attempting to reach the site I get error 500 Internal Server Error.

  2. IIS manager complains about the generated web.config when clicking on any of the site's settings e.g. Net authorization, Net Error pages etc...

  3. Even when setting the stdoutLogEnabled to true, I don't get any log files. I even tried adding custom details flags in the web.config yet still nothing changed.

This is the generated web.config, and I hope someone points me in the right direction.

Thanks.

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <location path="." inheritInChildApplications="false">
    <system.webServer>
      <handlers>
        <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
      </handlers>
      <aspNetCore processPath="dotnet" arguments=".\eSignWebMVC.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
    </system.webServer>
  </location>
</configuration>
<!--ProjectGuid: 72897161-bbbb-4f20-a12c-7f33922ea6bc-->
1
I'd start with trying to execute the command dotnet .\eSignWebMVC.dll in the site's directory on the target web server. does the server start from there?Alex Buyny
@Ninos hi! what does the event log says? have you tried starting the site from code behind? if yes, did you get any errors?SteinTheRuler
So you are positive you have installed the Runtime & Hosting bundle for your targeted 2.1 version from here dotnet.microsoft.com/download/dotnet-core/2.1 It should be that one, under 2.1.8: "ASP.NET Core/.NET Core: Runtime & Hosting Bundle"Daboul
Hi Alex, running "dotnet .\eSignWebMVC.dll" gives this error.Ninos
warnHosting environment: Production Content root path: C:\webapps\app_mvc : Microsoft.AspNetCore.Server.Kestrel[0] Unable to bind to localhost:5001 on the IPv4 loopback interface: 'An attempt was made n a way forbidden by its access permissions'. Now listening on: localhost:5000 Now listening on: localhost:5001 Application started. Press Ctrl+C to shut down.Ninos

1 Answers

1
votes

So I finally got this to work and I HAD to install the latest bundle v2.2.2 even though my app is targetting Net Core 2.1.1, but Microsoft's horrible technology still didn't make the app to run with the 2.1.1. bundle. Total waste of time and effort on such a stupid thing!!

What's the meaning of still providing the prior bundles if none of them does anything?