Nuget package for System.Net.Http on .NET Framework 4.7.2

This post has been republished via RSS; it originally appeared at: IIS Support Blog articles.

Application with a dependency to the System.Net.Http Nuget package may break after upgrading .NET Framework version to 4.7.2 or a newer version. This issue occurs if you are using Visual Studio 15.5 or a higher version.

 

The application may throw an error like this:

Initialization failed
Failed to replace the search service. Check the error log for more information.
at Telerik.Sitefinity.Services.Search.SearchModule.RegisterService

Nedim_0-1596841715737.jpeg

 

Workaround

Apply the workaround mentioned in this document first.

 

Another workaround is to use a Visual Studio version that is lower than 15.5 may get the application working but this is not recommended. Older versions of Visual Studio may present security issues to your organization. They are also not supported by Microsoft.

 

Solution

The recommendation is to use System.Net.Http DLL that comes with .NET Framework.

 

If your application throws errors when you switch Nuget DLL with platform DLL, it means it is not compatible with the new libraries. Coding changes will be required to make it compatible.

 

If you see BadImageFormatException for System.Net.Http or other libraries when you access your web application, check this post out: 

https://techcommunity.microsoft.com/t5/iis-support-blog/fusion-log-viewer-fuslogvw-exe/ba-p/784396

REMEMBER: these articles are REPUBLISHED. Your best bet to get a reply is to follow the link at the top of the post to the ORIGINAL post! BUT you're more than welcome to start discussions here:

This site uses Akismet to reduce spam. Learn how your comment data is processed.