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.
Asked
Active
Viewed 500 times
0
-
IIS Manager does not tell the truth, as it only cares about whether CLR 4 is available. You only need to make sure for that application pool its ASP.NET/CLR runtime version is the 4.x option, then you are using the latest. – Lex Li Aug 01 '16 at 14:40
2 Answers
1
try this workaround http://www.jammer.biz/enable-asp-net-on-windows-10/ worked for me
or
try this Edit Web Config to
<compilation debug="true" targetFramework="4.6" />
<httpRuntime targetFramework="4.5" />
this will make httpRuntime verison to 4.5 as on your IIS

Raktim Biswas
- 4,011
- 5
- 27
- 32

gurdeep
- 44
- 3
-
@gurdeep, thanks for the info, but neither approach made a difference. – user1510580 Aug 02 '16 at 00:58
0
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.

user1510580
- 137
- 1
- 1
- 7