Welcome to Microsoft Q&A, thanks for posting your query.
Adding additional information for the above response.
The error "Could not load file or assembly 'System.Net.Http, Version=4.2.0.0" indicates that the missing version of the System.Net.Http
assembly requires your application. This issue occurs when an application depends on an outdated .NET Framework version or the necessary assembly dependencies are not properly resolved.
- Confirm the server has .NET Framework 4.8 installed, as this is required for the Azure File Sync agent on Windows Server 2016.
- Fix or Update the
System.Net.Http
Assembly might be incorrectly registered. Use the Microsoft Assembly Binding Log Viewer (Fuslogvw.exe) to identify any errors related to missing or incorrect assemblies. Ensure the correct version ofSystem.Net.Http
is available by installing it using NuGet or updating your environment to include the required version. https://zcusa.951200.xyz/en-us/dotnet/framework/tools/fuslogvw-exe-assembly-binding-log-viewer - If your application has an App.config or Web.config file, you can add binding redirects to ensure that any requests for older versions of
System.Net.Http
are redirected to the correct version - Uninstall the Azure File Sync agent completely, restart the server, and then download and install the latest version of the agent from Microsoft's download page.
- If the issue persists, locate the System.Net.Http.dll file from a compatible .NET installation or NuGet package and manually place it in the application's directory or the Global Assembly Cache (GAC).
- Confirm all available Windows updates have been installed, as some updates may include important fixes for .NET Framework and its dependencies.
Additional Troubleshooting:
- Check the Event Viewer under Applications and Services Logs > Microsoft > FileSync for detailed error messages that may provide more details about the issue.
- If the problem remains unresolved, please check the Microsoft documentations for additional guidance.
Azure Files troubleshooting documentation
https://zcusa.951200.xyz/en-us/azure/storage/file-sync/file-sync-deployment-guide?tabs=azure-portal%2Cproactive-portal#install-the-azure-file-sync-agent
Please let us know if you have any further queries. I’m happy to assist you further.
Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.