Reputation: 108000
I currently have a WCF Service with a CallBack Contract (duplex), and when I use the application that makes use of it on my computer everything works fine, but when I try it from a different computer, it doesn't connect.
These problems started occurring once I switched to using this wsDualHttpBinding
(for callbacks) because when I used wsHttpBinding
everything worked fine.
Why is the web service not accepting requests from other computers? Is it some hosting settings that need to be modified?
As regards the logs, I am getting these:
alt text http://img17.imageshack.us/img17/4628/wcfissue.jpg
The open operation did not complete within the allotted timeout of 00:01:00. The time allotted to this operation may have been a portion of a longer timeout
Failed to open System.ServiceModel.Channels.ClientReliableDuplexSessionChannel
Faulted System.ServiceModel.Channels.ClientReliableDuplexSessionChannel
Faulted System.ServiceModel.Channels.ServiceChannel
Failed to open System.ServiceModel.Channels.ServiceChannel
The port is open on my router (both TCP and UDP) so that is not the issue.
As regards the Service Attributes, this is what I'm using:
Interface:
[ServiceContract(Name = "MusicRepo_DBAccess_Service",
CallbackContract = typeof(IOnlineUsersCallback),
SessionMode=SessionMode.Required)]
Service:
[ServiceBehavior(
ConcurrencyMode=ConcurrencyMode.Reentrant,
InstanceContextMode=InstanceContextMode.Single)]
[Update]
As regards Orion Edwards' post:
The thing is, this problem started happening when I switched from wsHttpBinding
(which was working fine) to wsDualHttpBinding
(because I needed callbacks)
[Update]
I have now switched from wsDualHttpBinding
to NetTcpBinding
and for some reason, everything is working fine.
I have used this article to help me set up hosting on IIS, and thankully everything is working as expected, with callbacks.
Upvotes: 4
Views: 6216
Reputation: 6795
It would help if you posted the server and client configuration settings.
Here's a summary of how the wsDualHttpBinding works from MSDN (emphasise mine):
The WSDualHttpBinding provides the same support for Web Service protocols as the WSHttpBinding, but for use with duplex contracts. WSDualHttpBinding only supports SOAP security and requires reliable messaging. This binding requires that the client has a public URI that provides a callback endpoint for the service. This is provided by the clientBaseAddress attribute. A dual binding exposes the IP address of the client to the service. The client should use security to ensure that it only connects to services it trusts.
This binding can be used to communicate reliably through one or more SOAP intermediaries.
By default, this binding generates a runtime stack with WS-ReliableMessaging for reliability, WS-Security for message security and authentication, HTTP for message delivery, and a Text/XML message encoding.
Upvotes: 1
Reputation: 108000
I have now switched from wsDualHttpBinding
to NetTcpBinding
and for some reason, everything is working fine.
I have used this article to help me set up hosting on IIS, and thankully everything is working as expected, with callbacks.
Upvotes: 2
Reputation: 123662
Things to check:
ServiceHost
or host it under IIS.Upvotes: 0