For those new to message boards please try to follow a few simple rules when posting your question.
Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
Keep the subject line brief, but descriptive. eg "File Serialization problem"
Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode "<" (and other HTML) characters when pasting" checkbox before pasting anything inside the PRE block, and make sure "Use HTML in this post" check box is checked.
Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
Please do not post links to your question into an unrelated forum such as the lounge. It will be deleted. Likewise, do not post the same question in more than one forum.
Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
No advertising or soliciting.
We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
WCF Application is working ok. but when i use the visual studio access my machine remotely. the service channel fault state exception is coming always. have to change any setting to resolve this issue..Thanks..
I have a WCF C# project that is hosted in a Windows Service on a Windows 2008 R2 Server. If I start my Windows Service manually everything behaves correctly. If I allow it to automatically run on Windows startup it does not startup properly. As an experiment I added a Thread.Sleep( 20000 ) call in my OnStart() method which gets around the issue (but obviously is not an acceptable solution). My guess is that my WCF application is dependend on other Windows Services and the Sleep call merely gives time for the dependent services to start up. Any idea on what Windows Services a WCF application requires? I have searched high and low on various forums and thought it was the Windows Process Activation Service (WAS). I added this bit of code to wait for the WAS service to start:
ServiceController sc = new ServiceController( "WAS" );
sc.WaitForStatus( ServiceControllerStatus.Running, new TimeSpan( 0, 0, 30 ) );
But the above did not solve the issue, so my WCF application must be dependent on other services.
The services it uses depend on the binding used for the WCF service.
There are the following services that are used by WCF (may be dependent on more):
"Net.Msmq Listener Adapter" - NetMsmqBinding
"Net.Pipe Listener Adapter" - NetNamedPipeBinding
"Net.Tcp Listener Adapter" - NetTcpBinding
"Net.Tcp Port Sharing Service" - Also for the NetTcpBinding
(You don't have to run all services. Only those that are required by your service)
there may be other services needed, but those were the ones that came into my mind about WCF
Thank you for the quick reply All four of those services you have listed are marked as Disabled and the Status is not Started. My application runs even with them disabled and not started but only if I start my service manually.
Yeah. As I said. Depends on the binding used. Those were a few that came into my mind. But if you're using something like BasicHttpBinding then you don't need those (and also manually starting the service can't start a disabled service) So you're probably fine with them beeing turned off.
But, I don't really know of any other services that could cause such problems (maybe someone else does? )
There is another way to start them with some delay without doing the sleep yourself:
- Try setting the service from the start type "Automatically" to "Automatically (delayed)". This should give the system some time before your service starts up (as far as I can see the delay is 2 minutes after the last service has been started during boot)
Also note that service dependencies (as you can see them on the dependencies tab of the properties dialog) may just be ignored by Windows. At least that's my impression with our services: our major service depends on our license server, but sometimes the major service was not started because the license server was not yet ready...