{"id":6155,"date":"2013-07-17T00:00:00","date_gmt":"2013-07-17T00:00:00","guid":{"rendered":"https:\/\/azure.microsoft.com\/blog\/windows-azure-web-sites-how-application-strings-and-connection-strings-work"},"modified":"2025-09-12T07:10:59","modified_gmt":"2025-09-12T14:10:59","slug":"windows-azure-web-sites-how-application-strings-and-connection-strings-work","status":"publish","type":"post","link":"https:\/\/azure.microsoft.com\/en-us\/blog\/windows-azure-web-sites-how-application-strings-and-connection-strings-work\/","title":{"rendered":"Windows Azure Web Sites: How Application Strings and Connection Strings Work"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Windows Azure Web Sites has a handy capability whereby developers can store key-value string pairs in Azure as part of the configuration information associated with a website.&nbsp; At runtime, Windows Azure Web Sites automatically retrieves these values for you and makes them available to code running in your website.&nbsp; Developers can store plain vanilla key-value pairs as well as key-value pairs that will be used as connection strings.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Since the key-value pairs are stored behind the scenes in the Windows Azure Web Sites configuration store, the key-value pairs don\u2019t need to be stored in the file content of your web application.&nbsp; From a security perspective that is a nice side benefit since sensitive information such as Sql connection strings with passwords never show up as cleartext in a web.config or php.ini file.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can enter key-value pairs from \u201cConfigure\u201d tab for your website in the Azure portal.&nbsp; The screenshot below shows the two places on this tab where you can enter keys and associated values:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2013\/07\/2275.app-1.webp\" alt=\"screenshot of app settings page, two fields are available for input &quot;some-key-here&quot; and &quot;and-the-value-goes-here&quot;\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">You can enter key-value pairs as either \u201capp settings\u201d or \u201cconnection strings\u201d.&nbsp; The only difference is that a connection string includes a little extra metadata telling Windows Azure Web Sites that the string value is a database connection string.&nbsp; That can be useful for downstream code running in a website to special case some behavior for connection strings.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"retrieving-key-value-pairs-as-environment-variables\">Retrieving Key-Value Pairs as Environment Variables<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Once a developer has entered key-value pairs for their website, the data can be retrieved at runtime by code running inside of a website.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The most generic way that Windows Azure Web Sites provides these values to a running website is through environment variables.&nbsp; For example, using the data shown in the earlier screenshot, the following is a code snippet from ASP.NET that dumps out the data using environment variables:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2013\/07\/2605.Screen-Shot-2013_2D00_07_2D00_17-at-10.12.22-AM.webp\" alt=\"4 lines of code are displayed\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here is what the example page output looks from the previous code snippet:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2013\/07\/4101.Screen-Shot-2013_2D00_07_2D00_17-at-10.13.06-AM.webp\" alt=\"3 lines of code are displayed\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">[Note:&nbsp; The interesting parts of the Sql connection string are intentionally blanked out in this post with asterisks.&nbsp; However, at runtime rest assured you will retrieve the full connection string including server name, database name, user name, and password.]<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Since the key-value pairs for both \u201capp settings\u201d and \u201cconnection strings\u201d are stored in environment variables, developers can easily retrieve these values from any of the web application frameworks supported in Windows Azure Web Sites.&nbsp; For example, the following is a code snippet showing how to retrieve the same settings using php:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2013\/07\/4314.Screen-Shot-2013_2D00_07_2D00_17-at-10.45.32-AM.webp\" alt=\"6 lines of code are displayed\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">From the previous examples you will have noticed a naming pattern for referencing the individual keys.&nbsp; For \u201capp settings\u201d the name of the corresponding environment variable is prepended with \u201cAPPSETTING_\u201d.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For \u201cconnection strings\u201d, there is a naming convention used to prepend the environment variable depending on the type of database you selected in the databases dropdown.&nbsp; The sample code is using \u201cSQLAZURECONNSTR_\u201d since the connection string that was configured had \u201cSql Databases\u201d selected in the dropdown.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The full list of database connection string types and the prepended string used for naming environment variables is shown below:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you select \u201cSql Databases\u201d, the prepended string is \u201cSQLAZURECONNSTR_\u201d<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you select \u201cSQL Server\u201d the prepended string is \u201cSQLCONNSTR_\u201d<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you select \u201cMySQL\u201d the prepended string is \u201cMYSQLCONNSTR_\u201d<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you select \u201cCustom\u201d the prepended string is \u201cCUSTOMCONNSTR_\u201d<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"retrieving-key-value-pairs-in-asp-net\">Retrieving Key-Value Pairs in ASP.NET<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">So far we have shown how the key-value pairs entered in the portal flow through to a web application via environment variables.&nbsp; For ASP.NET web applications, there is some extra runtime magic that is available as well when using the .NET 4.5 framework (note:&nbsp; this magic is not available if you choose .NET 3.5 since it relies on functionality that only exists in .NET 4.5).&nbsp; If looking at the names of the different key-value types seems familiar to a .NET developer that is intentional.&nbsp; \u201cApp settings\u201d neatly map to the .NET Framework\u2019s <em>appSettings<\/em> configuration.&nbsp; Similarly \u201cconnection strings\u201d correspond to the .NET Framework\u2019s <em>connectionStrings<\/em> collection.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here is another ASP.NET code snippet showing how an app setting can be referenced using <em>System.Configuration<\/em> types:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2013\/07\/4276.Screen-Shot-2013_2D00_07_2D00_17-at-10.38.42-AM.webp\" alt=\"2 lines of code are displayed\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Notice how the value entered into the portal earlier just automatically appears as part of the <em>AppSettings<\/em> collection.&nbsp; If the application setting(s) happen to already exist in your web.config file, Windows&nbsp;Azure Web Sites will automatically override them at runtime using the values associated with your website.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Connection strings work in a similar fashion, with a small additional requirement.&nbsp; Remember from earlier that there is a connection string called \u201cexample-config_db\u201d that has been associated with the website.&nbsp; If the website\u2019s web.config file references the same connection string in the &lt;connectionStrings \/&gt; configuration section, then Windows&nbsp;Azure Web Sites will automatically update the connection string at runtime using the value shown in the portal.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, if Windows&nbsp;Azure Web Sites cannot find a connection string with a matching name from the web.config, then the connection string entered in the portal will only be available as an environment variable (as shown earlier).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As an example, assume a web.config entry like the following:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2013\/07\/5342.Screen-Shot-2013_2D00_07_2D00_17-at-10.13.56-AM.webp\" alt=\"4 lines of code are displayed\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">A website can reference this connection string in an environment-agnostic fashion with the following code snippet:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2013\/07\/4666.Screen-Shot-2013_2D00_07_2D00_17-at-10.23.32-AM.webp\" alt=\"2 lines of code are displayed\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">When this code runs on a developer\u2019s local machine, the value returned will be the one from the web.config file.\u00a0 However when this code runs in Windows\u00a0Azure Web Sites, the value returned will instead be overridden with the value entered in the portal:<\/p>\n\n\n\n<div style=\"height:47px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">This is a really useful feature since it neatly solves the age-old developer problem of ensuring the correct connection string information is used by an application regardless of where the application is deployed.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"configuring-key-value-pairs-from-the-command-line\">Configuring Key-Value Pairs from the Command-line<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">As an alternative to maintaining app settings and connection strings in the portal, developers can also use either the PowerShell cmdlets or the cross-platform command line tools to retrieve and modify both types of key-value pairs.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, the following PowerShell commands define a hashtable of multiple app settings, and then stores them in Azure using the <em>Set-AzureWebsite<\/em> cmdlet, associating them with a website called \u201cexample-config\u201d.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2013\/07\/3465.Screen-Shot-2013_2D00_07_2D00_17-at-10.39.44-AM.webp\" alt=\"2 lines of code are displayed\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Running the following code snippet in ASP.NET shows that the value for the original app setting (\u201csome-key-here\u201d) has been updated, and a second key-value pair (\u201csome-other-key\u201d) has also been added.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2013\/07\/8737.Screen-Shot-2013_2D00_07_2D00_17-at-10.26.07-AM.webp\" alt=\"4 lines of code are displayed\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Sample HTML output showing the changes taking effect:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">some-other-key &lt;&#8211;&gt; a-different-value<br>some-key-here &lt;&#8211;&gt; changed-this-value<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Updating connection strings works in a similar fashion, though the syntax is slightly different since internally the PowerShell cmdlets handle connection strings as a <em>List&lt;T&gt;<\/em> of <em>ConnStringInfo<\/em> objects (<em>Microsoft.WindowsAzure.Management.Utilities.Websites.Services.WebEntities.ConnStringInfo<\/em> to be precise).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The following PowerShell commands show how to define a new connection string, add it to the list of connection strings associated with the website, and then store all of the connection strings back in Azure.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2013\/07\/5340.Screen-Shot-2013_2D00_07_2D00_17-at-10.26.48-AM.webp\" alt=\"8 lines of code are displaed\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Note that for the property <em>$cs.Type<\/em>, you can use any of the following strings to define the type:&nbsp; \u201cCustom\u201d, \u201cSQLAzure\u201d, \u201cSQLServer\u201d, and \u201cMySql\u201d.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Running the following code snippet in ASP.NET lists out all of the connection strings for the website.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2013\/07\/2018.Screen-Shot-2013_2D00_07_2D00_17-at-10.26.07-AM.webp\" alt=\"5 lines of code are displayed\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Remember though that for Windows&nbsp;Azure Web Sites to override a connection string and materialize it in the .NET Framework\u2019s connection string configuration collection, the connection string must already be defined in the web.config.&nbsp; For this example website, the web.config has been updated as shown below:<\/p>\n\n\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now when the ASP.NET page is run, it shows that both connection string values have been over-ridden using the values stored via PowerShell (sensitive parts of the first connection string are intentionally blanked out with asterisks):<\/p>\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2013\/07\/5488.Screen-Shot-2013_2D00_07_2D00_17-at-10.28.27-AM.webp\" alt=\"Three-line snippet of code with first connection string intentionally blanked out with asterisks\" class=\"wp-image-8241 webp-format\" data-orig-src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2013\/07\/5488.Screen-Shot-2013_2D00_07_2D00_17-at-10.28.27-AM.webp\"><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"summary\">Summary<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">You have seen in this post how to easily associate simple key-value pairs of configuration data with your website, and retrieve them at runtime as environment variables.&nbsp; With this functionality web developers can safely and securely store configuration data without having this data show up as clear-text in a website configuration file. And if you happen to be using ASP.NET, there is a little extra configuration \u201cmagic\u201d that also automatically materializes the values as values in the .NET <em>AppSettings<\/em> and <em>ConnectionStrings<\/em> configuration collections.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Enjoy!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Windows Azure Web Sites has a handy capability whereby developers can store key-value string pairs in Azure as part of the configuration information associated with a website.<\/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":[1467,1461],"tags":[],"audience":[],"content-type":[1511],"product":[1542],"tech-community":[],"topic":[],"coauthors":[535],"class_list":["post-6155","post","type-post","status-publish","format-standard","hentry","category-compute","category-web","content-type-best-practices","product-static-web-apps","review-flag-1680286581-295","review-flag-1680286584-658","review-flag-3-1680286581-173","review-flag-4-1680286581-250","review-flag-5-1680286581-950","review-flag-never-1680286580-606","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>Windows Azure Web Sites: How Application Strings and Connection Strings Work | Microsoft Azure Blog<\/title>\n<meta name=\"description\" content=\"Windows Azure Web Sites has a handy capability whereby developers can store key-value string pairs in Azure as part of the configuration information associated with a website.\u00a0 At runtime, Windows\u2026\" \/>\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\/windows-azure-web-sites-how-application-strings-and-connection-strings-work\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Windows Azure Web Sites: How Application Strings and Connection Strings Work | Microsoft Azure Blog\" \/>\n<meta property=\"og:description\" content=\"Windows Azure Web Sites has a handy capability whereby developers can store key-value string pairs in Azure as part of the configuration information associated with a website.\u00a0 At runtime, Windows\u2026\" \/>\n<meta property=\"og:url\" content=\"https:\/\/azure.microsoft.com\/en-us\/blog\/windows-azure-web-sites-how-application-strings-and-connection-strings-work\/\" \/>\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-07-17T00:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-09-12T14:10:59+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2013\/07\/2275.app-1.webp\" \/>\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=\"9 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\/windows-azure-web-sites-how-application-strings-and-connection-strings-work\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/windows-azure-web-sites-how-application-strings-and-connection-strings-work\/\"},\"author\":[{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/author\/stefan-schackow\/\",\"@type\":\"Person\",\"@name\":\"Stefan Schackow\"}],\"headline\":\"Windows Azure Web Sites: How Application Strings and Connection Strings Work\",\"datePublished\":\"2013-07-17T00:00:00+00:00\",\"dateModified\":\"2025-09-12T14:10:59+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/windows-azure-web-sites-how-application-strings-and-connection-strings-work\/\"},\"wordCount\":1415,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/windows-azure-web-sites-how-application-strings-and-connection-strings-work\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2013\/07\/2275.app-1.webp\",\"articleSection\":[\"Compute\",\"Web\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/azure.microsoft.com\/en-us\/blog\/windows-azure-web-sites-how-application-strings-and-connection-strings-work\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/windows-azure-web-sites-how-application-strings-and-connection-strings-work\/\",\"url\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/windows-azure-web-sites-how-application-strings-and-connection-strings-work\/\",\"name\":\"Windows Azure Web Sites: How Application Strings and Connection Strings Work | Microsoft Azure Blog\",\"isPartOf\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/windows-azure-web-sites-how-application-strings-and-connection-strings-work\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/windows-azure-web-sites-how-application-strings-and-connection-strings-work\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2013\/07\/2275.app-1.webp\",\"datePublished\":\"2013-07-17T00:00:00+00:00\",\"dateModified\":\"2025-09-12T14:10:59+00:00\",\"description\":\"Windows Azure Web Sites has a handy capability whereby developers can store key-value string pairs in Azure as part of the configuration information associated with a website.\u00a0 At runtime, Windows\u2026\",\"breadcrumb\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/windows-azure-web-sites-how-application-strings-and-connection-strings-work\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/azure.microsoft.com\/en-us\/blog\/windows-azure-web-sites-how-application-strings-and-connection-strings-work\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/windows-azure-web-sites-how-application-strings-and-connection-strings-work\/#primaryimage\",\"url\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2013\/07\/2275.app-1.webp\",\"contentUrl\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2013\/07\/2275.app-1.webp\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/windows-azure-web-sites-how-application-strings-and-connection-strings-work\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog home\",\"item\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Compute\",\"item\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/category\/compute\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Windows Azure Web Sites: How Application Strings and Connection Strings Work\"}]},{\"@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":"Windows Azure Web Sites: How Application Strings and Connection Strings Work | Microsoft Azure Blog","description":"Windows Azure Web Sites has a handy capability whereby developers can store key-value string pairs in Azure as part of the configuration information associated with a website.\u00a0 At runtime, Windows\u2026","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\/windows-azure-web-sites-how-application-strings-and-connection-strings-work\/","og_locale":"en_US","og_type":"article","og_title":"Windows Azure Web Sites: How Application Strings and Connection Strings Work | Microsoft Azure Blog","og_description":"Windows Azure Web Sites has a handy capability whereby developers can store key-value string pairs in Azure as part of the configuration information associated with a website.\u00a0 At runtime, Windows\u2026","og_url":"https:\/\/azure.microsoft.com\/en-us\/blog\/windows-azure-web-sites-how-application-strings-and-connection-strings-work\/","og_site_name":"Microsoft Azure Blog","article_publisher":"https:\/\/www.facebook.com\/microsoftazure","article_published_time":"2013-07-17T00:00:00+00:00","article_modified_time":"2025-09-12T14:10:59+00:00","og_image":[{"url":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2013\/07\/2275.app-1.webp","type":"","width":"","height":""}],"author":"Stefan Schackow","twitter_card":"summary_large_image","twitter_creator":"@azure","twitter_site":"@azure","twitter_misc":{"Written by":"Stefan Schackow","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/windows-azure-web-sites-how-application-strings-and-connection-strings-work\/#article","isPartOf":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/windows-azure-web-sites-how-application-strings-and-connection-strings-work\/"},"author":[{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/author\/stefan-schackow\/","@type":"Person","@name":"Stefan Schackow"}],"headline":"Windows Azure Web Sites: How Application Strings and Connection Strings Work","datePublished":"2013-07-17T00:00:00+00:00","dateModified":"2025-09-12T14:10:59+00:00","mainEntityOfPage":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/windows-azure-web-sites-how-application-strings-and-connection-strings-work\/"},"wordCount":1415,"commentCount":0,"publisher":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization"},"image":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/windows-azure-web-sites-how-application-strings-and-connection-strings-work\/#primaryimage"},"thumbnailUrl":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2013\/07\/2275.app-1.webp","articleSection":["Compute","Web"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/azure.microsoft.com\/en-us\/blog\/windows-azure-web-sites-how-application-strings-and-connection-strings-work\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/windows-azure-web-sites-how-application-strings-and-connection-strings-work\/","url":"https:\/\/azure.microsoft.com\/en-us\/blog\/windows-azure-web-sites-how-application-strings-and-connection-strings-work\/","name":"Windows Azure Web Sites: How Application Strings and Connection Strings Work | Microsoft Azure Blog","isPartOf":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/windows-azure-web-sites-how-application-strings-and-connection-strings-work\/#primaryimage"},"image":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/windows-azure-web-sites-how-application-strings-and-connection-strings-work\/#primaryimage"},"thumbnailUrl":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2013\/07\/2275.app-1.webp","datePublished":"2013-07-17T00:00:00+00:00","dateModified":"2025-09-12T14:10:59+00:00","description":"Windows Azure Web Sites has a handy capability whereby developers can store key-value string pairs in Azure as part of the configuration information associated with a website.\u00a0 At runtime, Windows\u2026","breadcrumb":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/windows-azure-web-sites-how-application-strings-and-connection-strings-work\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/azure.microsoft.com\/en-us\/blog\/windows-azure-web-sites-how-application-strings-and-connection-strings-work\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/windows-azure-web-sites-how-application-strings-and-connection-strings-work\/#primaryimage","url":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2013\/07\/2275.app-1.webp","contentUrl":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2013\/07\/2275.app-1.webp"},{"@type":"BreadcrumbList","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/windows-azure-web-sites-how-application-strings-and-connection-strings-work\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog home","item":"https:\/\/azure.microsoft.com\/en-us\/blog\/"},{"@type":"ListItem","position":2,"name":"Compute","item":"https:\/\/azure.microsoft.com\/en-us\/blog\/category\/compute\/"},{"@type":"ListItem","position":3,"name":"Windows Azure Web Sites: How Application Strings and Connection Strings Work"}]},{"@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\/6155","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=6155"}],"version-history":[{"count":1,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/posts\/6155\/revisions"}],"predecessor-version":[{"id":46112,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/posts\/6155\/revisions\/46112"}],"wp:attachment":[{"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/media?parent=6155"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/categories?post=6155"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/tags?post=6155"},{"taxonomy":"audience","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/audience?post=6155"},{"taxonomy":"content-type","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/content-type?post=6155"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/product?post=6155"},{"taxonomy":"tech-community","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/tech-community?post=6155"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/topic?post=6155"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/coauthors?post=6155"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}