user1510580 user1510580 - 1 year ago 91
ASP.NET (C#) Question

Does .NET 4.6 work on Windows 10's IIS

I have tried in vain to run an OWIN Webapi app in IIS on Windows 10. All API operations result in 404, even though everything works fine in Visual Studio. See OWIN WebApi project on IIS 10 gives 404 on all operations.
The worst part is that even a newly created project from the OWIN Webapi SPA Template does the same. When I look at the application pool choices in IIS Manager, the highest .NET version is 4.5. This makes me wonder whether .NET 4.6 is supported at all. Any advice is appreciated.

Answer Source

My problem has been solved with the help from Khanh by adding

<add name="Owin" verb="*" path="*." type="Microsoft.Owin.Host.SystemWeb.OwinHttpHandler, Microsoft.Owin.Host.SystemWeb" />

to the handlers section of Web.config. It's quite surprising that a new project created from the OWIN Webapi SPA template doesn't have this handler defined which seems to be required by IIS. Hope this will help some people who run into the same problem.