Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Tree: 5e1641770d
Fetching contributors…

Cannot retrieve contributors at this time

56 lines (47 sloc) 3.695 kB

Multi-lingual Chat Sample

The Multi-lingual chat sample demonstrates how to design an interactive, scalable web application. The application allows users to chat with each other in their native languages, while the application automatically translates messages among participants. In addition, the application allows user to provide and vote on alternative translations if they don’t like translations made by Bing Translator Service.




  • ASP.Net MVC 4 Web API
    REST-ful service layer for client-side Ajax calls
  • Bing Search API
    Search for images to be used as avatars
  • Bing Translator API
    Translate chat messages
  • jQuery
    _Ajax calls to Web API service layer
  • Knockout
    View models and data binding to support MVVM pattern
  • SignalR
    Real-time messaging and notificaitons
  • Windows Azure Service Bus
    Scalable backplane for SignalR
  • Windows Azure Table Storage
    Save translations and alternative translations with rankings

Running the Sample Locally

  1. Open Visual Studio 2012 as an Administrator.
  2. Open MultilingualChat.sln.
  3. Press F5!

By default the application is configured to use local simulated storage, and translation capability is turned off without a valid Bing Application ID. SignalR scaling is also disabled when Service Bus connection string is missing. However, you can still try out other chatting functionalities. The application is designed to provide a launch-and-play experience to end users. There’s no registration or login needed, you are automatically put in to a “public” chat room with an automatically assigned user name (and a random avatar) so that you can start chatting right away. You can change chat room, name, avatar, preferred language at any time by clicking on the items you want to change, and then enter or select a new value.

Running the Sample on Windows Azure

  1. Open Visual Studio 2012 as an Administrator.
  2. Open MultilingualChat.sln.
  3. Open web.config file in MultiLingualChat.Web project.
  4. Modify BingAppId to use your Bing Application Id.
  5. Modify StorageConnectionString to use your Windows Azure storage account.
  6. (Optional) To enable Service Bus Backplan for SignalR, modify ServiceBusNamespace, ServiceBusAccount, ServiceBusAccountKey, TopicPathPrefix, and NumberOfTopics to use your Windows Azure Service Bus namespace. Read this article for more details on these settings.
  7. Save changes.
  8. Double-click on MutliLingualChat.Web role under MultiLingualChat.Cloud project to bring up its property page.
  9. Select Caching tab.
  10. In "Specify the storage account credentials to use for maintaining the cache cluster's runtime state." field, enter connection string to your Windows Azure storage account. Now you should be able to run the applicaiton locally by pressing F5, or to run it on Azure by deploying the Cloud Service.
Jump to Line
Something went wrong with that request. Please try again.