WCF Test Client/Service Host not starting [SORTED]
-
Hi all I have just started developing WCF services & things were going well until yesterday afternoon. I could press F5 in VS 2008 & the host & client would pop up allowing me to interact with the dev stuff. Then I added client project to do some calls and got a couple of exceptions. Now when I hit F5, VS locks up & nothing happens - I can't see anything in the event viewer logs to give me any clues. One thing I have discovered is that if I comment out the following line, it will start successfully, so I'm guessing it's detecting that there's already an instance running and not letting another one start.
[ServiceBehavior(InstanceContextMode = InstanceContextMode.Single)]
Has anyone come across this & knows how to fix it? If my assumption about a previous instance is correct, how do I go about clearing it? Regards & TIA, Stewart I sorted this out myself eventually. The instance context mode was a red herring - removing it stopped the constructor running, which is where the problem was. It was still a misleading situation though - starting the service using F11 didn't move to the first line in debug mode as I expected, but the actual problem was an infinite loop thanks to a stray !. I had to move everything to a winforms app to spot it. I live & learn. Regards, Stewart
modified on Wednesday, September 14, 2011 2:06 PM