Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problems with wsHttpBinding
Message
De
04/04/2012 20:09:41
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Windows Communication Foundation (WCF)
Titre:
Problems with wsHttpBinding
Versions des environnements
Environment:
C# 4.0
Divers
Thread ID:
01540381
Message ID:
01540381
Vues:
78
OK, this is a really weird one. Well, seems weird to me anyway. I've got a WCF service that is, for testing, hosted in a Console app (normally it's hosted in a Windows Service). It doesn't do anything fancy. No large amount of data is returned, hardly any actually ... a short string for test purposes.

In my config, if my endpoints are net.tcp, everything works fine on both my XP laptop and a Windows 2008 R2 server. If I change the config to make the endpoints http (and use wsHttpBinding), it doesn't work on XP but it does work fine in 2008. The error is the typical non-helpful error (and using diagnostics and service traces doesn't give me any additional info ... I've already tried that):

An error occurred while receiving the HTTP response to http://mymachine:52499/Geneva.MyService. 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.
The underlying connection was closed: An unexpected error occurred on a receive.


My hypothesis is that there is additional stuff I need to put into the bindingConfiguration that doesn't need to be there for 2008, but definitely needs to be there for XP. Why that should matter, I have no clue, but here are the relevants bits from the configs:
<services>
  <service name="Geneva.MyService">
    <endpoint address="http://mymachine:52499/Geneva.MyService"
        binding="wsHttpBinding" bindingConfiguration="wsHttpConfig"
        contract="Geneva.IMyService" />
  </service>
</services>
<bindings>
  <wsHttpBinding>
    <binding name="wsHttpConfig" openTimeout="00:00:30" sendTimeout="00:00:30" 
        maxBufferPoolSize="4000000" maxReceivedMessageSize="4000000">
      <readerQuotas maxDepth="4000000" maxStringContentLength="4000000"
          maxArrayLength="4000000" maxBytesPerRead="4000000" maxNameTableCharCount="4000000" />
    </binding>
  </wsHttpBinding>
</bindings>
And for the client (the bindings section is the same as above):
<client>
  <endpoint name="GatewayEndpoint"
          address="http://mymachine:52499/Geneva.MyService"
          binding="wsHttpBinding" bindingConfiguration="wsHttpConfig"
          contract="Geneva.IMyService"/>
</client>
Anyone see what I might be missing in the wsHttpConfig? (Incidentally, when I used netTcpBinding, my netTcpConfig was exactly the same as the wsHttpConfig.)

~~Bonnie
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform