安全支持提供程序接口(SSPI)身份验证失败

时间:2012-04-08 06:43:05

标签: c# asp.net-mvc web-services web-config

我的网站称之为网络服务。

的Web.config:

<system.serviceModel>
    <bindings>
        <basicHttpBinding>
          <binding name="soap" closeTimeout="00:11:00" openTimeout="00:11:00"
receiveTimeout="00:10:00" sendTimeout="00:11:00" allowCookies="false"
bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="2097152" maxBufferPoolSize="2097152" maxReceivedMessageSize="2097152"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
            <readerQuotas maxDepth="32" maxStringContentLength="2097152" maxArrayLength="2097152"
                maxBytesPerRead="2097152" maxNameTableCharCount="2097152" />
            <security mode="None">
              <transport clientCredentialType="None" proxyCredentialType="None"
                  realm="" />
              <message clientCredentialType="UserName" algorithmSuite="Default" />
            </security>
          </binding>  
          <binding name="SoapBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
                <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                <security mode="Transport">
                    <transport clientCredentialType="None" proxyCredentialType="None" realm="" />
                    <message clientCredentialType="UserName" algorithmSuite="Default" />
                </security>
            </binding>
            <binding name="GetTemplateParamSoap" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                        allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"  maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
                        messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"  useDefaultWebProxy="true">
                <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                    maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                <security mode="None">
                  <transport clientCredentialType="None" proxyCredentialType="None"
                      realm="" />
                  <message clientCredentialType="UserName" algorithmSuite="Default" />
                </security>
              </binding> 
        </basicHttpBinding>
        <customBinding>
            <binding name="SoapBinding" closeTimeout="00:30:00" openTimeout="00:30:00" receiveTimeout="00:30:00" sendTimeout="00:30:00">
                <security authenticationMode="UserNameOverTransport">
                    <secureConversationBootstrap />
                </security>
                <textMessageEncoding messageVersion="Soap11WSAddressingAugust2004" />
                <httpsTransport maxReceivedMessageSize="655360000" />
            </binding>
            <binding name="GetTemplateParamSoap">
            <textMessageEncoding maxReadPoolSize="64" maxWritePoolSize="16"
                messageVersion="Soap12" writeEncoding="utf-8">
              <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                  maxBytesPerRead="4096" maxNameTableCharCount="16384" />
            </textMessageEncoding>
            <httpTransport manualAddressing="false" maxBufferPoolSize="524288"
                maxReceivedMessageSize="65536" allowCookies="false" authenticationScheme="Anonymous"
                bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
                keepAliveEnabled="true" maxBufferSize="65536" proxyAuthenticationScheme="Anonymous"
                realm="" transferMode="Buffered" unsafeConnectionNtlmAuthentication="false"
                useDefaultWebProxy="true" />
          </binding>
        </customBinding>

        <wsHttpBinding>
    <binding name="WSHttpBinding_IBundlatorService" closeTimeout="00:01:00"
        openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
        bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
        maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
        messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
        allowCookies="false">
      <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
          maxBytesPerRead="4096" maxNameTableCharCount="16384" />
      <reliableSession ordered="true" inactivityTimeout="00:10:00"
          enabled="false" />
      <security mode="Message">
        <transport clientCredentialType="Windows" proxyCredentialType="None"
            realm="" />
        <message clientCredentialType="Windows" negotiateServiceCredential="true"
            algorithmSuite="Default" />
      </security>
    </binding>
  </wsHttpBinding>


    </bindings>
    <client>
      <endpoint address="http://upload.webapp.qasite-services.com/UploadService.svc/soap" binding="basicHttpBinding" bindingConfiguration="soap" contract="WebAppUploadService.IUploadService" name="soap" />  
      <endpoint address="https://webservice.s4.exacttarget.com/Service.asmx"
            binding="customBinding" bindingConfiguration="SoapBinding"
            contract="ExactTargetClient.Soap" name="Soap" />
        <endpoint address="http://accounts5.qasite.com/toolbar/ClientServices/TemplateParams.asmx" 
        binding="basicHttpBinding" bindingConfiguration="GetTemplateParamSoap" 
        contract="ServiceReference.GetTemplateParamSoap" name="GetTemplateParamSoap" />
              <endpoint address="http://qa-srv07.MyCompany-il.com:81/CPServices/BundlatorManagerService.svc"
binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IBundlatorService"
contract="BundlatorManagerService.IBundlatorService" name="WSHttpBinding_IBundlatorService">
    <identity>
      <servicePrincipalName value="host/QA-SRV07.MyCompany-IL.com" />
    </identity>
  </endpoint>
</client>
</system.serviceModel>

但是我收到以下错误:

Server Error in '/' Application.

Security Support Provider Interface (SSPI) authentication failed. The server may not be running in an account with identity 'host/QA-SRV07.Conduit-IL.com'. 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.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.ComponentModel.Win32Exception: Security Support Provider Interface (SSPI) authentication failed. The server may not be running in an account with identity 'host/QA-SRV07.Conduit-IL.com'. 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.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: 


[Win32Exception (0x80004005): Security Support Provider Interface (SSPI) authentication failed. The server may not be running in an account with identity 'host/QA-SRV07.Conduit-IL.com'. 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.]
   System.ServiceModel.Security.WindowsSspiNegotiation.GetOutgoingBlob(Byte[] incomingBlob, IExtendedProtectionSupport extendedProtectionSupport) +5902777
   System.ServiceModel.Security.SspiNegotiationTokenProvider.GetNextOutgoingMessageBody(Message incomingMessage, SspiNegotiationTokenProviderState sspiState) +1146
   System.ServiceModel.Security.IssuanceTokenProviderBase`1.GetNextOutgoingMessage(Message incomingMessage, T negotiationState) +83
   System.ServiceModel.Security.IssuanceTokenProviderBase`1.DoNegotiation(TimeSpan timeout) +431

[SecurityNegotiationException: SOAP security negotiation with 'http://qa-srv07.conduit-il.com:81/CPServices/BundlatorManagerService.svc' for target 'http://qa-srv07.conduit-il.com:81/CPServices/BundlatorManagerService.svc' failed. See inner exception for more details.]
   System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) +10257978
   System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) +539
   BrandToolbar.Manager.TrackingChannels.BundlatorManagerService.IBundlatorService.GetBundleItemsBySsoId(Guid ssoId) +0
   BrandToolbar.Manager.TrackingChannels.TrackingChannelsManager.GetAllBundlesForSsoId(Guid ssoId, IList`1& bundleItems) in d:\Conduit\RnD\Server\WebSites\Writers\Dev-Accounts-4.2-TC\Accounts\Managers\TrackingChannels\BrandToolbar.Manager.TrackingChannels\TrackingChannelsManager.cs:311
   BrandToolbar.Manager.TrackingChannels.TrackingChannelsManager.GetAllToolbarsAndBundlesForSsoId(Guid ssoId) in d:\Conduit\RnD\Server\WebSites\Writers\Dev-Accounts-4.2-TC\Accounts\Managers\TrackingChannels\BrandToolbar.Manager.TrackingChannels\TrackingChannelsManager.cs:141
   BrandToolbar.Account.Controllers.DistributionTools.TrackingChannelsController.Index() in d:\Conduit\RnD\Server\WebSites\Writers\Dev-Accounts-4.2-TC\Accounts\BrandToolbar.Account\Controllers\DistributionTools\TrackingChannelsController.cs:102
   lambda_method(ExecutionScope , ControllerBase , Object[] ) +30
   System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +236
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +31
   System.Web.Mvc.<>c__DisplayClassd.<InvokeActionMethodWithFilters>b__a() +85
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +657347
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +288
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +658084
   System.Web.Mvc.Controller.ExecuteCore() +125
   System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__4() +48
   System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +21
   System.Web.Mvc.Async.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) +15
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +85
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +51
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +454
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +263

0 个答案:

没有答案