Dissecting Azure Clouds

What are the challenges in porting your existing ASP.NET/SQL Server applications to Azure?

Bogota 102

If you plan to use SQL Azure then migrate your DB to Azure first. Below you will find some tips to perform this process. Yes, you will find lots of things that do not work on SQL Azure. The good thing is that moving the ASP.NET will be way easier… Once completed, then connect your local application to the DB instance in SQL Azure. This way you debug your application and find additional problems. Remember that you could get the connection string through the SQL Azure portal. Test your app. Does everything work? Then move your ASP.NET app to Azure and publish it. Congratulations, you are now connected to the Cloud!

Here are few points I found migrating my ASP.NET MVC app:

  1. There is no support for Session Affinity (Azure is Stateless) – I’m aware that Azure load balancing doesn’t support Session Affinity – hence the existing web application should be changed if it has session affinity.
  2. If you get this error debugging your app in Azure: "Windows Azure Tools: Failed to initialize the Development Storage service. Unable to start Development Storage. Failed to start Development Storage: the SQL Server instance ‘localhostSQLExpress’ could not be found. Please configure the SQL Server instance for Development Storage using the ‘DSInit’ utility in the Windows Azure SDK." 
    It is because the Dev Store is pointing to a named instance of SQLExpress and if you are using SQL Server like me, then you would need to do like what the error message said.
    Go to where the devstore is installed i.e.
    C:Program FilesWindows Azure SDKv1.0bindevstore
    and type
    dsinit /sqlinstance:.
    Take note of the "." which indicates your current default unnamed SQL Server instance.
    You will then be prompted with a screen that informs you that the installation is successful and the development storage is ready for use.
    You can now start the Development Storage service.
  3. If you get a lovely 403 – Forbidden: Access is denied. You do not have permission to view this directory or page using the credentials that you supplied. It’s because you hit the directory instead of a page.  Check this page out to see how to set a default document in the web.config (web role’s don’t automatically load a default.aspx like you might expect – you have to set it): http://blogs.msdn.com/rakkimk/archive/2007/05/25/iis7-how-to-configure-the-default-document-of-the-website-in-its-web-config.aspx
  4. If your ASP.NET app is based on MVC, ensure that the System.Web.MVC assembly is included in the service package that you deploy to Windows Azure. To do this, for a Visual C# project, expand the References node in Solution Explorer for the MVCAzureStore project, right-click the System.WebMVC assembly and select Properties. Make sure the Copy Local option is set to True.


Here there are some tips for moving your DB to SQL Azure:

  1. SQL Azure Database exposes a Tabular Data Stream (TDS) endpoint to databases that are hosted in the cloud. TDS is the same network protocol that on premise SQL Server uses, therefore, a desktop client application can connect to SQL Azure Database in the same way it connects to an on-premise SQL Server instance.
  2. You won’t be able to connect to your remote SQL Azure DB using SQL Server Management Studio (SSMS) 2008.  I guess this will be supported in R2. Currently you can only connect using a “Script Window” to an specific DB. There is no support to “USE <DB>” though.
  3. Remember that SQL Azure only support a subset of the services provided by your on-premise SQL Servers (check out this list of supported SQL commands, or Unsupported Transact-SQL Statements (SQL Azure Database) – MSDN).
  4. There is no GUI-based admin tool, so you will need to create everything (Users, Logins, DB, Tables) using SQL commands and scripts. There is a couple of community provided GUI tools to enable basic operations on your DBs. Check SQL Azure Manager
  5. If you want to migrate one DB from SQL Server 2008 to SQL Azure, and you expect to find some “Attach DB” or “Restore Backup”…forget it, you will need to use your good-old Bulk Copy/BCP, INSERT scripts or  SS Integration Services (SSIS). If you want to give SSIS a try this could help you. Some other handy tools:
    1. I just found a plug-in called SQL Azure Data Sync Tool for SQL Server, but I have not tried it.
    2. SQL Server Migration Wizard http://www.azuresupport.com/2009/12/sql-azure-introduction/2/ . I ended up generating INSERT scripts using this tool.
  6. Be aware of some deprecated features while moving your DB structure and data using SQL scripts:
  • ‘ANSI_NULLS’ is not a recognized SET option.
  • Deprecated feature ‘SET ANSI_PADDING OFF’ is not supported in this version of SQL Server.
  • Deprecated feature ‘More than two-part column name’ is not supported in this version of SQL Server.  This a significant change if your using Schemas.
  • Deprecated feature ‘Data types: text ntext or image’ is not supported in this version of SQL Server.
  • Deprecated feature ‘Table hint without WITH’ is not supported in this version of SQL Server.
    A full list id found at Deprecated Database Engine Features in SQL Server 2008 – MSDN.


See you up there!

Intro to Vagabonding or “Taking Back your Life”

Have you ever watched a National Geographic documentary or read a book about some gringo-loco spending months in the middle of a lost tribe in Africa, or simply walking from Turkey to Tibet? Did you ever wonder how this people do that? Are they millionaires?, do they simply receive a juicy paycheck every month with no need to work, and plenty of time for planning the next cool adventure? While the rest of humanity, at least the ones lucky enough to have a decent job, are trapped in a cubicle, in an endless 9-to-5 loop of complete frustration and boredom, counting the days for the next paycheck, and saving every penny to “escape”  during a 15-days break to some crowded and overpriced beach resort…well, only if the boss is kind enough to approve the leave…

Prisoner # 215353

I must confess that I love to spend hours in front of my laptop in the office and I am very fortunate to love my job, but I do not want to become another corporate drone. I do not want to climb the corporate ladder, because I have not seen anyone on the top truly enjoying his life, without being a slave of his ego, power, bonus and always watching his back. In the other hand, I am not planning to giving up everything, growing dreadlocks, becoming vegetarian, and visiting 100 countries during years, with no destinations or schedule. No, that’s not my plan, at least not in this life,.. The idea is to be able to take an extended break of some months from work, and dedicate this time on whatever I want, in search of true happiness (travelling, family, volunteering, self-studying, etc.), without ruining my finances, career or family. This is not an extended vacation period, after this time, in some way you are a different person, either because you spend part of this time volunteering, or because you have new skills to bring back to your workplace or because simply you have a different perspective of the world as result of a trip. In Generation X, Douglas Coupland illustrates how some people do this on a regular basis, calling this kind of work as an “anti-sabbatical”—a job approached “with the only purpose of staying for a limited period of time (often a year)… to raise enough funds to partake in another, more personally meaningful activity” 

The message is very clear: “Do not wait for your retirement, plan for the future but enjoy your life now!” This is not about being irresponsible, this is about taking back your life and defining its path based on your own decisions, not your boss’ or your bank’s.

By Travelling around the world you start to meet people who took this path with different motivations and backgrounds. In most of the cases they are coming from first world countries, in Latin America for example, people do not have this option on their minds. You could argue economic reasons, but I am tempted to think that this is not the only one, there are some other causes like: fear, cultural aspects, and insecurity. Newer generations constitute a big part of the work force in these countries;  They got trained in the “race-rat” way of living by their parents, who taught them to work-hard for 30 or 40 years so they can retire and start “enjoying life” , and by a society who defines success by the amount of material goods you own. For this herd of people, having the first car or apartment are well defined milestones on their careers. As they start to climb in the ladder, get better salaries and bonuses, they simply start to spend more – “the more to earn the more you spend”, so the only way to cope with your expenses and credit card bills is simply getting a higher position in the organization (basically: “you want a bigger cheese, don’t you? then start moving faster that wheel”), working harder and adding more frustration. It is very clear that this situation is not sustainable. As I already stated, I love working hard, but you need a clear reason for doing it, and working for your bank is not a very smart one let me tell you.

Is it possible to get out of this non-sense race? Yes, it is possible. I know, because I did it.


The following tips are based on my personal experience. Books like Rolf Potts’ Vagabonding and Tim Ferris’ The 4-Hour Work Week  helped me a lot on structuring it in my case:

1. Declare your independence: This is the most difficult part and where unfortunately only a few brave ones succeed. Paralysis by analysis is a common disease in this phase. The question of how and when to start this process is not really a question at all. Vagabonding starts now. Even if the practical reality of travel is still months or years away, vagabonding begins the moment you stop making excuses, start saving money, and begin looking at maps with the narcotic tingle of possibility.

2. Define an escape plan: The second thing to do is make an assessment of your financial situation. How much is your total debt? How much money do you really have? If you decide to take this path you will be working every day for your liberation, you will make work serve your interests. Forget about that new faster car, cool phone or exclusive apartment. Reduce your expenses to the minimum and define from now a serious savings plan. How long do you want to take off? 6-months, a year? Your escape budget will be defined according to this. Include in that budget all the money you need to clear your debt.

3. Independence Day has come: The day you are finally debt free – that day you will walk in your office feeling more important than the CEO. From that day, you don’t give a shit about anything. From that same day, all your fears disappear. You are a free man.

4. Be free but not Stupid: you need to define how you are going to leave the cubicle. Unless you are changing positions you would need to come back in the future. Ask your HR department about the company’s sabbatical or unpaid leave policy. If that policy does not exist (as in most companies in Latin America!), the HR lady does not have a clue, or simply you do not want to come back, you can make strategic use of a personal-freedom technique, popularly known as “quitting”. Yes, quit, but do it as a gentleman, this is a small world and you never know.. But, even leaving your job in a more permanent manner need not to be a negative act. You should be even proud of that “hole” in your resume. Enthusiastically include all your positive experiences acquired during this mini-retirement period. Your next employer will be interested and impressed (and a little bit envious). In my case I have so much time to sit down and learn about many software development technologies, methodologies, and I even got an important certification on my industry. If you are going to quit, I-Resign is a valuable resource with advices and templates for diplomatically doing it.

5. Ready, set, go!: ok, today is your last day in the office, from now on you are the only responsible for defining your career path, not your boss, you know exactly where do you want to go, and only you will define your daily agenda. Get your last paycheck, say goodbye, leave the building and do not look back.

6. I am free, now what? from my personal experience I got to tell you that having a clear plan from the beginning of your time-off is very important. Without that, you will be simply loosing your time and savings, going back latter to the marketplace with no extra value and new debts. Define a plan and focus your efforts: a common mistake is getting involved in dozens of different activities because you have plenty of time.

My personal experience: in October 2008 I decided along with my wife to take a break after the upcoming born of Martin, our 1st child. In May 2009, in the middle of the worldwide economic crisis I quitted from my successful position as senior consultant for one of the biggest corporations in the World, to leave the middle-east and come back to my country for a while. Either too brave or very stupid. Fortunately, destiny did not let us down, I have enjoyed so much my time with my wife, home, our baby, and in the mean time I have learned so many things, traveled for weeks, read many books and I got ready to go back in the corporate train with new ideas and more energy. I am happy and I do not regret what I did for a nanosecond.

Room View

Have you ever planned to take a break? How was it? Please leave your comments, experiences, advices and other rants.