0
votes

Deploying an ASP.NET Core 3.0 / React app with authentication to a client's IIS web server and get HTTP Error 500.0 - ANCM In-Process Handler Load Failure error. How do I properly deploy this app?

I do not have enough reputation points to post more than 8 links so I had to leave out links to posts and docs I used when troubleshooting this problem.

I am completely new to ASP.NET Core, IIS, certificates, and deployment so I am not sure how to properly deploy this app. I am likely not implementing the certificate settings properly, but I am not sure if that is the actual problem.

Here is my process:

I created app using:

$ dotnet new react -o output_directory_name -au Individual

following the instructions in Microsoft docs.

I published the project from Visual Studio to a local folder. Here is the web.config file. The client already has a website created so I copied the published files to the site's folder.

Using youtube videos and another post on SO, I tried setting the site's certificate requirements. I don't believe I have them set properly.

Here are some screenshots to illustrate how the project and site are set up. I replaced sensitive values with dummy values in red and tried to be consistent if a value occurs more than once.

The appsettings.json file. I have tried numerous entries for "Key" based on other posts and docs. Not completely sure what value I should be entering for "Name". I also tried setting "Key" to a file as mentioned in another SO post.

The website I am trying to deploy and the server certificates.

Certificate already set for the website by the client.

Details of the certificate.

SSL settings for the site. This is how the settings were when I first tried deploying. I checked Require SSL and tried the various Client certificates options when trying to run the app.

AspNetCoreModuleV2 hosting bundle is installed.

Application pool settings for the app.

I have been going in circles for several days so any help is greatly appreciated.

Thank You!

2
As far as I know, the HTTP Error 500.0 - ANCM In-Process Handler Load Failure error normally means the you don't install or the server doesn't support the asp.net core. As far as I know, from now, the asp.net core 3.0 could aslo use asp.net core 2.2 to run the application. The config file also use the asp.net core 2.2 to run the asp.net core 3.0 application. I suggest you could try to instll the asp.net core 2.2 from this link and try again.Brando Zhang
@BrandoZhang thanks for the response. The asp.net core 2.2 hosting bundle is indeed what is installed on the server. The server is Windows Web Server 2008 R2 which, according to the Microsoft docs, is compatible. The web.config file is also referencing the 2.2 install (modules="AspNetCoreModuleV2")user2639325
Could you please post more details information about your previous client application? I suggest you could try to create a new IIS web site and copy the asp.net core application published file to that application to test again. I guess this issue may related with your previous client application setting.Brando Zhang

2 Answers

0
votes

Using Event Viewer (wish I new about this sooner) I was able to find and view errors when the app was kicking off. That sent me on a bit of a goose chase resulting in updating all the Micorsoft packages to 3.0 Preview 8 versions (and waiting for the client to update the hosting bundle). There was also an error referencing the key in the appsettings. I think the formatting may have been off because I put it through a json formatter and then it worked.

0
votes
  1. The format of the web.config

     <?xml version="1.0" encoding="utf-8"?>
     <configuration>
       <location path="." inheritInChildApplications="false">
         <system.webServer>
           <handlers>
             <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
           </handlers>
           <aspNetCore processPath="dotnet" arguments=".\MyApp.dll" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" />
     </system.webServer>
    
  2. Build you app

  3. Publish your application to some folder

  4. create a website it will automatically adds the ppol in application pool WebsiteCreation

  5. edit the application pool,modify the .net version to no managed code edit pool edit version