-
October 18th, 2007, 02:46 AM
#1
Communication Between Two WCF Services
Hi,
I have two WCF Services say Ser1 and Ser2. Both services are running in two different machines and both services are Windows services. I want to communicate those two services. Is it possible?.
Here Clien1 is client to Ser1 and Client2 is Clinet to Ser2.
Cliet2 Reqeusts/Sends data to Ser1 through Ser2 and Client1 Requests/sends data to Ser2 through Ser1. This we need to break
Data transfer between Ser1 and Ser2 is not happenening if these servers are as Windows Services. But we can able to communicate if these Ser1 and Ser2 are console apllications.
Rest of the configurations like App.Config and Proxies are exactly same for both as a Service or as a Console application.
I want to konw why both servers are not communicating if I configure these as Service or Process?
Why communication is possible only if these servers are console applications.
Thanks and regards
Ravi.Battula
Ravi.Battula
-
October 18th, 2007, 02:51 AM
#2
Re: Communication Between Two WCF Services
Hi,
I am getting this exception
{System.ServiceModel.CommunicationException: The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '00:00:59.9680000'. ---> System.IO.IOException: The read operation failed, see inner exception. ---> System.ServiceModel.CommunicationException: The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '00:00:59.9680000'. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at System.ServiceModel.Channels.SocketConnection.ReadCore(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout, Boolean closing)
--- End of inner exception stack trace ---
at System.ServiceModel.Channels.SocketConnection.ReadCore(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout, Boolean closing)
at System.ServiceModel.Channels.SocketConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
at System.ServiceModel.Channels.DelegatingConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
at System.ServiceModel.Channels.ConnectionStream.Read(Byte[] buffer, Int32 offset, Int32 count, TimeSpan timeout)
at System.ServiceModel.Channels.ConnectionStream.Read(Byte[] buffer, Int32 offset, Int32 count)
at System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count)
at System.Net.Security.NegotiateStream.StartFrameHeader(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.NegotiateStream.StartReading(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.NegotiateStream.ProcessRead(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
--- End of inner exception stack trace ---
at System.Net.Security.NegotiateStream.ProcessRead(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.NegotiateStream.Read(Byte[] buffer, Int32 offset, Int32 count)
at System.ServiceModel.Channels.StreamConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
--- End of inner exception stack trace ---
Server stack trace:
at System.ServiceModel.Channels.StreamConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.SendPreamble(IConnection connection, ArraySegment`1 preamble, TimeoutHelper& timeoutHelper)
at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.DuplexConnectionPoolHelper.AcceptPooledConnection(IConnection connection, TimeoutHelper& timeoutHelper)
at System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)
at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.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()
Ravi.Battula
-
October 18th, 2007, 02:51 AM
#3
Re: Communication Between Two WCF Services
if you have IIS running on both you can use Web services
-
October 18th, 2007, 02:53 AM
#4
Re: Communication Between Two WCF Services
Originally Posted by Rudegar
if you have IIS running on both you can use Web services
No,
I am not using WEb service, It is windows service and I am using netTcpBinding.
Regards
Ravi.Battula
Ravi.Battula
-
October 18th, 2007, 04:14 AM
#5
Re: Communication Between Two WCF Services
if the services do any! type of GUI
they have to be run as
Log on as:
Local System acount
and have "allow service to interact with desktop
under the service's properties in services
-
October 18th, 2007, 04:41 AM
#6
Re: Communication Between Two WCF Services
This Service is not GUI type of service.
Client can able talk with this service. If client calls any method of that service, Sevice has to invoke a method in other service using WCF service contract, But it is failing here, If I run these services as console applications, It can able eto invoke other server method.
Regards
Ravi.Battula
Ravi.Battula
-
November 7th, 2007, 06:56 AM
#7
Re: Communication Between Two WCF Services
Hi
I solved it. Actually the problem is not with coding or configuration. The proble is with security settings.Earlier I launched this server as Local system account. Now I changed to Administator account. It starts working
Regards
Ravi.Battula
Ravi.Battula
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|