Does/Will MonoTouch support the new NetHttpBinding of WCF 4.5?
Thanks!
NetHttpBinding is a binding designed for consuming HTTP or WebSocket services. But it only uses WebSocket on Windows 8, otherwise it uses Http.
see: http://msdn.microsoft.com/en-us/library/system.servicemodel.nethttpbinding.aspx
Mono touch supports the same client bindings as silverlight 3 which means basichttpbinding. (atleast according to the latest info I have been able to find)
In your case since you are using xamarin, I assume that you are not running on Windows 8, therefore you are probably stuck with basichttpbinding.
Related
I have developed a self-hosted WPF server application and a client WPF application which communicated with WCF NetTcpBinding with duplex like common connected TCP socket communication scenario.
Now, I will develop a mobile client which communicates existing self-hosted WPF server application.
I know that old Xamarin does not support NetTcpBinding.
Does the latest Xamarin Forms (or Xamarin.Android, Xamarin.iOS) support NetTcpBinding with duplex? It seems that .NET Core 3.0 supports NetTcpBinding, but I have no idea for Xamarin.
If Xamarin does not support WCF NetTcpBinding, is self-hosted SignalR a good alternative for full duplex connected communication?
As far as I know, Dotnet Core3.0 SDK supports the Nettcpbinding and I can generate the client proxy class properly by using Microsoft WCF web service reference provider. Thereby it supports duplex communication too.
I didn’t have much exposure to Xamarin. If the project based on the Core 3.0 SDK. I think it should be capable of supporting Nettcpbinding.
Feel free to let me know if there is anything I can help with.
I am new to WCF web socket and I am trying to implement duplex service using web socket. I have implemented the wcf web socket service using the following example and it works fine.
http://msdn.microsoft.com/en-us/library/hh977020.aspx
I know the minimum requirement for WCF service for web socket is windows 8 and .net framework 4.5. So I have hosted my service on windows server 2012 server machine.
Then I have written WCF web socket client to access the service and my client is windows
form applications runs on windows 7. I got the following error.
“This platform does not support client side WebSockets natively.
Support for client side WebSockets can be enabled on this platform by
providing an implementation of
System.ServiceModel.Channels.ClientWebSocketFactory.”
Does web service client also need to have windows 8? If it needs are there any third party libraries to access WCF web socket service.
Really appreciate your reply.
You will need win8 or 2012server to be able to use the Microsoft WebSocket namespace in your WCF. You could also take a look at SignalR that will fallback to other techniques when WebSockets is not available.
You can also use XSockets.NET that will run websockets on .NET 4 (so there is no need for win8 or 2012server).
You also have SuperWebSocket and Fleck as options of .NET 4.
Edit: Added sample with WebSockets from WCF .NET 4 here https://github.com/XSockets/XVA/tree/master/XVA-07-02-BoostWCF/Any%20OS
I have developed a WCF service (framework 4.0) which should communicate with a client through BasicHttpBinding.
I have kept my (data)contracts in a separate assembly cause I want them to be reused by multiple clients.
Everything works as expected if I reference my WCF Service as a service (Service References) in a .net 4 client and set "Reuse types in referenced assemblies".
The problem is I have to consume the same WCF service with a .net 2 client.
In this situation the generated proxy is different from my shared assembly datacontract and I don't seem to be able to reuse it or cast it to the generated proxy.
Is there a way to solve this issue?
Thanks for your help.
Well, .NET 2.0 has no WCF API at all because it wasn't added until 3.0. So forget sharing the library because there's nothing to really share it with. The .NET 2.0 application will have to use the older WSE (Web Service Extensions) API. Documentation on WSE is available here on MSDN and you can download the last version of the WSE API that was made, 3.0 SP3, here.
You should have no problem getting WSE to talk to WCF via a basicHttpBinding. Things would only get complicated if you started using WS-* stuff and, even then, WSE supports a lot of that. It's just hard to find help on it since it's a deprecated API.
I came across with this situation. I have one already developed Application in 2.0, Now in this application i want to use one WCF Service that is developed in 4.0. How can i do this?
I tried the following
1. Regular Method Add the Service Reference and then use that. It didn't work for me.
2. I googled it and i got one more method, using svcutil.exe, but i dont have svcutil.exe with 2.0.
Waiting for the response.
Thanks in advance.
Windows Communication Foundation (WCF) was first introduced to the .NET Framework as part of .NET 3.0. It's not available with .NET 2.0.
If the WCF service exposes a SOAP endpoint then you may be able to use it through the Web Service Extensions (WSE) that were published for old versions of Visual Studio. See here: http://www.microsoft.com/download/en/details.aspx?id=10854 for details.
If you want to use a service written in .Net 4 with a .Net 2.0 project, you should be able to use basic http binding. That should allow it to interop with a client that knows nothing about WCF. It's similar to using an old school .asmx web service.
I am facing a problem.
Please explain if this is possible or not.
1) I created a Service Library (.Net 3.5)
2) I created a Windows Service (.Net 3.5), added ServiceHost and implemented my ServiceLibrary to work as a TCP Endpoint.
3) Next I created a Console Client (.Net 3.5) and tried to get data from my TCP Endpoint…(svcutil….proxy.cs generation). Worked absolutely fine.
4) I have a Windows Client(.Net 1.1). How do I configure it to use this new Service? I can't add Proxy.cs as it says that servicemodel cannot be found…
You will need to use a basicHttpBinding, which is backward compatible and can be consumed by a .net 1.1 client. You should be able to find plenty of useful examples on the web: Consuming WCF with .Net 1.1 Basic Binding. For example, this Link describes that binding and usage of Soap 1.1 to make it compatible with .Net 1.1.
For more details on different scenarios and the range of wcf configuration possibilities, try exploring this CodePlex Link, specifically the Application Scenarios section that provides details of different setups. I believe that you will require a basicHttpBinding rather than a netTcpBinding in order to work with legacy protocols. The netTCPBinding would assume that you have .NET 3.0 at both ends. See this MSDN Bindings Link.