C# Get the Client Application Checksum from the WCF Service - c#

We are using WCF Services that transfer some data from a Client Application to the Server Application (WCF Service). This last one will apply an algorithm using these data and send back the result to the client.
We would like to authenticate the Client Application from the Server WCF Service. Would it be possible to get the Client Application Checksum directly from the WCF Service?
We are already using wsHttpBinding but we would like to add one more layer on the client application integrity.
Appreciate for your help,
Camille.

he WCF service can't get anything from the client unless the client sends it to the service. So if you can get your client to send your service the checksum (as a method parameter), then you're in business. WCF is not magic. Nor is any "service" technology for that matter. It is a simple tcp/ip communication between a client and a server. On both side, the only information that goes across is the information each side decides to send, nothing more.

Related

WCF Client Proxy C# How Can I Change User on the fly?

I have a WCF DUPLEX Client Proxy that connects to a Service - I control both sources of code. I would like to know how I can change the user on the fly. So for example my client application starts up, it has data that gets updated because it has connected tot he WCF service which the singleton service host pushes data to it. I would like to be able to have the User of the Client Application to be able to change and the proxy that is already communicating to change its connection to use those credentials. (The proxy is running ) ; is this possible and if so how would I implement it ?

real-time web update using WCF

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

Send commands to another network

I am trying to write a monitoring tool to monitor some information
It will gonna work on azure normally. So i gonna host the database on azure also the webservice will be hosted at azure.
On the client's i read from the config file how many time's he need to update the information to the azure database ( with the webservice on azure ).
Now i want to send also some commands to the client itself. Like start service, .... what is the best way to do that?
How can i send it from a website that is hosted on the azure platform?
I think you should consider implementing a WCF service at the client as well. The Azure side of your software could call operations from this service when it needs to instruct the client to do something.
The WCF service at the client should be something simple,hosted in a Windows Service or in your actual client (whatever it is... win forms, console, etc).
Since you have no VPN, it sounds like you may have a problem with hosting a WCF service on the client. If the client is behind a firewall, you would have to modify the firewall configuration to allow your server to connect to this service.
Last time I had to do a service like this, I used Comet. The server maintains a queue of messages to be sent to the client. Your client connects to the web service and requests any available messages. If messages are available, the server returns them. If not, the server leaves the request open for some time. As soon as a message arrives, the server sends it down the already-open connection. The client will either periodically time out/reconnect or send a keep-alive message (perhaps once per minute) in order to keep the connection alive in the intervening firewalls.

Communication Between WCF Rest Service and host application

I have a WCF Rest web service that I am hosting in a managed application. What I would like is for client input to the service to be passed to the host application for processing, and the results are then passed back to the client. From similar questions like here and here I know I can use events to pass the data from the service to my host application. However, I cannot seem to figure out how to get the resulting data passed back to the client. Is there a way to do this using the webOperationContext or perhaps by creating another event in the host application to pass the data back to the web service?

Avoiding a double serialize/deserialize

I have a WCF webservice that acts as a proxy between a WCF windows service and a client interface. This is done so that our program can have a central "state" server, while the webservices can be distributed.
Ideally i would like to cut out the middle IIS hosted WCF webservice serialization and feed the bytes sent by the client directly to the windows service via IIS. Is this possible?
Why not using NLB directly? I think that a cluster will do a better job distributing requests than a proxy WCF service.
It's possible but you'll want to not use WCF in the middle. The level of difficulty depends on the technology you're using for your transport. For example, if you're using BasicHttp (good ol' SOAP) you can write a proxy in ASP.NET that routes the bytes from the client to the server via an HttpWebRequest.
You also could consider installing a reverse proxy on your web boxes to route your WCF requests through to your central web service.

Categories