我目前陷入了一种情况,我创建了一个ASP Web API项目,并从我的主MVC应用程序中使用Thinktecture身份服务器进行联合身份验证。Thinktecture Identity Server Cors支持
我面临的问题与web api cors支持有关。更具体地讲,我验证我自己的MVC应用程序,但是当它发送请求到Web API,我收到以下错误:
XMLHttpRequest cannot load XXX. The request was redirected to 'https://localhost/idsrv/issue/wsfed?wa=wsignin1.0&wtrealm=http%3a%2f%2floca…assive%2..., which is disallowed for cross-origin requests that require preflight.
错误是有道理的,因为该请求不包含在HTTP标头WSFederationAuthenticatioModule需要验证我已经登录。
是否有任何可能的解决方法,我不知道?