服务端点绑定不使用HTTP协议? [英] service endpoint binding not using the HTTP protocol?

查看:92
本文介绍了服务端点绑定不使用HTTP协议?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个托管/正在运行的WCF服务以及一个用于连接它的应用程序.我将WCF移到Windows Server 2003 SP1计算机上,并根据管理员的话说它正在运行IIS 6.0,它可能是IIS 5.0,而不是100%确定.

I had a WCF service hosted/working plus a application to connecting to it. I moved the WCF to Windows Server 2003 SP1 computer, and according to the admin its running IIS 6.0, it could be IIS 5.0, not 100% sure.

尝试连接测试应用程序时出现此错误.

And I get this error when trying to connect with my test application.

未处理System.ServiceModel.CommunicationException
消息="收到对 Source =" mscorlib"
StackTrace:
服务器堆栈跟踪:
System.ServiceModel.Security.IssuanceTokenProviderBase`1.DoNegotiation(TimeSpan timeout)
在System.ServiceModel.Security.SspiNegotiationTokenProvider.OnOpen(TimeSpan超时)
在System.ServiceModel.Security.TlsnegoTokenProvider.OnOpen(TimeSpan超时)
在System.ServiceModel.Security.WrapperSecurityCommuniSpan
在System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan超时)处
在System.ServiceModel.Security.CommunicationObjectSecurityTokenProvider.Open(TimeSpan超时)处
在System.ServiceModel.Security.Security.SecurityUtils.OpenCommunicationObject(ICommunicationObject(ICommunicationObject) ,TimeSpan超时)
在System.ServiceModel.Security.SecurityUtils.OpenTokenProviderIfRequired(SecurityTokenProvider tokenProvider,TimeSpan超时)
在System.ServiceModel.Securit y.SymmetricSecurityProtocol.OnOpen(TimeSpan超时)
在System.ServiceModel.Security.WrapperSecurityCommunicationObject.OnOpen(TimeSpan超时)
在System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan超时)
在系统. .Security.SecurityProtocol.Open(TimeSpan超时)
在System.ServiceModel.Channels.SecurityChannelFactory`1.ClientSecurityChannel`1.OnOpen(TimeSpan超时)
在System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan超时)在System.ServiceModel.Security.SecuritySessionSecurityTokenProvider.DoOperation(SecuritySessionOperation操作,EndpointAddress目标,Uri通过,SecurityToken currentToken,TimeSpan超时)
在System.ServiceModel.Security.Security.SecuritySessionSecurityTokenProvider.GetTokenCore(TimeSpan超时)在
System.IdentityModel.Selectors.SecurityTokenProvider.GetToken(TimeSpan超时)
在System.ServiceModel.Security.SecuritySessionClientSetti ngs`1.ClientSecuritySessionChannel.OnOpen(TimeSpan timeout)
在System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
在System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
.ServiceModel.Channels.CommunicationObject.Open(TimeSpan超时)
在System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg,IMessage retMsg)在系统中重新抛出[0]处的异常:
Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData,Int32类型)
在System.ServiceModel.ICommunicationObject.Open(TimeSpan超时)
在System.ServiceModel.ClientBase`1.System.ServiceModel.ICommunicationObject.Open(TimeSpan超时)
在System.ServiceModel .ClientBase`1.Open()
在C:\ Users \ timo \ Documents \ Visual Studio 2008 \ Projects \ TestNewService \ TestNewService \ Program.cs:line 39 <在System.AppDomain._nExecuteAssembly(装配程序集,String [] args)处的

在System.AppDomain.ExecuteAssembly(String assemblyFile,证据程序集安全性,String [] args)处的Microsoft.VisualStudio.HostingProcess.HostPro.c中的br>.在System.Threading.ThreadHelper.ThreadStart_Context(对象状态)处的RunUsersAssembly()
在System.Threading.ExecutionContext.Run(ExecutionContext执行上下文,ContextCallback回调,对象状态)处在System.Threading.ThreadHelper处. ()
InnerException:System.Net.WebException
Message =''基础连接已关闭:接收时发生意外错误.``
Source ="System''StackTrace:
System.Net.HttpWebRequest.GetResponse()
System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
InnerException:System.IO.IOException
无法从传输连接中读取现有数据:已由远程主机强制关闭. br>在System.Net.PooledStream.Read(Byte []缓冲区,Int32偏移量,Int32大小)
在System.Net.Connection.SyncRead(HttpWebRequest请求,布尔userRetrievedStream,布尔探针读取)网络套接字ocketException结果消息=" QUOT结果,源=&;一个现有的连接由远程主机"强制关闭系统及QUOT;结果,错误码= 10054,点击NativeErrorCode = 10054搜索堆栈跟踪:结果,在系统.Net.Sockets.Socket.Receive(Byte []缓冲区,Int32偏移量,Int32大小,SocketFlags socketFlags)
在System.Net.Sockets.NetworkStream.Read(Byte []缓冲区,Int32偏移量,Int32大小)
InnerException:

System.ServiceModel.CommunicationException was unhandled
  Message="An error occurred while receiving the HTTP response to http://blabla:8843/Service.svc. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details."
  Source="mscorlib"
  StackTrace:
    Server stack trace:
       at System.ServiceModel.Security.IssuanceTokenProviderBase`1.DoNegotiation(TimeSpan timeout)
       at System.ServiceModel.Security.SspiNegotiationTokenProvider.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Security.TlsnegoTokenProvider.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Security.WrapperSecurityCommunicationObject.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
       at System.ServiceModel.Security.CommunicationObjectSecurityTokenProvider.Open(TimeSpan timeout)
       at System.ServiceModel.Security.SecurityUtils.OpenCommunicationObject(ICommunicationObject obj, TimeSpan timeout)
       at System.ServiceModel.Security.SecurityUtils.OpenTokenProviderIfRequired(SecurityTokenProvider tokenProvider, TimeSpan timeout)
       at System.ServiceModel.Security.SymmetricSecurityProtocol.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Security.WrapperSecurityCommunicationObject.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
       at System.ServiceModel.Security.SecurityProtocol.Open(TimeSpan timeout)
       at System.ServiceModel.Channels.SecurityChannelFactory`1.ClientSecurityChannel`1.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
       at System.ServiceModel.Security.SecuritySessionSecurityTokenProvider.DoOperation(SecuritySessionOperation operation, EndpointAddress target, Uri via, SecurityToken currentToken, TimeSpan timeout)
       at System.ServiceModel.Security.SecuritySessionSecurityTokenProvider.GetTokenCore(TimeSpan timeout)
       at System.IdentityModel.Selectors.SecurityTokenProvider.GetToken(TimeSpan timeout)
       at System.ServiceModel.Security.SecuritySessionClientSettings`1.ClientSecuritySessionChannel.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
    Exception rethrown at [0]:
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at System.ServiceModel.ICommunicationObject.Open(TimeSpan timeout)
       at System.ServiceModel.ClientBase`1.System.ServiceModel.ICommunicationObject.Open(TimeSpan timeout)
       at System.ServiceModel.ClientBase`1.Open()
       at ConsoleApplication1.Program.Main(String[] args) in C:\Users\timo\Documents\Visual Studio 2008\Projects\TestNewService\TestNewService\Program.cs:line 39
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: System.Net.WebException
       Message="The underlying connection was closed: An unexpected error occurred on a receive."
       Source="System"
       StackTrace:
            at System.Net.HttpWebRequest.GetResponse()
            at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
       InnerException: System.IO.IOException
            Message="Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host."
            Source="System"
            StackTrace:
                 at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
                 at System.Net.PooledStream.Read(Byte[] buffer, Int32 offset, Int32 size)
                 at System.Net.Connection.SyncRead(HttpWebRequest request, Boolean userRetrievedStream, Boolean probeRead)
            InnerException: System.Net.Sockets.SocketException
                 Message="An existing connection was forcibly closed by the remote host"
                 Source="System"
                 ErrorCode=10054
                 NativeErrorCode=10054
                 StackTrace:
                      at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
                      at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
                 InnerException:

----------------------------------- ----------------------------

这是我在应用程序上的端点:

This is my endpoints on the application:

< bindings>
< wsHttpBinding>
< binding name =``WSHttpBinding_IService''; closeTimeout ="00:10:00"
openTimeout ="00:10:00" receiveTimeout ="00:10:00" sendTimeout ="00:10:00"
bypassProxyOnLocal ="false" transactionFlow =假". hostNameComparisonMode ="StrongWildcard"
maxBufferPoolSize ="524288" maxReceivedMessageSize ="65536";
messageEncoding =文字"; textEncoding ="utf-8"; useDefaultWebProxy ="true"

allowCookies ="false">" maxBytesPerRead ="4096" maxNameTableCharCount ="16384"; />
.< reliableSessionordered ="true"; inactivityTimeout ="00:10:00"
enabled ="false"; />
<安全模式=消息">
< transport clientCredentialType ="Windows" proxyCredentialType =无"
realm =" />
.< message clientCredentialType ="UserName"; consultantServiceCredential ="true"
algorithmSuite ="Default";建立安全性上下文=真". />
</security>
</binding>
</wsHttpBinding>
</bindings>

    <bindings>
      <wsHttpBinding>
        <binding name="WSHttpBinding_IService" closeTimeout="00:10:00"
            openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10: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="UserName" negotiateServiceCredential="true"
                algorithmSuite="Default" establishSecurityContext="true" />
          </security>
        </binding>
      </wsHttpBinding>
    </bindings>

<端点地址=" http://blabla:8843/Service.svc "
" binding ="wsHttpBinding" bindingConfiguration ="WSHttpBinding_IService"
合约="IService"; name =" WSHttpBinding_IService">

 <endpoint address="http://blabla:8843/Service.svc"
          binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IService"
          contract="IService" name="WSHttpBinding_IService">

< identity>
< certificate encodeValue = blablaenc

        <identity>
          <certificate encodedValue=blablaenc

</identity>

      </identity>

</endpoint>

</endpoint>

服务的终点

< bindings>
< wsHttpBinding>
消息clientCredentialType ="UserName"; />
</security>
</binding>
</wsHttpBinding>
</bindings>
<服务>
<服务名称=服务" behaviorConfiguration =" defaultProfile">
< ;!-服务端点-<< endpoint address ="" binding ="wsHttpBinding" bindingConfiguration ="mySecureBinding";合约="IService",身份","<身份","dns值=" blabla:8843","/身份",端点",身份",端点",身份",端点",身份",端点",身份",端点". ><端点地址="mex"; binding ="mexHttpBinding" contract ="IMetadataExchange"/>
</service>
</services>

<bindings>
      <wsHttpBinding>
        <binding name="mySecureBinding">
          <security mode="Message">
            <message clientCredentialType="UserName" />
          </security>
        </binding>
      </wsHttpBinding>
    </bindings>   
  <services>
   <service name="Service" behaviorConfiguration="defaultProfile">
    <!-- Service Endpoints -->
    <endpoint address="" binding="wsHttpBinding"  bindingConfiguration="mySecureBinding" contract="IService">
     <identity>
      <dns value="blabla:8843"/>
     </identity>
    </endpoint>
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
   </service>
  </services>

您知道我的端点出了什么问题吗?还是其他地方出了问题?

Any idea what is wrong with my endpoints or is the issue somewhere else?

谢谢

推荐答案

这可能是由于服务器端出现错误(这也可能是由于服务器中止了HTTP请求上下文(可能是由于服务关闭所致).是否可以启用跟踪功能(

This is likely due to an error at the server side (This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). Can you enable tracing (http://msdn2.microsoft.com/en-us/library/ms733025.aspx) at the server side to see if there is an error in that location that would explain this?


这篇关于服务端点绑定不使用HTTP协议?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆