skip to Main Content

I have an ASP.NET Core 3.1 site that’s been working fine. I recently added Stripe.Net to my VS project.

After re-build and publish, I uploaded the the files to my shared IIS hosting. When trying to access the site, I now get the following error message in Chrome:

HTTP Error 500.31 – Failed to load ASP.NET Core runtime

Publish Configuration: Release Target Framework: netcoreapp3.1 Target Runtime: Portable

Stripe.net is a sync/async .NET 4.6.1+ client & portable class library for the Stripe API. It is the official library. The dependencies are:

enter image description here

Project Packages:

enter image description here

Deployment Files:

enter image description here

I use Plesk to access/manage my site and I don’t know how to access the Event logs. Any suggestions on how best to troubleshoot this would be helpful. I feel like there might be a missing dependency file but the only new files in the deploy folder are:

  • Stripe.net.dll
  • System.Configuration.ConfigurationManager.dll
  • System.Security.Cryptography.ProtectedData.dll

and all these files were copied into the httpdocs folder.

2

Answers


  1. Most likely it is because you’ve mixed references in your .net core app with a library that was created for .net framework. On you developers machine it will work as on windows you have all required libraries to run .net framework code. But when you upload your .net core app to some cloud provider and it is configured as .netcore, none of the "normal" .net framework libraries are loaded . Therefore, I assume this is the reason your application stopped working.

    Login or Signup to reply.
  2. Did you already host the application in IIS before this issue? The Detailed Error Information section of the error page will give you clearer information about your problem.

    Anyway, please make sure that you have installed the corresponding runtime from .Net Core 3.1 in the target machine.

    Secondly, enabling logging and viewing will allow you to better identify the cause of the problem, which will help resolve the issue. Enable the logging by editing Web.config:

    <aspNetCore processPath="dotnet" 
                arguments=".AppCore.dll" 
                stdoutLogEnabled="true"   
                hostingModel="inprocess" 
                stdoutLogFile=".logsstdout" 
                forwardWindowsAuthToken="false"/>
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search