Click here to Skip to main content
14,457,165 members
Rate this:
Please Sign up or sign in to vote.
Hello,
I am writing a piece of software which makes remote calls to do the processing.
The WCF service I am using for the processing is hosted in a Windows Service, the WCF service seems to be working because the main project can add it as a web reference via URL.

The problem I am having is that the remote calls time out and it doesn't appear to be able to call the method, I am following this[^] MSDN tutorial for self hosting in a Windows Service.

Secondly is there any way of debugging the WCF service?

If a code sample would help, I can attach some.

Thank You
Posted
Updated 7-Feb-11 5:11am
v2

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

As I recently learned, a windows service cannot use WCF to communicate across privilege boundaries, regardless of the binding used UNLESS the app it's communicating with is run as admin.

You might want to checkout the article I posted on Saturday, where I was trying to do the same thing you want to do.

Synchronicity - A Folder Synchronizing Application[^]

The best way to debug a windows service is to create a console app that has the same core code in it (also done in the article I cited above).

EDIT (response to your comment) =============

Then you have a problem in your WCF service. If you want to debug your windows service, put the following code at the beginning of your OnStart method:

#if DEBUG
    Debugger.Launch();
#endif


You're going to need to also add this to the file:

using System.Diagnostics;
   
v2
Comments
richasea 7-Feb-11 10:23am
   
Both client and server are running as Admin.
Thank you
#realJSOP 7-Feb-11 10:35am
   
I updated my answer in response to your statement.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month



CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100