0

We have a .net core 2.2 application that we upgraded to .net 5.0. All necessary changes to the csproj files and nuget packages were updated and other unnecessary packages removed. We are able to run using VS as well as publishing manually.

However, when the website is deployed using advanced installer, IIS configuration and files moved by the installer, we get a 500.31 http error on startup with the website looking for Microsoft.Data.SqlClient.SNI.runtime package. Note that when we try to paste in the same folder artifacts manually into the same directory without changing IIS configurations, the application works fine.

This really has me stumped as being able to manually paste in the folder and running the application eliminates the build and the IIS Configuration as culprits. I've given the user the application pool is running on full control over the entire directory where the application located.

just for extra info, the application is deployed using the following statement:

dotnet build %projFile% -p:DeployOnBuild=true -p:PublishProfile=%pubProf% -p:Configuration=Release -v n

Thank you for your help in advance

Kaizer69
  • 373
  • 4
  • 18
  • Have you updated IIS side ASP.NET Core module to be compatible with .NET 5? You cannot use the .NET Core 2.2 version with .NET 5 runtime. A report should give you more information on what extra changes are needed on IIS, https://docs.jexusmanager.com/tutorials/ancm-diagnostics.html – Lex Li Aug 19 '21 at 14:11
  • The projects are running .net 5.0 so they're not looking for any .net 2.2. If we manually paste in the folder with the application artifacts they work fine. – Kaizer69 Aug 19 '21 at 15:29
  • the new version of the aspnetcore module does appear when I check the IIS modules. The we make the installer install the .net 5.0.8 hosting bundle prior to attempting to deploy any application. – Kaizer69 Aug 19 '21 at 15:30

1 Answers1

0

After days of searching, it seems like the reason for this was that pdb files weren't being deployed to the application directory and the dependencies required the pdb for Microsoft.Data.SqlClient.SNI.runtime

Kaizer69
  • 373
  • 4
  • 18
  • This question is basically what happened to me https://stackoverflow.com/questions/65123812/can-i-safely-delete-references-to-pdb-files – Kaizer69 Aug 19 '21 at 18:50