Search This Blog

Wednesday, April 13, 2016

ASP.NET Web API application gives 404 when deployed at IIS 7

This issue can also happen due to the following
1.In the Web.Config
<system.webServer>
     <modules runAllManagedModulesForAllRequests="true" /> 
</system.webServer>
2.Make sure the following are available in the bin folder on the server where the Web API is deployed
•System.Net.Http
•System.Net.Http.Formatting
•System.Web.Http.WebHost
•System.Web.Http
These assemblies won't be copied in the bin folder by default if the publish is through Visual Studio because the Web API packages are installed through Nuget in the development machine. Still if you want to achieve these files to be available as part of Visual Studio publish then you need to set CopyLocal to True for these Assemblies

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.