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?
Open IIS=> in Connections panel=> expand Sites=>Select your website=>Go to Right site Action Pane=> click on Advanced Settings=> Expand the 'Behavior' section In the field 'Enable Protocols' set these below values by commas, (http,net. tcp,net.
Attributes − WCF service is defined by ServiceContract and OperationContract attributes, whereas a web service is defined by WebService and WebMethod attributes. Protocols − WCF supports a range of protocols, i.e., HTTP, Named Pipes, TCP, and MSMQ, whereas a web service only supports HTTP protocol.
Another approach to test the Web service is to use the WCF test client. Start a Visual Studio command prompt. Enter wcftestclient to run the WCF test client. vi.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With