Could not load file or assembly 'dotnet' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

Terri Alekzander
Terri Alekzander used Ask the Experts™
on
A consultant created a new web server using Server 2019. They then migrated our intranet over to it and started the iis services. The html pages of our intranet load, but the aspx pages do not.

I'm trying to compare the settings between the two iis servers and have not been able to figure out what is making me get the following error message when an aspx page tries to load:

Server Error in '/dotnet' Application.
Could not load file or assembly 'dotnet' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

I should also add that I'm stumbling around in this area and am not by any means an expert.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
AndyAinscowFreelance programmer / Consultant

Commented:
Basically it means the compiled part has been compiled to run on a newer version of dot net than that installed.
Either ask your consultant to compile on an earlier version or download the latest (it is free) version from microsoft and install that on the server
see
https://dotnet.microsoft.com/download/dotnet-framework
Thank you very much for your response. Unfortunately the consultant did not have this task in his scope of work and also said he did not understand dot net framework, etc. After conforming that the newer version was already installed on the new web server, I exported the application from the old web server and imported it onto the new server. And it worked! Before doing that I tried comparing all the settings, but couldn't get it to work. This resolved the problem. so I'm good to go now.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial