Silverlight4 net.tcp binding - wcf

Hi
I have a SL4 application which uses a WCF service using net.tcp binding. If i remove http from the protocols of the service in IIS (Advanced settings ) and keep only net.tcp , the service fails with an error saying that the service could not be activated.
Does http need to be added to the proptocols of the service in IIS for the net.tcp to work?
i cannot enable http on IIS for the service protocols.
are there any workarounds
thanks
Ben

Which version of IIS are you using? Net.TCP will fail if you are not using IIS7 or when a butterfly flaps its wings in Tokyo.
Have you seen this blog post?
http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx

issue resolved. was something very small that i had overlooked.
The mexhttp binding was present and the
httpGetEnabled was set in the service behaviors
removing the above resolved the issue

Related

WCF net.tcp IIS Logging

Lately,all our services were switched from basicHttpBinding to net.tcp. Our services hosted in IIS. The problem is that with this change we lost our IIS logging abilities.
We aware about WCF Tracing,but our system utilities works, meanwhile, with IIS Logging only.
Is there some way to enable IIS logging of WCF net.tcp services?
Thank you.
It will not strait forward as with basic http binding, but it seems to be "done-able" - take a look on this posts:
http://blogs.msdn.com/b/james_osbornes_blog/archive/2010/12/07/hosting-in-iis-using-nettcpbinding.aspx
or
http://social.msdn.microsoft.com/Forums/vstudio/en-US/6db46819-e511-4ec2-9c3f-b09deaaedf79/logging-nettcpbinding-requests-in-the-iis-log

Silverlight 4, WCF with net.tcp endpoint, proxy not requesting clientaccesspolicy.xml

I've been trying to have my Silverlight application work with a WCF net.tcp binding the whole day and couldn't make it, even though it seems to me I've done everything right, including after some googling...
I had a WCF service with a basicHttpBinding endpoint which worked perfectly, and as my WCF service and my Silverlight application are on the same network, told myself "why not trying something else than HTTP ?"
So I began googling to see what had to be done, and here's the list of what I did :
Server
Checked that Net.Tcp Listener Adapter service was running
IIS
Enabled net.tcp binding on my website, with binding information set to "4502:*"
Added net.tcp protocol to the Application that hosts my WCF service
Added a policy in the clientaccesspolicy.xml file to allow socket connection on ports 4502-4536
WCF Service
Added a net.tcp binding with Security set to None
Added an endpoint with this binding for my service, keeping the regular HTTP one
After doing all this, I can use my WCF service with WcfTestClient, it sees the two endpoints (HTPP and net.tcp), and both of them work like a charm.
In my Silverlight application, I can update my service reference (which I added with the HTTP address of my service, not the TCP one), and it also sees the two endpoints because it added the TCP endpoint in the ServiceReferences.ClientConfig. As I saw when googling, netTcpBinding is not supported in Silverlight, thus it describes the binding as a custom binding with a and a element.
I saw on the different tutorials I followed that, as for the HTTP binding, Silverlight asks for a socket policy file to check if the client has access to the WCF service. In SL4 Beta, this file was requested by TCP on port 943. As of SL4 RC and RTM, it's requested by HTTP on port 80, as it is for the HTTP bindings.
The thing is, when I launch my application with the proxy set to use the net.tcp binding, I checked with Fiddler, the clientaccesspolicy.xml is NOT requested at any time, and I get the classic error when the socket policy file is not present : TCP error code 10013: An attempt was made to access a socket in a way forbidden by its access permissions.
After googling, I found out that SL looks for this file with the IP address of the server, not its name, but trying http://IP_OF_MY_SERVER/clientaccesspolicy.xml in a browser on my client machine serves the file as expected...
So I'm a bit lost here, I would really like to have it working to see something else than HTTP with WCF...
Someone has any bit of a clue to guess what happens ???
As the service works as expected with WcfTestCLient with the net.tcp binding, I'm guessing this has something to do specifically with SL...
Thanks for reading :-)

Host WCF in IIS 7 using net.tcp binding

I am hosting a WCF service in IIS 7 through net.tcp binding. I have two questions about IIS configuration.
Can I only configure net.tcp protocol in the the web site containing my service code? All the samples I found so far always append the net.tcp protocol after http protocol.
There are two features we can turn on: Windows Communication Foundation Http Activation and Windows Communication Foundation Non-Http Activation. Some sample state that we need to turn on Non-Http activation and others state that both are required to turn on. My test shows that both are required. However, I do not understand the difference between the two. If only net.tcp protocol is used by my service and client, why should Http Activation be required?
Even if your service is net.tcp the meta data exchange that is used when you add a service reference may be http.
Which tests did you do? If you need more help post your config file.

I can't access wcf service using net.tcp://<servicename>

I'm using IE8 and can't connect to my WCF service using net.tcp. I'm able to access the same service with http binding just fine. I got two binding enabled in app.config (net.tcp, http). Can anyone tell me if there is a settings that I need to set/play with for viewing service using net.tcp in IE.
You cannot connect to a WCF service using the netTcpBinding through IE.
What you need is a "real" WCF client app, or something like WCF Test Client which is shipped with WCF in the box - just find it and start using it!
Make sure you have a HTTP base address, for your service and a mexTcpBinding endpoint.

Is it possible to host a TCP endpoint in an IIS6 hosted service?

I created a wcf service based on ServiceHostFactory, and i'm hosting it in IIS6.
If i use a HTTP endpoint everything works just fine, but when i try to switch to TCP it goes bad.
Is it even possible to do this in II6?
I have a more specific question posted here, that asks for a solution, but i would be happy with (for starters if not) with just an answer (and perhaps an example) to this - less specific question.
Why can't I connect to a WCF service with net.tcp but i can with http?
IIS 5.1 and IIS 6 can only host HTTP bindings. IIS7 has WAS (Windows Activation Service) which allows hosting of endpoints bound to any transport protocol... so it would be capable of TCP.
If you must host with IIS 6, then you're stuck with the HTTP bindings. If not, consider self-hosting in a Windows Service.