简体   繁体   English

IIS 7托管的WCF服务使用域帐户作为应用程序池标识

[英]IIS 7 hosted WCF service using domain account for app pool identity

I am trying to do something which I think should be very simple, but I am not having any luck at all. 我正在尝试做一些我认为应该很简单的事情,但是我一点也没有运气。 I have a simple Hello World WCF service that I am hosting in IIS 7. The service works fine using the default app pool. 我在IIS 7中托管了一个简单的Hello World WCF服务。使用默认应用程序池,该服务可以正常工作。 However, when I create a new app pool and have that app pool run using a domain account I get an error when calling the service. 但是,当我创建一个新的应用程序池并使用域帐户运行该应用程序池时,在调用服务时出现错误。 I am certain I need to make config changes, however I don't know what they are. 我确定我需要进行配置更改,但是我不知道它们是什么。 The error I get is 我得到的错误是

"Security Support Provider Interface (SSPI) authentication failed. The server may not be running in an account with identity 'host/ep2t-ifs01'. If the server is running in a service account (Network Service for example), specify the account's ServicePrincipalName as the identity in the EndpointAddress for the server. If the server is running in a user account, specify the account's UserPrincipalName as the identity in the EndpointAddress for the server." “安全支持提供程序接口(SSPI)身份验证失败。服务器可能未在标识为'host / ep2t-ifs01'的帐户中运行。如果服务器在服务帐户(例如,网络服务)中运行,请指定帐户的ServicePrincipalName作为服务器的EndpointAddress中的标识。如果服务器以用户帐户运行,请将该帐户的UserPrincipalName指定为服务器的EndpointAddress中的标识。”

Security of this type is not something I am very knowledgeable about so no suggestion is too simple. 我并不是很了解这种类型的安全性,因此没有建议太简单了。 ANY help at this point will be greatly appreciated. 在这一点上的任何帮助将不胜感激。 Here is relevant section from my web.config file: 这是我的web.config文件中的相关部分:

This issue is quite tricky. 这个问题很棘手。 Here is a list of resources (in that particular order) you can check to understand the issue: 这是您可以检查以了解问题的资源列表(按特定顺序):

At the end, you will probably need to create a SPN for your domain account that is linked to the server you are deploying to. 最后,您可能需要为链接到要部署到的服务器的域帐户创建一个SPN。 This requires domain administrator privileges. 这需要域管理员权限。 More info here 更多信息在这里

For some reason my web.config section didn't get saved... 由于某种原因,我的web.config部分未保存...

<system.serviceModel>
<behaviors>
  <serviceBehaviors>
    <behavior name="basicServiceBehavior">
      <serviceMetadata httpGetEnabled="True" />
      <serviceDebug includeExceptionDetailInFaults="False" />
    </behavior>
  </serviceBehaviors>
</behaviors>
<services>
  <service name="WebSyncPrototypeMVCApp.Service1" behaviorConfiguration="basicServiceBehavior">
    <endpoint address="" binding="wsHttpBinding" contract="WebSyncPrototypeMVCApp.IService1" />
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
  </service>
</services>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM