Fail to add/replace basicHttpBinding with wsDualHttpBinding - wcf

I'm new in the WCF
I wrote some server that work on IIS 7.5
I using the basicHttpBinding endpoint - and i want replace or add support for the wsDualHttpBinding endpoint.
So i used the WCF configuration tool to change the basicHttpBinding to wsDualHttpBinding.
And nothing work.
I change back to http and add new endpoint that will define as wsDualHttpBinding - and nothing work.
( i change in the client also )
How can i support the wsDualHttpBinding ?
Why this is not working ?

After you change the endpoint on the server, you will have to change it on the client as well.
If you change to wsDualHttpBindingon the server, and do nothing to the client, it will remain as basicHttpBinding, and it will not work. The binding on the client will have to be compliant with the server binding for the communication to work between client and server.
If you have already tried this, please let us know which error message you get when trying to run your program.

Related

Does WCF Add Service Reference require something configured on the service to generate the app config?

We have an existing wcf service, and I created a new project. I want to use it. I hit add service reference, pop in the URL, press OK, and it adds it as a service reference but there is no config generated.
I also tried svcutil.exe /language:cs /out:GeneratedProxy.cs /config:app.config [url] but no config is generated, only the proxy cs.
I'm using VS 2013 / .NET 4.0
My question is, is this a sign that the SVC itself has some missing data that is required to build the contracts, or is the problem with adding the service reference?
For the record I have tried unchecking the reuse types option which some questions on here have reported as fixing the problem.
Bonus question, do you think if I can't get this working that manually adding some generic default bindings and endpoint code to the web config will work?
First, the reason that why the Adding service reference generates nothing is that the WCF service is rest style service. By default, the proxy-based invocation of rest style WCF services is complex.
https://en.wikipedia.org/wiki/Representational_state_transfer
https://learn.microsoft.com/en-us/dotnet/framework/wcf/feature-details/wcf-web-http-programming-model
Calling the WCF rest style service with the client proxy is uncommon. Generally, we construct an Http request by using an HTTP client library to call the service, such as HttpClient, WebClient.
How to fix "ERR_ABORTED 400 (Bad Request)" error with Jquery call to C# WCF service?
Besides, calling the WCF rest style service with the client proxy is feasible. Please refer to my previous link.
WCF: There was no endpoint listening at, that could accept the message
Feel free to let me know if there is anything I can help with.

Developing Wcf Callback service using netTcpBinding

I stuck in a problem regarding wcf Callback service.
I am trying to develop WCF Callback service using netTcpBinding, I successfully created this Callback Service using wsDualHttpBinding but when i try to achive same thing using netTcpBinding, I am always stuck in some problem.
sometimes it is "Contract requires Duplex, but Binding 'BasicHttpBinding' doesn't support it or isn't configured properly to support it."
or "This protocol does not support netTcpBinding"
so anyone can show me how to configure web.config file and how to overcome this types of error..
Thank you.
Without you supplying the code and config that you are currently using it is difficult to tell what is causing this error.
Maybe take a look at Duplex Messaging and TechNet: Creating a Duplex Service.

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 :-)

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.

WCF basichttpbinding netTcpBinding routing

I have created a WCF routing service. This service uses basicHTTPBinding as it is external facing, needs to interoperate and the client can't work with wsHttpBinding. This service receives all incoming method calls and forwards them onto another service. This other service is internal and uses netTcpBinding.
The problem is I am getting the following error:
Addressing Version 'AddressingNone (http://schemas.microsoft.com/ws/2005/05/addressing/none)' does not support adding WS-Addressing headers.
Now, I am not entirely sure, but I am assuming this is something to do with the messages coming in as SOAP 1.1 but the netTcpBinding is using SOAP 1.2 and there is a mismatch? If so, how do I work around this? If not, any ideas what else it could be?
Thanks in advance
The answer is to explicitly copy the message into the right message version and then forward that on. You must also remember to copy the message back to the original version on the way back.