Host and use WCF Services in Windows Azure (CSAzureWCFServices)

This project shows how to host WCF in Windows Azure, and how to consume it. The demos include 1) A WCF web role , which hosts WCF in IIS; 2) A work role which hosts a WCF service (self-hosting); and 3) A windows console client that consumes the WCF services above.

C# (100.3 KB)
 
 
 
 
 
3.9 Star
(16)
23,861 times
Add to favorites
1/18/2016
E-mail Twitter del.icio.us Digg Facebook
/****************************** Module Header ******************************\
* Module Name:  IContract.cs
* Project:	    CSAzureWCFServices
* Copyright (c) Microsoft Corporation.
* 
* Service Contract.
* 
* This source is subject to the Microsoft Public License.
* See http://www.microsoft.com/opensource/licenses.mspx#Ms-PL.
* All other rights reserved.
* 
* THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, 
* EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED 
* WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
\***************************************************************************/

using System;
using System.ServiceModel;


namespace WCFContract
{
    [ServiceContract]
    public interface IContract
    {
        // This operating returns the server information, including the role's name and instance id
        [OperationContract]
        string GetRoleInfo();

        // This operation returns the information of the channel being used between the client & the server.
        [OperationContract]
        string GetCommunicationChannel();
        
    }
   
}