Tuesday, April 12, 2011


After last 3 weeks environment related settings, we are ready to make our hands dirty on creating Azure code. Isn’t it cool !!!

Since 1987 of my higher secondary computer lesson (proud to be earlier computer students in India), we used to learn the computer language using the famous ‘Hello World’ program right from quick basic, fortran, cobol, pascal, lisp, c, c++, vc++, java, c#, etc. Same old coding formulae/masala!

After the proper installations of VS2010, AzureSDK, IIS, etc. the hello azure application is created in few seconds with the built-in wizard navigation. Quite simple steps to create the first azure application with the above set up:

  1. Launch Visual Studio 2010 as administrator.

  2. Click File New Project, from the Visual C# installed Cloud templates.

  3. Create Windows Azure Project with the solution name ‘HelloAzure’.

  4. Thatz it; just click OK to launch a wizard.

  5. From the wizard, add the ASP.NET Web Role in C# with ‘HelloAzure_WebRole’.

  6. Run it (Ctrl+F5) and got the output ‘Hello Azure Application’.

Next week, I’ll talk about the interesting topic on Emulators in Azure development platform. Now, letz have a deep dive in the auto generated code piece (in the snap shot). Itz a simple web role (web application) and so 2 projects within the solution namely HelloAzure_WebRole and HelloAzure.

The first project HelloAzure_Webrole is quite simple like other ASP .NET application, comprises of site.master, global.asax, web.config, App_Data, Default.aspx, etc. One new entity is ‘WebRole.cs’ which is the entry point for Azure web role app as public class WebRole : RoleEntryPoint HelloAzure project is new concept. It contains three major components. A) HelloAzure_WebRole configuration, b) ServiceDefinition.csdef and c) ServiceConfiguration.cscfg They are the discussion points for next blog entry. Until then, happy cloud coding!

Sunday, April 3, 2011


After IIS setup, machine throws an error 0xc0000005. Haa, herez the solution.. aspnet_regiis tool.

If you install the .NET Framework on a system that has IIS already installed, IIS is automatically configured to handle requests to ASP.NET pages, and to redirect the execution to the ASP.NET runtime. However, it may happen that you installed the framework on a Windows system where IIS was not already present, and just later decided to add IIS. Registering ASP.NET on IIS is not just a matter of associating the various .aspx, .asmx, .axd, .ashx and the other ASP.NET extensions to the aspnet_isapi.dll ISAPI, more has to be done to create the ASP.NET account and to set it for ASP.NET requests, register the ISAPI itself and other stuff. Doing all this manually can be a difficult operation, and requires a good understanding of many details. Fortunately there is an utility, shipped with the .NET Framework but not documented, that can take care of these configuration chores for you. The utility is aspnet_regiis.exe, it is located under %WindowsDir%\Microsoft.NET\Framework\vx.y.zzzz\ and you should call it with the -i parameter: aspnet_regiis.exe -i

The installation of .NET Framework and registration of the Framework in ISS needs some steps like script mapping: assotiation of different .NET specitical extensions. The installation can run without the step (switch -ir), but it has more sense to skip the steps only if a previous version of ASP.NET is already registered with IIS. Exactly this do aspnet_regiis.exe -iru. If no previous version of ASP.NET is registered with IIS, then aspnet_regiis.exe -iru do make all registrations in IIS and work like aspnet_regiis.exe -i. If do a previous version of ASP.NET is already registered in IS the aspnet_regiis.exe -iru work like aspnet_regiis.exe -ir. The usage of the -u parameter "uninstalls the version of ASP.NET that is associated with the ASP.NET IIS Registration tool from the computer. Existing script maps to this version of the ASP.NET ISAPI are automatically remapped to the most recent remaining ASP.NET ISAPI version installed."