This article describes how to install ARR 3.0 on Azure cloud service VMs on startup. You may want to use ARR for different purpose like such as reverse proxy. Find more about ARR at http://www.iis.net/learn/extensions/planning-for-arr/using-the-application-request-routing-module
ARR comes as out of band module and can be installed via WEBPI with all dependencies. Even manual setups are also available for download. For download instructions refer http://www.iis.net/downloads/microsoft/application-request-routing
However installing ARR with all required dependencies on cloud service on startup is tricky. Its not just ARR which needs to be installed but the dependencies like web farm framework and disk cache also needs to be installed.
Lets first list down all setup and there Microsoft download links.
1. Web farm framework : http://download.microsoft.com/download/5/7/0/57065640-4665-4980-A2F1-4D5940B577B0/webfarm_v1.1_amd64_en_US.msi
3. Disk Cache : http://download.microsoft.com/download/1/1/a/11a5a75a-5ddc-4821-88ca-2abe02a32ed3/ExternalDiskCache_amd64_en-us.msi
4. Disk Cache Update Patch : http://download.microsoft.com/download/D/E/9/DE90D9BD-B61C-43F5-8B80-90FDC0B06144/ExternalDiskCachePatch_amd64.msp
The above downloads are listed as per the sequence in which they need to install. You need to download all the setups and then place it on your azure web application solution.
Lets create new web role application with asp.net MVC 4 using visual studio 2013. The solution explorer should look like
One more thing to notice is, I have also added command file InstallArr.cmd. In this article I assume that you know how to execute startup command on azure role start. Read more at https://msdn.microsoft.com/en-us/library/azure/hh974417.aspx
It is important to set the properties of individual setup file and InstallArr.cmd as Build Action = “Content” and Copy to Output Director = “Copy Always”, to make sure that when azure service definition tries to execute the command it is available in bin folder.
After this important task is to write the command file.
cls
msiexec /i ARRSetup\webfarm_v1.1_amd64_en_US.msi /qn /log C:\installWebFarmLog.txt ping -n 5 127.0.0.1 > nul msiexec /i ARRSetup\requestRouter_x64.msi /qn /log C:\installARRLog.txt ping -n 15 127.0.0.1 > nul msiexec /i ARRSetup\ExternalDiskCache_amd64_en-us.msi /qn /log C:\installDiskCacheLog.txt ping -n 15 127.0.0.1 > nul msiexec /p ARRSetup\ExternalDiskCachePatch_amd64.msp /qn /log C:\installDiskCachePatch.txt ping -n 5 127.0.0.1 > nul %windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/proxy /enabled:"True" /commit:apphost >> C:\setProxyLog.txt exit /b 0
The above code installs all setups one by one. The code like like ping -n 15 127.0.0.1 > nul ensure that there is enough delay between installation of two setups. The command msiexec is used to install the any msi file. Point to note here is the last one, external disk cache patch is path and with extension msp. You need use msiexec with /p switch install patches.
The last line is option and basically makes use of arr as reverse proxy. Depnding on how you want to use the arr you may edit iis setting/applicationhost.config with appcmd.
Now go to the cloud service project and service definition file to call installarr.cmd file.
<Startup > <Task commandLine="InstallArr.cmd" executionContext="elevated" taskType="background" /> </Startup>
Build the solution and then create the package to deploy on the azure cloud service. You can always get trial azure subscription at http://azure.microsoft.com/en-us/pricing/free-trial/
Now once cloud service deployment is done you can take the remote access to the VM and check if ARR is installed or not.
In next article we will see possible scenarios of such ARR installations.
When you are using head plugin with elastic search cluster it difficult to identify whether particular node is master node, data node, both or client node. However with the help of head plugin and cat plugin you can easily identify what are the different symbols used for. For this article we will assume that we have 3 node ES cluster running.
Before going into the notations or legends lets first understand the different node combinations possible in yml file. Following is the extract from ES 1.4.2 YML configuration file.
# Every node can be configured to allow or deny being eligible as the master,
# and to allow or deny to store the data.
#
# Allow this node to be eligible as a master node (enabled by default):
#
#node.master: true
#
# Allow this node to store data (enabled by default):
#
#node.data: true# You can exploit these settings to design advanced cluster topologies.
#
# 1. You want this node to never become a master node, only to hold data.
# This will be the "workhorse" of your cluster.
#
#node.master: false
#node.data: true
#
# 2. You want this node to only serve as a master: to not store any data and
# to have free resources. This will be the "coordinator" of your cluster.
#
#node.master: true
#node.data: false
#
# 3. You want this node to be neither master nor data node, but
# to act as a "search load balancer" (fetching data from nodes,
# aggregating results, etc.)
#
#node.master: false
#node.data: false
The table below list the legend from cat and head plugins
| Sr. No. | Head Plugin Symbol | Cat Plugin Symbol | Description |
| 1 | O (empty circle) | m | The node will act as master node and not the data node. #node.master: true #node.data: false |
| 2 | ● (filled circle) | – | Only data node and not master node #node.master: false #node.data: true |
| 3 | O (empty circle) | – | Neither master nor data node. #node.master: false #node.data: false |
| 4 | ● (filled circle) | m | Both data and master, default setting. |
| 5 | (filled star) | * | node is acting as data node, not set to specific type from config |
Read more about different types of node at http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-node.html
1. When node is acting only as master node it can not serve the data and you see all shards are unassigned in sample screen shot below
2. When node is acting as data node and not master node, all data remains assigned and it can serve the data as well.
3. When its neither master nor data it is called as search load balancer and it will have all shards unassigned but can server the data by querying data nodes in the cluster.
4. When it is both data and master node it can server data as well.
Assuming you have elastic search hosted at http://myes.cloudapp.net:9200
plugin head url will be
cat plugin url will be
I will update the article as I get more details.
Note: This article is intended to give quick overview of different legends used by head or cat plugins and does not give any recommendation for optimal setting of master and data nodes.
When you create new SQL Server machine from Windows Azure VM gallery and try to login with sa login to the sql server in the newly created VM you get following error.
The error with code 18456 comes in other cases as well and you should click on the ‘Show technical details’
icon to see the error severity and state.
You can read more about error severities at http://msdn.microsoft.com/en-IN/library/ms164086.aspx and error state are as described below
| Error State | Error Description |
| 2 and 5 | Invalid user id |
| 6 | Attempt to use a Windows login name with SQL Authentication |
| 7 | Login disabled and password mismatch |
| 8 | Password mismatch |
| 9 | Invalid password |
| 11 and 12 | Valid login but server access failure |
| 13 | SQL Server service paused |
| 18 | Change password required |
There are many blogs which talk about other error codes, but for this article we are interested in user sa is not able to login to the newly setup sql server which is created from azure VM gallery like below in create azure VM wizard
If you try to login thro’ windows authentication to the newly created VM then you are successful but when you try to login using sa it fails. What many people try is to reset the password for sa login. But look at the error code state, it is one which is not described anywhere.
What happens is azure vm installation does not enable sql server login or mixed mode authentication. To enable the same login using windows authentication and then go to the properties of server node. To do this right click on the server node which is root node in object explorer and click properties. Then go to the security page. See screen shot below.
By default windows authentication mode is selected, change it to SQL Server and Windows Authentication mode. Press OK.
Restart Server by doing right click on the server node and then click restart. Most of the people not aware of this restart option and prefer to go to services console to restart the service, but this one is easily accessible!
Now try to login using sa login. If you don’t know the password for sa, you can go to security and then sa login properties to reset the password.
Hope this helps.
If you login to your azure portal (https://manage.windowsazure.com/) and go to your website dashboard and then to configure you can see the “app settings” section.
Many people do assume that you can edit your websites web.config values from here. However it is not the case. Even if you add the new values here it wont affect the existing values in your web.config; neither updating the web.config will changes the values you see on the azure dashboard.
Lets try with simple page.
See below the screen shot from azure portal
1. Go tot he configure section of your website
2. Scroll down to app settings
As show above add some key and value. I have added MyName and value as “Patil”
3. Save the changes by clicking save button a the bottom.
4. Open Visual Studio and Create new Website.
5. Open web.config and add following app setting in it
<appSettings>
<add key="MyName" value="Subodh" />
</appSettings>
5. Add test page and make it to display value of app settings key by reading from configuration manager.
E.g. I am display it on label on my page
Label1.Text = WebConfigurationManager.AppSettings["MyName"];
6. Run the project and you should see the output as “Subodh”. The value is read from web.config.
7. Now publish the website to azure portal and run the website. You should see the different value as you added in the azure portal app settings section.
You can find working demo of the same at http://subodhdemo1.azurewebsites.net/AppSettingsAzure.aspx
How do i get benefited with this feature ?
Suppose you are working on a project where you are storing some sensitive information in app settings of your web.config. You have many developers who are working on this project and you don’t wan to expose it to them.
However you also don’t want to edit the web.config every time you publish from Visual Studio.
Nobody other than the user with portal credentials will have access to your azure portal.
This also benefits you in the way that no more you need to store your data as clear text in web.config
This way you secure your web.config data from azure portal.
This blog was originally written at http://blogs.msdn.com/b/subodhpatil/archive/2013/08/02/importance-app-settings-in-azure-website-portal.aspx