【问题标题】:Migrating from Windows Authentication to Azure AD authentication for Asp.net MVC website hosted in IIS为托管在 IIS 中的 Asp.net MVC 网站从 Windows 身份验证迁移到 Azure AD 身份验证
【发布时间】:2020-11-14 06:09:04
【问题描述】:

我正在迁移基于 ASP.Net MVC 的网站以使用 Azure AD 身份验证。我的网站已成功迁移到使用的 AAD。

我的网站调用 WCF 服务。如何将登录信息传递到此 WCF 服务?

这是我在 web.config 中的 ServiceModel 配置。感谢您的帮助

<behaviors>
  <endpointBehaviors>
    <behavior name="AdsPlusValidatorServiceBehavior">
      <dataContractSerializer maxItemsInObjectGraph="2147483647" />
    </behavior>
  </endpointBehaviors>
</behaviors>
<bindings>
  <basicHttpBinding>
    <binding name="BasicHttpBinding_IJobManagerService" closeTimeout="00:01:00" OpenTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" ostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="2147483647"  essageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"  allowCookies="false">
      <readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="16384" />
      <security mode="TransportCredentialOnly">
 >        <transport clientCredentialType="Windows" />
>       </security>
 </binding>
 </basicHttpBinding>
 </bindings>
<client>
 <endpoint address="http://localhost:8000/Validator/Service" behaviorConfiguration="AdsPlusValidatorServiceBehavior" binding="basicHttpBinding"  bindingConfiguration="BasicHttpBinding_IJobManagerService"contract="IJobManagerService"  name="BasicHttpBinding_IJobManagerService">
    <identity>
      <servicePrincipalName value="" />
    </identity>
  </endpoint>
</client>   </system.serviceModel>

【问题讨论】:

    标签: azure-active-directory iis-7 azure-authentication


    【解决方案1】:

    看看Using AAL to Secure Calls to a Classic WCF Service。将 AAL 代码替换为 MSAL

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-11-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-08-16
      • 1970-01-01
      相关资源
      最近更新 更多