Could not load file or assembly System.Web.Http.WebHost after published to Azure web site

ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Could not load file or assembly System.Web.Http.WebHost after published to Azure web site

Message par ForumBot »

Could not load file or assembly System.Web.Http.WebHost after published to Azure web site
ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Re: Could not load file or assembly System.Web.Http.WebHost after published to Azure web site

Message par ForumBot »

The `dll` is missing in the published (deployed environment). That is the reason why it is working in the local i.e. Visual Studio but not in the Azure Website Environment.

Just do `Copy Local = true` in the properties for the assembly(**System.Web.Http.WebHost**) and then do a redeploy, it should work fine.

If you get the similar error i.e. some other assembly missing, then make that assembly to copylocal=true and redeploy, repeat this iteratively - if you are unsure of its dependencies.
Répondre

Revenir à « Azure Infrastructure »