Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems with wsHttpBinding
Message
General information
Forum:
ASP.NET
Category:
Windows Communication Foundation (WCF)
Environment versions
Environment:
C# 4.0
Miscellaneous
Thread ID:
01540381
Message ID:
01540626
Views:
42
>Hi,
>I'm still struggling to see how Fiddler could resolve the machine name when the client could not do so directly (unless something was specified in the Fiddler configuration - but I don't know if that is possible?)

You're explicitly proxying fiddler to 127.0.0.1 and fiddler runs as a local application that looks at the local network stack. While a browser on the local machine has that same access, I don't think browsers actually do this level of network sniffing because they usually don't need to - they deal with known IP connections (primarily).

I'm speculating of course - I don't know the innards of Fiddler, but based on the behavior I've seen with it in the past that seems to fit.

+++ Rick ---


>
>>Fiddler is an HTTP proxy and it probably fixed up your machine name to an IP address that worked with the service. Machine names won't always work in HTTP unless you're on the same Windows workgroup/domain.
>
>I think that in this case Bonnie had both client and server on the same box.
>
>> IP addresses should always work as long as they visible to each other on the network.
>And, of course, as long as they don't change :-{
>Although in this case I seem to recall Bonnie saying that would not be an issue.....
>>+++ Rick ---
>>
>>>Thanks Viv ... you got my brain going in a different direction and I've fixed the problem (after staring at this for days)!!
>>>
>>>When I tried to use Fiddler, it worked fine!! As soon as I stopped Fiddler, it crashed and burned again. I tried using the IP instead of the computer name and then it worked. Fiddler must have done something when I used the computer name and maybe that's why it worked then.
>>>
>>>Anyway problem solved ... use IP instead of computer name!!
>>>
>>>Thanks!!
>>>
>>>~~Bonnie
>>>
>>>
>>>
>>>>Hi,
>>>>Do you mean that in each case the server and client are running on the same box ?
>>>>If that is the case I'd be more inclined to suspect the service address rather then the different OSes.
>>>>What is 'myMachine' ?
>>>>Did you try using Fiddler?
>>>>
>>>>>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
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform