pollingDuplexHttpBinding problem - wcf

I am using pollingDuplexHttpBinding and it is working fine as long as i copy paste the web.config from msdn article :- MSDN article
However when i try to manually configure my service using WCF configuration editor, it doesn't work. The option pollingDuplexHttpBinding doesn't show up under endpoints in Binding drop down box. How do i solve this problem? I already have a reference to the required assembly of pollingduplexhttpbinding.
Thanks in advance:)

Just because it doesn't show up in config intellisense, doesn't mean that the binding won't work when you run your application. Make sure that you have the latest version of Silverlight Tools for Visual Studio installed; Even then, it may still not show up (config intellisense unfortunately always seems to be an afterthought at Microsoft, especially for server-side config for Silverlight scenarios).

Related

How to add WCF Service to .NET Core project in Visual Studio 2019?

I am unable to add a connected service reference to a WCF endpoint in VS 2019. I used to be able to do it in VS2017 with an extension. Now I can't find the extension anywhere, and when I try to add a connected service, I get lots of options but nothing for a WCF service.
Just to clarify, I am not trying to develop a WCF service, just trying to create a service reference to act as a client to a remote WCF service.
There is an article on how to use such a tool, here, but absolutely no information on where to find the tool or how to install it. I even found what may be the source code for the tool, but again with no installation instructions.
My project is a .NET Core project, targeting NetStandard 1.6.
.Net Core is still supporting client-side. You can use hosted service in it and add the ip:port/wcfinterface from the connected services.
You can try it by following this link.
I was able to resolve this issue by simply creating a new class library targeting NetStandard2.0. Right-clicking on Dependencies -> Managed Connected Services now showed an additional item below the Service Dependencies item, called Service References. Adding a new Service Reference, you are then presented with a WCF option.
I tried re-targeting this class lib back to NetStandard1.6, and all is still working. My original class lib was very old, and had some old stuff like dnxcore50 in the .csproj file, so maybe something there was screwing it up.
Thanks all for the suggestions.

WCF Test Client says Added Service Successfully but shows nothing

I opened C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE
I added http://localhost:44652/MyService.svc
It says added successfully but I see absolutely nothing in the test client, it looks the same as if I first opened it.
Not sure why it would do that. Here's my PC setup:
Windows 7 64 bit
VS 2012
WCF 4
I am using WebGet and WebInvoke for the REST portion but we want to also support wsdl
Web endpoints (aka REST) do not expose metadata that the WCF Test Client can understand. There's a similar issue discussed here.
1) Please go to your browser and go to
http://localhost:44652/MyService.svc
You should see a web page that says "There is a service here."
2) Then you can use advanced rest service client by google chrome to test your service
Maybe a version thing, but I got this to work in VS 2017 as follows:
Highlight the appropriate svc.cs for the REST service in Solution Explorer.
Start debugging (F5).
When WCF Test Client pops up, if you still don't see methods listed there, remove (temporarily) any REST <service> elements from web.config and then try again. Reportedly, WCF Test Client does not work with the webHttpBinding that might be present in the <service> element. Removal is not really a solution, but perhaps a good workaround for some scenarios where a quick test is needed.

How to use SOAP 1.2(request and response) in windows forms

I have never worked with SOAP but now i need to use it to get a XML file or CSV file with a lot of products.
I have searched the internet for some examples and found some but i still don't understand how to use it.
Am i wright that it just sends a XML file to a server and you get back a XML file with the data.
Do i really need to install this so that it works: http://www.microsoft.com/en-us/download/details.aspx?id=11413
And i need to implement it in a windows forms application.
Hope someone can help me with a good tutorial.
You don't need to manually write all the code to do the SOAP communication yourself. The .NET framework and visual studio provide tools to automatically build custom client classes that mimic the interface of the SOAP service, and perform all of the SOAP communication for you. You don't need to install anything special, you just need to right-click on your project in the IDE and choose to add a Web Reference, or a Service Reference.

WS-Policy Specification in WSDL document - .NET

I have authored a simple calculator Web service using visual studio 2010. I need to specify policy using WS-Policy language (which I need to append with the WSDL document generated for the service).
How can I do that? Should I need WSE 3.0 Settings tool installed for that in VS 2010? Does VS 2010 support it?
I have tried using XMLSerializer but achieved no success. I badly in need of suggestions regarding this problem.
Please help me in fixing this problem.
Why do you need to manually edit policy? In WCF that's not done directly; instead selecting your security policy is is accomplished indirectly by choosing a proper binding and configuring it correctly.
It's very likely that you'd probably be just fine with a properly configured WSHttp binding, but you can certainly use a custom binding if you need extra flexibility.

Sharepoint 2010 custom WCF service

I am trying to create a custom WCF service and to host it in Sharepoint 2010. I found a howto on how to do that here:
http://msdn.microsoft.com/en-us/library/ff521581.aspx
the problem is the attribute "BasicHttpBindingServiceMetadataExchangeEndpointAttribute" which should be in Microsoft.Sharepoint.Client.Services.
But I could neither find the dll file nor the attribute. On the internet there is not much information about that.
Does anybody know from where I can get this dll or does anybody have a link to a good howot or tutorial on how to create WCF services on Sharepoint?
Thanks in advance.
Ya ran into that problem too. The answer is in the tutorial but I missed it.
To add a reference to Microsoft.SharePoint.Client.ServerRuntime, which contains the service factories that are provided by SharePoint Foundation, use the Browse tab of the Add Reference box to navigate to the Microsoft.SharePoint.Client.ServerRuntime.dll file within %Windows%\assembly\GAC_MSIL\Microsoft.SharePoint.Client.ServerRuntime, select the DLL, and click OK.
Then you need a using Microsoft.SharePoint.Client.Services;
above the attribute.
I don't have a reference to this namespace just a using statement. Also make sure you have the microsoft.sharepoint.client and microsoft.sharepoint.client.serverruntime references
I got stuck after deploying myself. Got 404 errors and couldn't add the service reference to test it. If you find a fix please email me at
mondo at shaw.ca
thanks and good luck!