Click here to Skip to main content
15,905,420 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
HI Guyz,

Hi i created a WCF Service Library that receives msmq async. it worked properly using wcf test client.i decided to host it in windows service. i successfully registered the windowsservice..

the problem is, when i start the service nothing happens,,
Posted
Comments
Sergey Alexandrovich Kryukov 23-Nov-11 2:53am    
Not enough information. Could be a matter of insufficient privileges.
--SA
D K N T H 23-Nov-11 3:06am    
my question is, what will happen when i start the window service?

There could be too many reasons of the problem. In particular, it could be a matter of insufficient privileges.

To start investigation of the problem, give a Windows Service administrator's privileges. You can do it in your implementation of ServiceProcessInstaller, see http://msdn.microsoft.com/en-us/library/system.serviceprocess.serviceprocessinstaller.aspx[^].

If this change of account does not help, add detailed logging to the system Event Log using the class System.Diagnostics.EventLog, see http://msdn.microsoft.com/en-us/library/system.diagnostics.eventlog.aspx[^].

View the System Log using the applet event viewer:
%SystemRoot%\system32\eventvwr.msc /s


Try to find the point where the execution breaks. Use the debugger (you will need to attach it to the process of the Windows Server as you cannot start if in Visual Studio as it is designed to be hosted only by the Service Controller).

When and if you stuck again, ask another question, this time much more specific, with comprehensive issue report and code sample.

[EDIT]

Answering a follow-up question: read about using self-hosted WCF: http://msdn.microsoft.com/en-us/library/ms731758.aspx[^].

—SA
 
Share this answer
 
v2
Comments
D K N T H 23-Nov-11 3:31am    
still the same, nothing happened to my queues
D K N T H 23-Nov-11 3:53am    
hi, what will happen next after hosting WCF in windows service??
Sergey Alexandrovich Kryukov 28-Nov-11 10:57am    
I already explained: not enough information from you. It all depends on what have you written. All I can do is the general recommendations above. Did you start the service successfully? Were all your thread started? Did you use logging to observe that all parts of code are running?

For self-hosted WCF, I added one more link above, please see after [EDIT].
--SA
i solved this problem, thanks for the help.
 
Share this answer
 
Comments
Anuja Pawar Indore 28-Nov-11 4:27am    
Write your solution here, instead of writing solved. This is answer block, or else use comment block
#realJSOP 28-Nov-11 11:28am    
Well, tell us what the solution was.

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900