{"id":6115,"date":"2013-11-14T00:00:00","date_gmt":"2013-11-14T00:00:00","guid":{"rendered":"https:\/\/azure.microsoft.com\/blog\/introduction-to-websockets-on-windows-azure-web-sites"},"modified":"2025-09-12T07:20:22","modified_gmt":"2025-09-12T14:20:22","slug":"introduction-to-websockets-on-windows-azure-web-sites","status":"publish","type":"post","link":"https:\/\/azure.microsoft.com\/en-us\/blog\/introduction-to-websockets-on-windows-azure-web-sites\/","title":{"rendered":"Introduction to WebSockets on Windows Azure Web Sites"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Azure Web Sites has recently added support for the WebSocket protocol.&nbsp; Both .NET developers and node.js developers can now enable and use WebSockets in their applications.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There is a new option on a web site\u2019s Configuration tab to enable WebSockets support for an application.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/acom.azurecomcdn.net\/80C57D\/blogmedia\/blogmedia\/2014\/02\/7563.a.png-550x0.png\"><img decoding=\"async\" src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2013\/11\/7563.a.png-550x0-346x369-1.webp\" alt=\"screenshot of Azure Configure tab with V4.5 selected in the &quot;.net framework version&quot; section; and &quot;5.4&quot; selected in the PHP version; &quot;integrated&quot; option selected in the Managed Pipeline mode section; and &quot;on&quot; selected in the &quot;web sockets&quot; section\" class=\"wp-image-134071\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Once WebSockets has been enabled for a website, ASP.NET (v4.5 and above) and node.js developers can use libraries and APIs from their respective frameworks to work with WebSockets.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"asp-net-signalr-chat-example\">ASP.NET SignalR Chat Example<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">SignalR is an open source .NET library for building real-time web apps that require live HTTP connections for transferring data.&nbsp; There is an excellent <a href=\"https:\/\/www.asp.net\/signalr\/overview\/signalr-20\" target=\"_blank\" rel=\"noreferrer noopener\">site<\/a> with introductory articles and details on the SignalR library.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Since SignalR natively supports WebSockets as a protocol, SignalR is a great choice for running connected web apps on Windows Azure Web Sites.&nbsp; As an example, you can run this <a href=\"https:\/\/www.asp.net\/signalr\/overview\/signalr-20\/getting-started-with-signalr-20\/tutorial-getting-started-with-signalr-20\" target=\"_blank\" rel=\"noreferrer noopener\">sample chat application<\/a> on Windows Azure Web Sites.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The screen shot below shows the structure of the SignalR chat sample:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/acom.azurecomcdn.net\/80C57D\/blogmedia\/blogmedia\/2014\/02\/3683.B.jpg-400x0.jpg\"><img decoding=\"async\" src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2013\/11\/3683.B.jpg-400x0-366x369-1.webp\" alt=\"A software mapping diagram shows the hierarchy of index.html\" class=\"wp-image-134061\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">After creating a web application in Windows Azure Web Sites, enabling WebSockets for the application, and uploading the SignalR chat sample, you can run your very own mini-chat room on Windows Azure Web Sites!<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2013\/11\/7838.C.jpg-550x0-1.webp\"><img decoding=\"async\" src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2013\/11\/7838.C.jpg-550x0-1.webp\" alt=\"screenshot of two simple chat sessions\" class=\"wp-image-134051\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The raw HTTP trace (shown below) from Fiddler shows how the WebSockets protocol upgrade request that is sent by the client-side portion of SignalR negotiates a WebSockets connection with the web server:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nRequest snippet: GET https:\/\/sigr-chat-on-waws.xxxx.net\/signalr\/connect?transport=webSockets snip HTTP\/1.1 Origin: https:\/\/sigr-chat-on-waws.xxxx.net Sec-WebSocket-Key: hv2icF\/iR1gvF3h+WKBZIw== Connection: Upgrade Upgrade: Websocket Sec-WebSocket-Version: 13 \u2026 Response snippet: HTTP\/1.1 101 Switching Protocols Upgrade: Websocket Server: Microsoft-IIS\/8.0 X-Content-Type-Options: nosniff X-Powered-By: ASP.NET Sec-WebSocket-Accept: Zb4I6w0esmTDHM2nSpndA+noIvc= Connection: Upgrade \u2026\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">To learn more about building real-time web applications with SignalR, there is an <a href=\"https:\/\/www.asp.net\/signalr\/overview\/signalr-20\/getting-started-with-signalr-20\/introduction-to-signalr\" target=\"_blank\" rel=\"noreferrer noopener\">extensive tutorial<\/a> available on the SignalR overview website.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"asp-net-echo-example\">ASP.NET Echo Example<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">ASP.NET has supported WebSockets since .NET Framework v4.5.&nbsp; Developers will usually want to use higher level libraries like SignalR to abstract away the low-level details of managing WebSockets connections.&nbsp; However for the adventurous developer, this section shows a brief example of using the low-level WebSockets support in ASP.NET.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The ASP.NET Echo example project consists of a server-side .ashx handler that listens and responds on a WebSocket, and a simple HTML page that establishes the WebSocket connection and sends text down to the server.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The .ashx handler listens for WebSockets connection requests:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2013\/11\/3362.D.jpg-400x0-1.webp\"><img decoding=\"async\" src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2013\/11\/3362.D.jpg-400x0-1.webp\" alt=\"A software mapping diagram shows the hierarchy of MyEchoHandler.ashx\" class=\"wp-image-134041\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The .ashx handler listens for WebSockets connection requests:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2013\/11\/3580.E.JPG-450x0-1.webp\"><img decoding=\"async\" src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2013\/11\/3580.E.JPG-450x0-1.webp\" alt=\"small paragraph of code is displayed\" class=\"wp-image-134031\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Once a WebSocket connection is established, the handler echoes text back to the browser:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/acom.azurecomcdn.net\/80C57D\/blogmedia\/blogmedia\/2014\/02\/6558.F.JPG-550x0.jpg\"><img decoding=\"async\" src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2013\/11\/6558.F.JPG-550x0-415x369-1.webp\" alt=\"large paragraph of code is displayed\" class=\"wp-image-134021\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The corresponding HTML page establishes a WebSocket connection when the page loads.&nbsp; Whenever a browser user sends text down the WebSocket connection, ASP.NET will echo it back.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/acom.azurecomcdn.net\/80C57D\/blogmedia\/blogmedia\/2014\/02\/1307.G.JPG-550x0.jpg\"><img decoding=\"async\" src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2013\/11\/1307.G.JPG-550x0-376x369-1.webp\" alt=\"large paragraph of code is displayed\" class=\"wp-image-134011\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The screenshot below shows a browser session with text being echo\u2019d and then the WebSockets connection being closed.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2013\/11\/1727.H-.jpg-400x0-1.webp\"><img decoding=\"async\" src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2013\/11\/1727.H-.jpg-400x0-1.webp\" alt=\"An example of a list of browser sessions with time stamps\" class=\"wp-image-134001\" \/><\/a><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"node-js-basic-chat-example\">Node.js Basic Chat Example<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Node.js developers are familiar with using the socket.io library to author web pages with long-running HTTP connections.&nbsp; Socket.io supports WebSockets (among other options) as a network protocol, and can be configured to use WebSockets as a transport when it is available.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A Node.js application should include the socket.io module and then configure the socket in code:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2013\/11\/1385.J.JPG-350x0-1.webp\"><img decoding=\"async\" src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2013\/11\/1385.J.JPG-350x0-1.webp\" alt=\"a small paragraph of code is displayed\" class=\"wp-image-133991\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The sample code shown below listens for clients to connect with a nickname (e.g. chat handle), and broadcasts chat messages to all clients that are currently connected.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/acom.azurecomcdn.net\/80C57D\/blogmedia\/blogmedia\/2014\/02\/5187.I.JPG-550x0.jpg\"><img decoding=\"async\" src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2013\/11\/5187.I.JPG-550x0-512x369-1.webp\" alt=\"A paragraph of code is displayed\" class=\"wp-image-133981\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The following small tweak is needed in web.config for node.js applications using WebSockets:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2013\/11\/3404.L.JPG-250x0-1.webp\"><img decoding=\"async\" src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2013\/11\/3404.L.JPG-250x0-1.webp\" alt=\"1 line of code is displayed\" class=\"wp-image-133971\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">This web.config entry turns off the IIS WebSockets support module (iiswsock.dll) since it isn\u2019t needed by node.js.&nbsp; Nodej.js on IIS includes its own low-level implementation of WebSockets, which is why the IIS support module needs to be explicitly turned off.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Remember though that the WebSockets feature still needs to be enabled for your website using the Configuration portal tab in the UI shown earlier in this post!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After two clients have connected and traded messages using the sample node.js application, this is what the HTML output looks like:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2013\/11\/1817.K-.jpg-300x0-1.webp\"><img decoding=\"async\" src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2013\/11\/1817.K-.jpg-300x0-1.webp\" alt=\"Screenshot displaying text: &quot;Connecting to socket.io server; online: john-1 john-2&quot; below this image shows simplified text of the two participants greeting one another\" class=\"wp-image-133961\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The raw HTTP trace (shown below) from Fiddler shows the WebSockets protocol upgrade request that is sent by the client-side portion of socket.io to negotiate a WebSockets connection with the web server:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nRequest snippet: GET https:\/\/abc123.azurewebsites.net\/socket.io\/1\/websocket\/11757107011524818642 HTTP\/1.1 Origin: https:\/\/abc123.azurewebsites.net Sec-WebSocket-Key: rncnx5pFjLGDxytcDkRgZg== Connection: Upgrade Upgrade: Websocket Sec-WebSocket-Version: 13 \u2026 Response snippet: HTTP\/1.1 101 Switching Protocols Upgrade: Websocket Server: Microsoft-IIS\/8.0 X-Powered-By: ASP.NET Sec-WebSocket-Accept: jIxAr5XJsk8rxjUZkadPWL9ztWE= Connection: Upgrade \u2026\n<\/pre><\/div>\n\n\n<h4 class=\"wp-block-heading\" id=\"websockets-connection-limits\">WebSockets Connection Limits<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Currently Azure Web Sites has implemented throttles on the number of concurrent WebSockets connections supported per running website instance. The number of supported WebSockets connections per website instance for each scale mode is shown below:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li class=\"wp-block-list-item\">Free:\u00a0 (5) concurrent connections per website instance<\/li>\n\n\n\n<li class=\"wp-block-list-item\">Shared: (35) concurrent connections per website instance<\/li>\n\n\n\n<li class=\"wp-block-list-item\">Basic: (350) concurrent connections per website instance<\/li>\n\n\n\n<li class=\"wp-block-list-item\">Standard: no limit<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">If your application attempts to open more WebSocket connections than the allowable limit, Windows Azure Web Sites will return a 503 HTTP error status code.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Note:&nbsp; the terminology \u201cwebsite instance\u201d means the following &#8211; if your website is scaled to run on (2) instances, that counts as (2) running website instances.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"you-might-need-to-use-ssl-for-websockets\">You Might Need to use SSL for WebSockets!<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">There is one quirk developers should keep in mind when working with WebSockets.&nbsp; Because the WebSockets protocol relies on certain less used HTTP headers, especially the <em>Upgrade<\/em> header, it is not uncommon for intermediate network devices such as web proxies to strip these headers out.&nbsp; The end result is usually a frustrated developer wondering why their WebSockets application either doesn&#8217;t work, or doesn&#8217;t select WebSockets and instead falls back to less efficient alternatives.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The trick to working around this problem is to establish the WebSockets connection over SSL. The two steps to accomplish this are:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li class=\"wp-block-list-item\">Use the <em>wss:\/\/<\/em> protocol identifier for your WebSockets endpoints.\u00a0 For example instead of connecting to <em>ws:\/\/mytestapp.azurewebsites.net <\/em>(WebSockets over HTTP), instead connect to <strong><em>wss:\/\/<\/em><\/strong><em>mytestapp.azurewebsites.net <\/em>(WebSockets over HTTPS).<\/li>\n\n\n\n<li class=\"wp-block-list-item\">(optional) Run the containing page over SSL as well.\u00a0 This isn\u2019t always required, but depending on what client-side frameworks you use, the \u201cSSL-ness\u201d of the WebSockets connection might be derived from the SSL setting in effect for the containing HTML page.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Windows Azure Web Sites supports SSL even on free sites by using a default SSL certificate for <em>*.azurewebsites.net<\/em>.&nbsp; As a result you don\u2019t need to configure your own SSL certificate to use the workaround.&nbsp; For WebSockets endpoints under <em>azurewebsites.net<\/em> you can just switch to using SSL and the <em>*.azurewebsites.net<\/em> wildcard SSL certificate will automatically be used.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You also have the ability to register custom domains for your website, and then configure either SNI or IP-based SSL certificates for your site.&nbsp; More details on <a href=\"https:\/\/azure.microsoft.com\/en-us\/develop\/net\/common-tasks\/custom-dns-web-site\/\" target=\"_blank\" rel=\"noreferrer noopener\">configuring custom domains<\/a> and <a href=\"https:\/\/azure.microsoft.com\/en-us\/develop\/net\/common-tasks\/enable-ssl-web-site\/\" target=\"_blank\" rel=\"noreferrer noopener\">SSL certificates<\/a> with Windows Azure Web Sites is available on the Windows Azure documentation website.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Windows Azure Web Sites has recently added support for the WebSocket protocol.  Both .NET developers and node.js developers can now enable and use WebSockets in their applications.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ms_queue_id":[],"ep_exclude_from_search":false,"_classifai_error":"","_classifai_text_to_speech_error":"","_alt_title":"","footnotes":"","msx_community_cta_settings":[]},"categories":[1461],"tags":[],"audience":[],"content-type":[],"product":[],"tech-community":[],"topic":[],"coauthors":[535],"class_list":["post-6115","post","type-post","status-publish","format-standard","hentry","category-web","review-flag-1680286581-295","review-flag-1680286581-364","review-flag-1-1680286581-825","review-flag-2-1680286581-601","review-flag-5-1680286581-950","review-flag-8-1680286581-263","review-flag-alway-1680286580-106","review-flag-free-1680286579-836","review-flag-new-1680286579-546"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Introduction to WebSockets on Windows Azure Web Sites | Microsoft Azure Blog<\/title>\n<meta name=\"description\" content=\"Windows Azure Web Sites has recently added support for the WebSocket protocol. Both .NET developers and node.js developers can now enable and use WebSockets in their applications.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/azure.microsoft.com\/en-us\/blog\/introduction-to-websockets-on-windows-azure-web-sites\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Introduction to WebSockets on Windows Azure Web Sites | Microsoft Azure Blog\" \/>\n<meta property=\"og:description\" content=\"Windows Azure Web Sites has recently added support for the WebSocket protocol. Both .NET developers and node.js developers can now enable and use WebSockets in their applications.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/azure.microsoft.com\/en-us\/blog\/introduction-to-websockets-on-windows-azure-web-sites\/\" \/>\n<meta property=\"og:site_name\" content=\"Microsoft Azure Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/microsoftazure\" \/>\n<meta property=\"article:published_time\" content=\"2013-11-14T00:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-09-12T14:20:22+00:00\" \/>\n<meta name=\"author\" content=\"Stefan Schackow\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@azure\" \/>\n<meta name=\"twitter:site\" content=\"@azure\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Stefan Schackow\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/introduction-to-websockets-on-windows-azure-web-sites\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/introduction-to-websockets-on-windows-azure-web-sites\/\"},\"author\":[{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/author\/stefan-schackow\/\",\"@type\":\"Person\",\"@name\":\"Stefan Schackow\"}],\"headline\":\"Introduction to WebSockets on Windows Azure Web Sites\",\"datePublished\":\"2013-11-14T00:00:00+00:00\",\"dateModified\":\"2025-09-12T14:20:22+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/introduction-to-websockets-on-windows-azure-web-sites\/\"},\"wordCount\":1069,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/introduction-to-websockets-on-windows-azure-web-sites\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2013\/11\/7563.a.png-550x0-346x369-1.webp\",\"articleSection\":[\"Web\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/azure.microsoft.com\/en-us\/blog\/introduction-to-websockets-on-windows-azure-web-sites\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/introduction-to-websockets-on-windows-azure-web-sites\/\",\"url\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/introduction-to-websockets-on-windows-azure-web-sites\/\",\"name\":\"Introduction to WebSockets on Windows Azure Web Sites | Microsoft Azure Blog\",\"isPartOf\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/introduction-to-websockets-on-windows-azure-web-sites\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/introduction-to-websockets-on-windows-azure-web-sites\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2013\/11\/7563.a.png-550x0-346x369-1.webp\",\"datePublished\":\"2013-11-14T00:00:00+00:00\",\"dateModified\":\"2025-09-12T14:20:22+00:00\",\"description\":\"Windows Azure Web Sites has recently added support for the WebSocket protocol. Both .NET developers and node.js developers can now enable and use WebSockets in their applications.\",\"breadcrumb\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/introduction-to-websockets-on-windows-azure-web-sites\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/azure.microsoft.com\/en-us\/blog\/introduction-to-websockets-on-windows-azure-web-sites\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/introduction-to-websockets-on-windows-azure-web-sites\/#primaryimage\",\"url\":\"\",\"contentUrl\":\"\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/introduction-to-websockets-on-windows-azure-web-sites\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog home\",\"item\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Web\",\"item\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/category\/web\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Introduction to WebSockets on Windows Azure Web Sites\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#website\",\"url\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/\",\"name\":\"Microsoft Azure Blog\",\"description\":\"Get the latest Azure news, updates, and announcements from the Azure blog. From product updates to hot topics, hear from the Azure experts.\",\"publisher\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization\",\"name\":\"Microsoft Azure Blog\",\"url\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2024\/06\/microsoft_logo.webp\",\"contentUrl\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2024\/06\/microsoft_logo.webp\",\"width\":512,\"height\":512,\"caption\":\"Microsoft Azure Blog\"},\"image\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/microsoftazure\",\"https:\/\/x.com\/azure\",\"https:\/\/www.instagram.com\/microsoftdeveloper\/\",\"https:\/\/www.linkedin.com\/company\/16188386\",\"https:\/\/www.youtube.com\/user\/windowsazure\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#\/schema\/person\/c702e5edd662b328b49b7e1180cab117\",\"name\":\"shakir\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/9342c7c05bb16548741bc5cd3a3e3b7ee0c8e746844ad2cc582db5beb5514c6f?s=96&d=mm&r=g7664e653ea371ce16eaf75e9fa8952c4\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/9342c7c05bb16548741bc5cd3a3e3b7ee0c8e746844ad2cc582db5beb5514c6f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/9342c7c05bb16548741bc5cd3a3e3b7ee0c8e746844ad2cc582db5beb5514c6f?s=96&d=mm&r=g\",\"caption\":\"shakir\"},\"sameAs\":[\"https:\/\/azure.microsoft.com\"],\"url\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/author\/shakir\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Introduction to WebSockets on Windows Azure Web Sites | Microsoft Azure Blog","description":"Windows Azure Web Sites has recently added support for the WebSocket protocol. Both .NET developers and node.js developers can now enable and use WebSockets in their applications.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/azure.microsoft.com\/en-us\/blog\/introduction-to-websockets-on-windows-azure-web-sites\/","og_locale":"en_US","og_type":"article","og_title":"Introduction to WebSockets on Windows Azure Web Sites | Microsoft Azure Blog","og_description":"Windows Azure Web Sites has recently added support for the WebSocket protocol. Both .NET developers and node.js developers can now enable and use WebSockets in their applications.","og_url":"https:\/\/azure.microsoft.com\/en-us\/blog\/introduction-to-websockets-on-windows-azure-web-sites\/","og_site_name":"Microsoft Azure Blog","article_publisher":"https:\/\/www.facebook.com\/microsoftazure","article_published_time":"2013-11-14T00:00:00+00:00","article_modified_time":"2025-09-12T14:20:22+00:00","author":"Stefan Schackow","twitter_card":"summary_large_image","twitter_creator":"@azure","twitter_site":"@azure","twitter_misc":{"Written by":"Stefan Schackow","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/introduction-to-websockets-on-windows-azure-web-sites\/#article","isPartOf":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/introduction-to-websockets-on-windows-azure-web-sites\/"},"author":[{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/author\/stefan-schackow\/","@type":"Person","@name":"Stefan Schackow"}],"headline":"Introduction to WebSockets on Windows Azure Web Sites","datePublished":"2013-11-14T00:00:00+00:00","dateModified":"2025-09-12T14:20:22+00:00","mainEntityOfPage":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/introduction-to-websockets-on-windows-azure-web-sites\/"},"wordCount":1069,"commentCount":0,"publisher":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization"},"image":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/introduction-to-websockets-on-windows-azure-web-sites\/#primaryimage"},"thumbnailUrl":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2013\/11\/7563.a.png-550x0-346x369-1.webp","articleSection":["Web"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/azure.microsoft.com\/en-us\/blog\/introduction-to-websockets-on-windows-azure-web-sites\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/introduction-to-websockets-on-windows-azure-web-sites\/","url":"https:\/\/azure.microsoft.com\/en-us\/blog\/introduction-to-websockets-on-windows-azure-web-sites\/","name":"Introduction to WebSockets on Windows Azure Web Sites | Microsoft Azure Blog","isPartOf":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/introduction-to-websockets-on-windows-azure-web-sites\/#primaryimage"},"image":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/introduction-to-websockets-on-windows-azure-web-sites\/#primaryimage"},"thumbnailUrl":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2013\/11\/7563.a.png-550x0-346x369-1.webp","datePublished":"2013-11-14T00:00:00+00:00","dateModified":"2025-09-12T14:20:22+00:00","description":"Windows Azure Web Sites has recently added support for the WebSocket protocol. Both .NET developers and node.js developers can now enable and use WebSockets in their applications.","breadcrumb":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/introduction-to-websockets-on-windows-azure-web-sites\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/azure.microsoft.com\/en-us\/blog\/introduction-to-websockets-on-windows-azure-web-sites\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/introduction-to-websockets-on-windows-azure-web-sites\/#primaryimage","url":"","contentUrl":""},{"@type":"BreadcrumbList","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/introduction-to-websockets-on-windows-azure-web-sites\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog home","item":"https:\/\/azure.microsoft.com\/en-us\/blog\/"},{"@type":"ListItem","position":2,"name":"Web","item":"https:\/\/azure.microsoft.com\/en-us\/blog\/category\/web\/"},{"@type":"ListItem","position":3,"name":"Introduction to WebSockets on Windows Azure Web Sites"}]},{"@type":"WebSite","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#website","url":"https:\/\/azure.microsoft.com\/en-us\/blog\/","name":"Microsoft Azure Blog","description":"Get the latest Azure news, updates, and announcements from the Azure blog. From product updates to hot topics, hear from the Azure experts.","publisher":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/azure.microsoft.com\/en-us\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization","name":"Microsoft Azure Blog","url":"https:\/\/azure.microsoft.com\/en-us\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2024\/06\/microsoft_logo.webp","contentUrl":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2024\/06\/microsoft_logo.webp","width":512,"height":512,"caption":"Microsoft Azure Blog"},"image":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/microsoftazure","https:\/\/x.com\/azure","https:\/\/www.instagram.com\/microsoftdeveloper\/","https:\/\/www.linkedin.com\/company\/16188386","https:\/\/www.youtube.com\/user\/windowsazure"]},{"@type":"Person","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#\/schema\/person\/c702e5edd662b328b49b7e1180cab117","name":"shakir","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/9342c7c05bb16548741bc5cd3a3e3b7ee0c8e746844ad2cc582db5beb5514c6f?s=96&d=mm&r=g7664e653ea371ce16eaf75e9fa8952c4","url":"https:\/\/secure.gravatar.com\/avatar\/9342c7c05bb16548741bc5cd3a3e3b7ee0c8e746844ad2cc582db5beb5514c6f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9342c7c05bb16548741bc5cd3a3e3b7ee0c8e746844ad2cc582db5beb5514c6f?s=96&d=mm&r=g","caption":"shakir"},"sameAs":["https:\/\/azure.microsoft.com"],"url":"https:\/\/azure.microsoft.com\/en-us\/blog\/author\/shakir\/"}]}},"msxcm_display_generated_audio":false,"msxcm_animated_featured_image":null,"distributor_meta":false,"distributor_terms":false,"distributor_media":false,"distributor_original_site_name":"Microsoft Azure Blog","distributor_original_site_url":"https:\/\/azure.microsoft.com\/en-us\/blog","push-errors":false,"_links":{"self":[{"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/posts\/6115","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/comments?post=6115"}],"version-history":[{"count":1,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/posts\/6115\/revisions"}],"predecessor-version":[{"id":46114,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/posts\/6115\/revisions\/46114"}],"wp:attachment":[{"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/media?parent=6115"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/categories?post=6115"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/tags?post=6115"},{"taxonomy":"audience","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/audience?post=6115"},{"taxonomy":"content-type","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/content-type?post=6115"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/product?post=6115"},{"taxonomy":"tech-community","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/tech-community?post=6115"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/topic?post=6115"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/coauthors?post=6115"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}