I have a Wcf Data service exposing entities from Ado.net entity framework. I would like to know whethere I can use msmq messaging with my data service.
After searching on internet i could find links for using with a wcf service only.
Please provide some links with a sample.
No you cannot.
WCF Data Services is using HTTP/REST only - it cannot be used over any other protocol or with any other binding.
MSMQ is only available when you use "regular" WCF services that use the SOAP protocol for communication - that can be routed over different transport media.
REST is very tightly and intimately tied to HTTP only.
WCF supports MSMQ as a transport protocol and provides the standard MSMQ binding. Here is a link to MSDN article devoted to using MSMQ in a WCF application:
How to: Exchange Messages with WCF Endpoints and Message Queuing Applications
Related
Does MassTransit support WCF? I searched their website but couldn't find any examples on whether you can or how to create a WCF client/service using MassTransit. If it can be done, can someone please provide an example? a tutorial?
You can use WCF to create a public interface that bridges an external service to an internal message-based application, but WCF is not a supported transport for durable messaging.
This would be useful in a case where your internal system might become overloaded by an external service, and you need to buffer the ingestion of data via a SOAP-based WCF service. The WCF endpoint would send messages to a command queue to process the information asynchronously, preventing timeouts from being pushed back to the calling service.
As the title.
Can somebody give me an simple example how to push and get data between 2 clients through WCF service?
I've tried using Polling Duplex but doesn't work.
Thank you for reading!
WCF has a rather nice peer-to-peer networking mode that you might find useful. As MSDN says:
Peer Channel is a multiparty, peer-to-peer (P2P) communication technology in Windows Communication Foundation (WCF). It provides a secure and scalable message-based P2P communication channel for application developers. One common example of a multiparty application that can benefit from Peer Channel is a collaborative application, such as chat, where a group of people chat with one another in a peer-to-peer manner without servers. Peer Channel enables P2P collaboration, content distribution, load balancing, and distributed processing for both consumer and enterprise scenarios - More...
A nice walk-through article can be found here:
A Peer-To-Peer Work Processing App With WCF
WCF is supposed to be interoperable, WCF services can be accessed from microsoft & non-microsoft clients, but only Microsoft clients can access WCF callback services.
The question is: Is it possible for non-microsoft clients to access WCF callback services?
Is there any way to have an active bidirectional channel between microsoft service and non microsoft clients?
It's not possible. There the first comment say: it's .net only. http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/Q_26617678.html
i usually use HTTP binding at my services.
i read that net.tcp Binding works faster, however i am not quite sure on when should i use it?
what is the best practice,
are there any drawbacks?
thanks
The MSDN page for NetTcpBinding says it best
The default configuration for the NetTcpBinding is faster than the configuration provided by the WSHttpBinding, but it is intended only for WCF-to-WCF communication.
So NetTcpBinding is good to use when you have a .NET WCF client and a .NET WCF server, however if you need to support clients that are not written in .NET WCF (for example you are publishing a public service and you don't know what language the client will be written in) then you need to use a HttpBinding instead.
This page has a good quick summary of each type of binding and when they should be used.
BasicHttpBinding - A binding that is suitable for communicating with WS-Basic Profile conformant Web services, for example, ASP.NET
Web services (ASMX)-based services. This binding uses HTTP as the
transport and text/XML as the default message encoding.
WSHttpBinding - A secure and interoperable binding that is suitable for non-duplex service contracts.
WS2007HttpBinding - A secure and interoperable binding that provides support for the correct versions of the Security,
ReliableSession, and TransactionFlow binding elements.
WSDualHttpBinding - A secure and interoperable binding that is suitable for duplex service contracts or communication through SOAP
intermediaries.
WSFederationHttpBinding - A secure and interoperable binding that supports the WS-Federation protocol, enabling organizations that
are in a federation to efficiently authenticate and authorize users.
WS2007FederationHttpBinding - A secure and interoperable binding that derives from WS2007HttpBinding and supports federated
security.
NetTcpBinding - A secure and optimized binding suitable for cross-machine communication between WCF applications.
NetNamedPipeBinding - A secure, reliable, optimized binding that is suitable for on-machine communication between WCF
applications.
NetMsmqBinding - A queued binding that is suitable for cross-machine communication between WCF applications.
NetPeerTcpBinding - A binding that enables secure, multi-machine communication.
WebHttpBinding - A binding used to configure endpoints for WCF Web services that are exposed through HTTP requests instead of SOAP
messages.
MsmqIntegrationBinding - A binding that is suitable for cross-machine communication between a WCF application and existing
Message Queuing (also known as MSMQ) applications.
I have been reading a lot of forums regarding the use of WCF in web, most specifically, this topic: WCF with Flash tutorial, but I am really confused.
I have an existing feed server that is using WCF service. It is, with no problems, supplying real-time information to its windows applications clients. What i would like to do is to have a web application to subscribe to the feeds that i am supplying to the windows application clients. With the forum that i have read (the one i have indicated), it seems like it will be a request reply method. And i think, using that, i wouldn't be able to achieve the real-time transfer of feeds for it.
I would like to know if there is an equivalent for the callback function in web development.
I think Duplex service meets your requirement.
Please use Duplex type of WCF services.
A duplex service contract is a message exchange pattern in which both endpoints can send messages to the other independently. A duplex service, therefore, can send messages back to the client endpoint, providing event-like behavior. Duplex communication occurs when a client connects to a service and provides the service with a channel on which the service can send messages back to the client. Note that the event-like behavior of duplex services only works within a session.
Links:
http://msdn.microsoft.com/en-us/library/ms731064.aspx
http://www.c-sharpcorner.com/uploadfile/dhananjaycoder/a-simple-duplex-service-in-wcf/
http://msdn.microsoft.com/en-us/library/ms731935.aspx
You can also use web sockets which is new in WCF 4.5. Below are web socket WCF links:
http://msdn.microsoft.com/en-us/library/hh674271.aspx