Skip to main content

Enable 32 bit mode for Application (Web Role) on Azure

I had a code written for a web application that used OLEDB adapter to query a set of rows from an excel sheet. In an on-premise deployment, I could very easily change an application pool setting found in the advance settings. Something like this
If you were to do this for a web role , you'd have to do this in a different way.
Solution is to add a startup task in a web role. Not that you cannot logon using a remote desktop to your webrole and change it in the same way described above, but the solution is not persistent(does not span through recycling of an instance).

A neat solution is to add a startup task :

1.) Add this xml as the last child of WebRole element in the ServiceDefinition.csdef

      <Task commandLine="ConfigureIIS.cmd" executionContext="elevated" taskType="simple" />

2.) Next part is to create the "ConfigureIIS.cmd" file in the web project and in the properties window , change copy to output directory to "Copy Always"

Content of file should be :

%windir%\system32\inetsrv\appcmd set config -section:applicationPools -applicationPoolDefaults.enable32BitAppOnWin64:true

Note : Open a notepad and then insert this file in the web application. Do not create it in Visual studio directly. I've observed that VS adds some junk character in the beginning of the file. so avoid it


  1. I Will Provide Seo Blog Comment Service. & niche relevant blog comment service we provide a quality service with 100% Buyer satisfaction and My team Believed in Quality work not Quantity Contact me Now 24/7.

  2. Very nice job... Thanks for sharing this amazing and educative blog post!
    web hosting in Nigeria


  3. The strategy you have posted on this technology helped me to get into the next level and had lot of information in it. The angular js programming language is very popular which are most widely used.

    Dot Net Training in Chennai | Dot Net Training in anna nagar | Dot Net Training in omr | Dot Net Training in porur | Dot Net Training in tambaram | Dot Net Training in velachery


Post a Comment

Popular posts from this blog

How to Add a User With Read Only Privileges on SQL Azure

Step 1:  Connect to the master database and create a Login

To connect to a master database in azure , either point to the master in Management studio(using the dropdown on top left) or alternatively logon to azure Portal and open the Manage interface of the Azure SQL Server (Not the database). It will prompt you to enter the database name .

In the query Window, run

create login TestLogin WITH PASSWORD = 'YOUR_PASSWORD'
Step 2.  Now, connect to the application database, 'Your_App_Database' and create the user.Do not do this on Master Database

Step 3.  Giving the user read access

EXEC sp_addrolemember 'db_datareader', 'AuditUser'
Step 4 : You can now logon with TestLogin. Note: Don't use username(created in step 2) to log on to the database.

SSL Implementation in Azure using Godaddy SSL Certificate

Step By Step Guide for Implementing Godaddy SSL Certificate on Windows Azure Cloud Service (Web Role) Introduction Sometime back, I got a task of implementing an SSL for a sub domain of one of our application offering at Infinte.

Well, it’s done now, and I thought it will be worth sharing the effort.

Problem Statement To implement an SSL Certificate on Azure Cloud Service (Web Role) using Godaddy SSL Certificate. An SSL provider like godaddy offers 256-bit encryption certificate but Azure documentation says that the certificate must use a minimum of 2048-bit encryption For the second part of the problem, visit my another post here. Step 1: Generate a Certificate Request. Usually, administrators and developers generate a certificate request from the IIS on which application is deployed. In this case, I was on Azure and I didn’t have access to the IIS. Not that I couldn’t but I wanted to explore other options. I mean Azure does provide you a remote desktop option to the cloud service instance b…

Azure SSL 2048 bit Encryption Requirement - What does that mean ?

While setting up an SSL certificate on Azure Cloud Service , I came across this requirement that stated "The Certificate must use a minimum of 2048-bit encryption". Now while choosing an SSL provider, I always saw "256 bit encryption" being advertised . Azure documentation created some confusion. I thought standard certificate like one from Godaddy might not work, but that wasn't the case. I know what it means now, and would like to share my understanding with others.
Having basic knowledge of SSL is a prerequisite here, If you are not so well versed with it then I'd recommend you to visit following videos on you tube:

Video 1 - Prime Number & Public Key Cryptography
Video 2 - How SSL works

To elaborate more on this, take a case when you type in , now Google Server sends you a certificate that has a public key. It is this public key which is usually 1024 or 2048 bit encrypted (see image as ref). Based on this public key, client generat…