Monday, October 22, 2018

Asp.Net Core 2.1.5 unable to be reversed proxied behind IIS 10

So i'm running into a frustrating issue. I am running an asp.net core 2.1.5 app on Windows Server 2016, behind IIS 10. I have installed the hosting runtimes, which include the AspNetCoreMOdule. That does show up in the list of modules within IIS.

Yet, I am getting a generic 500 IIS error when running the site. The Application pool is set to 'No Managed Code' for the CLR version, and the running user has full permissions for everything. As well, if I run it manually from CMD, it runs fine, and I can navigate to it fine.

One thing I noticed is that it seems IIS doesn't understand the <aspNetCore/> node within the web.config. When I try to open any of the options, or configuration editor within the IIS Manager, it throws a 'The data is invalid. (Exception from HRESULT: 0x800700D)'. If I remove the node, the error page at least shows some more info since it isn't failing on the web.config load anymore.

Here is my web.config currently:

<?xml version="1.0" encoding="utf-8"?> <configuration> <system.web> <customErrors mode="Off" /> </system.web> <system.webServer> <httpErrors errorMode="Detailed" /> <handlers> <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" /> </handlers> <aspNetCore processPath="dotnet" arguments=".\Teknik.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout"> <environmentVariables> <environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" /> </environmentVariables> </aspNetCore> </system.webServer> </configuration> 

Any thoughts?

Asp.Net Core 2.1.5 unable to be reversed proxied behind IIS 10 Click here
  • Blogger Comment
  • Facebook Comment

0 comments:

Post a Comment

The webdev Team