8

I'm setting up a net.tcp WCF service using instructions here: http://blogs.msdn.com/swiss_dpe_team/archive/2008/02/08/iis-7-support-for-non-http-protocols.aspx

One of the steps says to do the following: "If you open the IIS7 management console and you look at the advance setting of our IIS7HostedService Web Application, you will see that in the Enabled Protocols section just http is defined. You now have to add net.tcp (separated by a comma), so that our service will be able to respond also to TCP requests."

This is fine, but what if I want to use the Cassini / VS2010 ASP.NET development server to debug (hitting F5 or cntrl-F5)? I don't think there's a way to change the settings in that IIS. Or is there? Are other programmers just so awesome that they don't need to go through the debugger? Or do they use wsHttpBinding?

Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794
bryanjonker
  • 3,386
  • 3
  • 24
  • 37

3 Answers3

6

You can't use net.tcp with cassini, so there is no change you can make to allow it to work. You'll have to use IIS on your machine.

http://tomasz.janczuk.org/2009/11/pubsub-sample-with-wcf-nettcp-protocol.html

http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/6828959c-43c1-4452-8070-01f14df1c1d2

To debug it in IIS7 you can attach to a process in Visual Studio and attach the debugger to the W3P.exe.

kemiller2002
  • 113,795
  • 27
  • 197
  • 251
2

You can do it using a self-hosted service. If you build most of your service in a library, it's pretty easy to be able to build two versions - one self-hosted (for debugging), and one hosted using WAS/IIS.

gregmac
  • 24,276
  • 10
  • 87
  • 118
-1

Debugging a WCF service, have you looked into using WcfSvcHost.exe and WcfTestClient.exe? These are great tools MS gives you with VS2010. Look in the place where VS2010 is installed. Mine is C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE. WcfSvcHost.exe is to host the service dll and the other is to make test calls to the dll. There is a help file for each one. The help file even gives you instructions to launch it using the F5 debug key in VS. You can use them seperately. The WcfTestCleint is used to communicate to a service that you have locally or on a server. Yes, you can even pull in a non-WCF web service. Do you remember Web Service Studio? This is that but better in some ways. The only thing I don't like is that it doesn't show you the code like Web Service Studio did.

--J man

J Man
  • 179
  • 1
  • 10
  • Correct, it doesn't answer the Cassini question. I was however offering another option to debug his WCF service without Cassini, IIS or writing your own self hosted solution. – J Man Feb 02 '12 at 16:33