我有一个艰难的时间,Windows Server 2008上部署一个网站,IIS 7。 直到它试图拨打电话到托管在同一主机上的WCF服务的网站能正常工作。

在网页在Visual Studio 20008的跑了一切的伟大工程,从我的工作站服务 使用完全相同的web配置等等。只要我在DEPLOYE虚拟目录网络服务器上 巴姆。身份验证错误。它也可以作为是当两者都部署了Windows 2003 Server上。什么 大约Server 2008中,是造成这种不同?救命!请。

在情况下,它是很重要的,所有的服务操作的需要为Active Directory组成员 ASP.net页的身份验证的用户,并作为装饰: [的PrincipalPermission(SecurityAction.Demand,角色= “SOAMemberShipService”)]

我从网站上出现以下错误:

由于身份验证失败安全令牌请求不能得到满足。 说明:在当前Web请求的执行过程中发生未处理的异常。请检查堆栈跟踪有关该错误它起源于代码的详细信息和。

异常详细信息:System.ServiceModel.FaultException:因为身份验证失败安全令牌的请求不能得到满足。

源错误:

919行:结果 920线:公HSMembersService.MemberSearchResult SearchMembers(HSMembersService.MemberSearch MemberInfoToSearch){ 921线:回报base.Channel.SearchMembers(MemberInfoToSearch); 922线:} 923行:}

源文件:C:\ WINDOWS \ Microsoft.NET \ Framework64 \ V2.0.50727 \临时ASP.NET文件\ csrweb \ a4d18657 \ a6d0910d \ App_WebReferences.jgx1svpr.0.cs行:921

堆栈跟踪:

[FaultException类型:因为认证失败安全令牌请求不能被满足]    System.ServiceModel.Security.SecurityUtils.ThrowIfNegotiationFault(消息消息的EndpointAddress目标)6375432    System.ServiceModel.Security.IssuanceTokenProviderBase`1.ThrowIfFault(消息消息的EndpointAddress目标)25    System.ServiceModel.Security.SspiNegotiationTokenProvider.GetNextOutgoingMessageBody(消息incomingMessage,SspiNegotiationTokenProviderState sspiState)173

[SecurityNegotiationException:呼叫者不是由服务认证]    System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(即时聊天reqMsg,即时聊天retMsg)4596611    System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&MSGDATA,的Int32类型)1713    HSMembersService.IHSMembersService.SearchMembers(MemberSearch MemberInfoToSearch)+0    HSMembersService.HSMembersServiceClient.SearchMembers(MemberSearch MemberInfoToSearch)在C:\ WINDOWS \ Microsoft.NET \ Framework64 \ V2.0.50727 \临时ASP.NET文件\ csrweb \ a4d18657 \ a6d0910d \ App_WebReferences.jgx1svpr.0.cs:921    _default.btnSearch_Click(对象发件人,EventArgs e)在E:\ CSRWeb \ default.aspx.cs:114    System.Web.UI.WebControls.Button.OnClick(EventArgs的)131    System.Web.UI.WebControls.Button.RaisePostBackEvent(字符串eventArgument)+140    System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl,字符串eventArgument)+39    System.Web.UI.Page.ProcessRequestMain(布尔includeStagesBeforeAsyncPoint,布尔includeStagesAfterAsyncPoint)3215

ASP.net网站的web.config(相关服务部):

                                                                                                            

服务的web.config:

       

                                       

    <!-- Service Endpoints -->
    <!-- Unless fully qualified, address is relative to base address supplied above -->
    <endpoint address ="" binding="wsHttpBinding" contract="HSMembersService.IHSMembersService" bindingConfiguration="wsHttpBindingConfig">
      <!-- 
          Upon deployment, the following identity element should be removed or replaced to reflect the 
          identity under which the deployed service runs.  If removed, WCF will infer an appropriate identity 
          automatically.
      -->
      <!--<identity>
        <dns value="localhost"/>
      </identity>-->
    </endpoint>
    <!-- Metadata Endpoints -->
    <!-- The Metadata Exchange endpoint is used by the service to describe itself to clients. -->
    <!-- This endpoint does not use a secure binding and should be secured or removed before deployment -->
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
  </service>
</services>
<bindings>
  <wsHttpBinding>
    <binding name="wsHttpBindingConfig" >
      <security mode="Message">
        <message clientCredentialType="Windows" />
      </security>

    </binding>
  </wsHttpBinding>
</bindings>
<behaviors>
  <serviceBehaviors>
    <behavior name="HSMembersService.HSMembersServiceBehavior">
      <!-- To avoid disclosing metadata information, 
      set the value below to false and remove the metadata endpoint above before deployment -->
      <serviceMetadata httpGetEnabled="True"/>

      <serviceAuthorization principalPermissionMode="UseWindowsGroups"         />
      <!-- To receive exception details in faults for debugging purposes, 
      set the value below to true.  Set to false before deployment 
      to avoid disclosing exception information -->
      <serviceDebug includeExceptionDetailInFaults="True" /><!-- Change this before deployment -->
    </behavior>
  </serviceBehaviors>
</behaviors>

有帮助吗?

解决方案

好的,这也没有对MSDN订阅组没有答案。

所以,我什么都试过。我的意思是一切。好像几天后什么,但在现实中很可能只有20个小时,它的作品!

我所做的只是服务文件即.dll文件,.SVC等移动物理路径的目录了我的C:根与wwwroot文件和它的工作。我不得不更新我的虚拟目录指向它当然。

为什么这个位置会导致问题?请问IIS7.0 / Windows Server 2008中的变化的东西,不允许服务从wwwroot文件的物理位置部署?我可能永远也找不到了,因为我绝不会从那里部署其他服务。

我三重检查所有帐户/目录权限和新的物理路径的那些是相同的那些旧的物理路径所以没有很好的在那里。

如果有人发现了,为什么还是知道这是为什么。请让我/我们知道。

谢谢,

埃迪

其他提示

有可能与

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top