Angularjs(客户端)和.Net WebAPI无法在Windows Server 2016(IIS 10)上运行 [英] Angularjs (client) and .Net WebAPI not working on Windows server 2016 (IIS 10)

查看:323
本文介绍了Angularjs(客户端)和.Net WebAPI无法在Windows Server 2016(IIS 10)上运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我的客户端应用程序是使用Angularjs创建的,WebAPI是在.Net(框架4.7.2)

My client app is created using Angularjs and WebAPI is in.Net (framework 4.7.2)


问题:早些时候我的应用程序托管在Windows服务器2012 R2上并且应用程序正常运行但现在我正在尝试在Windows Server 2016(IIS 10)上托管相同的应用程序但现在客户端用户登录身份验证无法正常工作(登录验证我使用
身份服务器)

Problem: Earlier my app was hosted on Windows server 2012 R2 and app is working fine on it but now I am trying to host the same app on Windows Server 2016(IIS 10) but now client user login authentication isn't working on it (for login authentication i am using Identity server)


根据我的调查原因: -

Reasons according to my investigation:-




  1. 默认情况下,Windows Server 2016支持HTTP2,如果我在服务器上禁用http2,那么应用程序运行正常。

  1. By default, HTTP2 is supported on windows server 2016 and if I disable http2 on the server then the app works fine.

>
或者,如果我通过选中'Require SSL'并选择'Accept'选项更改SSL设置(在IIS中),那么应用程序也可以正常工作。但在这种情况下,WebAPI调用使用http1.1协议这就是它开始工作的原因。

Or if I change SSL setting (In IIS) by checking 'Require SSL' and select 'Accept' option then also application works well. But in this case, WebAPI calls uses http1.1 protocol so that's the reason it starts working.



请提供一些解决方案,以便我的应用程序也适用于Windows服务器(IIS 10),而无需禁用任何设置。

Please provide some solution so that my app also works on windows server (IIS 10) without disabling any setting.

推荐答案

我试着在这里寻求帮助。

I'd try asking for help over here.

https://forums.asp.net/

https://forums.iis.net/

 

 


这篇关于Angularjs(客户端)和.Net WebAPI无法在Windows Server 2016(IIS 10)上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆