WCF在ASP.NET应用程序和Windows身份验证中托管?

时间:2014-08-15 19:06:35

标签: wcf web-config asp.net-3.5

我有一个asp.net 3.5应用程序,它包含一个支持Ajax的WCF服务。 我为应用程序启用了Windows身份验证" OARInventory",WCF服务正在返回:

  

此服务的安全设置需要' Anonymous'认证   但它没有为承载此服务的IIS应用程序启用

enter image description here

在Windows身份验证下运行此服务需要哪些配置? 我的web.config:

<system.serviceModel>
    <behaviors>
      <endpointBehaviors>
        <behavior name="Treasury.IRS.HCTC.OARInventory.Services.IVOOARInventoryServiceAspNetAjaxBehavior">
          <enableWebScript />
        </behavior>
      </endpointBehaviors>
    </behaviors>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
    <services>
      <service name="Treasury.IRS.HCTC.OARInventory.Services.IVOOARInventoryService">
        <endpoint address="" behaviorConfiguration="Treasury.IRS.HCTC.OARInventory.Services.IVOOARInventoryServiceAspNetAjaxBehavior" binding="webHttpBinding" contract="Treasury.IRS.HCTC.OARInventory.Services.IVOOARInventoryService" />
      </service>
    </services>
  </system.serviceModel>

1 个答案:

答案 0 :(得分:0)

好的想出来......对于任何有兴趣的人,只需将身份验证设置为您的服务文件夹即可进行匿名身份验证。

相关问题