How to use WCF to make a computer “call home”?

I am architecting a solution that will use WCF to make all the computers in my organization periodically "call home". Let's suppose for the sake of discussion that each computer in my organization has a weather sensor connected to it. The purpose of this application is that each computer should contact a central server to report what the weather is in its location. The data to be transmitted is encoded as a string.

Suppose for the sake of discussion that I have a Windows Service which invokes a method SendWeatherReport once a day. The signature of this function is:

void SendWeatherReport(string report);

Suppose that I have set up a WCF method with the following interface:

[ServiceContract]
public interface IWeatherReportReceiver
{
    [OperationContract]
    void GetReport(string report);
}

I have the following requirements:

1) My weather report information is proprietary and confidential; it must be encrypted for security purposes.

2) The weather report information will be transmitted over the internet. The computer running the WCF service to receive the report will be at example.com.

3) The weather report must get past some over-zealously configured firewalls on its way to the server.

Now that I've explained my requirements, please explain to me how I can set up my endpoint configuration to meet these requirements.

To satisfy (1), I believe that I will need to use the net tcp binding. For (3), perhaps I can configure this binding to work on port 80, 443, or some other commonly used port. My primary concern here is that I don't know how to configure the software to identify itself to the WCF server...

Answers


WsHttpBinding can encrypt message, even without https.

You have to create Binding with SecurityMode="Message" if you want to use SOAP encryption, or SecurityMode="Transport" if you want (and can) use https Take a look at How to: Set the Security Mode

My feeling is that using an HTTP protocol will be far more simplier to deploy thant binary TCP, as proxies often only allows http traffic.

Concerning the authentication, it depends :) The most secure mechanism is to use client certificate, but do you need it versus a standard user/password authentication ? (and all its infrastructure required to work)


Need Your Help

Is MODI still maintained?

c# ms-office ocr modi

I'm currently looking for an OCR in C# and try :

Bounced mails get Status header

java smtp bouncedemail

I am trying to read the Status header of a bounced email. This site explains better what I am trying...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.