简体   繁体   中英

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.

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM