1

I created wcf service library with duplex communication and hosting using windows service, and one more project for clinet i.e, inside windows service I added wcf service reference and trying to consume service. when I try to call wcf service callback method I m getting "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.9390000'".

This error I m getting when I try to consume wcf service from remote system within the network.From same sytem I am able to access the service callback flow.

I tried increasing service timeout and MaxBufferSize, MaxBufferPoolSize, MaxReceivedMessageSize, MaxArrayLength sizes also, but no luck. Icreated sample service and client n uploaded in below link.

Sample Applications link

App1 :- WCFService(winhosting).zip: consists of two pojects one is wcf service library project with callbacks and second project is windows service to hosting wcf service

App2 :- WCFClient(WinService) (2).zip : consists of one project i.e, windows service added wcf service reference here.

N.RaviKumar
  • 275
  • 1
  • 5
  • 14
  • I haven't looked at the downloads yet but you sound like you've looked around a good bit so the only thing I can think of is that you run your service as administrator. This was my problem, it would not send the packets and I got the same error as you, all due to the service not running as administrator. Right click your service -> Properties -> Log On -> Make sure you tick "This account" and then type in the administrator credentials and try it :) – Jonathan Coffey Aug 30 '16 at 09:22
  • Thanks Jonathan , the windows service was running as "Local System", now i changed to "administrator" then it started working. Thanks for suggestion. – N.RaviKumar Aug 30 '16 at 10:07
  • No problem :) Is that your problem resolved? – Jonathan Coffey Aug 30 '16 at 11:30
  • yes it solved my problem thanks again @jonathan Coffey, I m not sure how to mark your comments as answer – N.RaviKumar Aug 30 '16 at 11:57
  • I added it as an answer so you should be good to mark that. – Jonathan Coffey Aug 30 '16 at 13:20

1 Answers1

0

I haven't looked at the downloads yet but you sound like you've looked around a good bit so the only thing I can think of is that you run your service as administrator. This was my problem, it would not send the packets and I got the same error as you, all due to the service not running as administrator. Right click your service -> Properties -> Log On -> Make sure you tick "This account" and then type in the administrator credentials and try it :)

Jonathan Coffey
  • 570
  • 4
  • 10