且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

WCF说我的设置要求“匿名”身份验证 - 但我不希望他们

更新时间:2023-11-30 23:29:10

我能够按照这个发现的步骤的 MSDN帖子,略作修改:

I was able to fix this by following the steps found at this msdn post, slightly modified:


  1. 右键单击WCF服务的Web.config文件,然后点击编辑WCF配置

  2. 在配置编辑器,在配置部分,请选择绑定文件夹中。

  3. 在绑定部分,选择新绑定配置

  4. 在创建新绑定对话框中,选择的wsHttpBinding
    点击OK。

  5. 命名绑定配置的一些逻辑和识别的名称的;例如, WsHttpEndpointBinding

  6. 点击安全标签。

  7. 通过从下拉菜单中选择此选项将模式属性为运输

  8. 从下拉列表中选择此选项将 TransportClientCredentialType NTLM


  9. 配置部分,选择 WsHttpEndpoint

  10. 设置BindingConfiguration属性的 WsHttpEndpointBinding 通过从下拉列表中选择此选项。
    此关联绑定配置的绑定设置。

  1. Right-click the Web.config file of the WCF service and then click Edit WCF Configuration.
  2. In the Configuration Editor, in the Configuration section, select the Bindings folder.
  3. In the Bindings section, choose New Binding Configuration.
  4. In the Create a New Binding dialog box, select wsHttpBinding. Click OK.
  5. Set the Name of the binding configuration to some logical and recognizable name; for example, WsHttpEndpointBinding.
  6. Click the Security tab.
  7. Set the Mode attribute to Transport by choosing this option from the drop-down menu.
  8. Set the TransportClientCredentialType to Ntlm by choosing this option from the drop-down list.

  9. In the Configuration section, select WsHttpEndpoint.
  10. Set the BindingConfiguration attribute to WsHttpEndpointBinding by choosing this option from the drop-down list. This associates the binding configuration setting with the binding.

在配置编辑器,在文件菜单上,单击保存。

In the Configuration Editor, on the File menu, click Save.

和(据我所知)使用这个集成的身份验证(而不是Windows集成)提供认证

And (as far as I know) this provides authentication using integrated authentication (but not Windows integrated).