"Fortunate are those who take the first steps.” ― Paulo Coelho

Debugview.exe as rescue tool

DebugView is a developer friendly tool helps you to monitor debug output messages from local or nw system – from managed/unmanaged code. Recently I was debugging managed COM dll created in C# consumed in office application. I wanted a tool to debug end to end, Let say, your Office files VBA macro calls .NET COM dll for processing some complex logic and then returns the value to your macro.

In dev environment, we usually attach VS to the application and debug them, in VBA using debug.print statements. Assume that, you don’t have VS at your production server or customer machine where you wanted to debug them badly. Here is where debugview comes for rescue.

To write, debug statements from managed code, use Diagnostic having Debug.writeline. For VBA, use OutputDebugString. For other languages – use as here.

C#:- System.Diagnostics.Debug.WriteLine("This is from .NET before word instance.");

VBA:- Private Declare Sub OutputDebugString Lib "kernel32" Alias "OutputDebugStringA" (ByVal lpOutputString As String)
Private Sub DebugPrint(dbgOutput As String)
OutputDebugString dbgOutput
End Sub
Sub test()
DebugPrint ("Test message for the debugger")
End Sub

Note: Make sue you run as “Admin”.



March 22, 2015 Posted by | .NET General, Office | , , , | Leave a comment

Azure Glossary

A Cloud and Azure Glossary for the Confused

Windows Azure Platform Glossary for IT Pros

Microsoft Patterns and practices – Azure Glossary

March 7, 2015 Posted by | Azure | | Leave a comment

Memory explained by Mark Russinovich

Pushing the Limits of Windows: Physical Memory

Pushing the Limits of Windows: Virtual Memory

Pushing the Limits of Windows: Paged and Nonpaged Pool

March 4, 2015 Posted by | .NET General | | Leave a comment

Explored Azure Cloud Service auto scaling feature

This weekend I had a chance to try this blog post by Kirk Evans here. Finally decided to try myself and experience the fact. Trust me, its one of the cool feature implemented in Azure. I can’t imagine how many lines of code would execute in the back-end for each of those button click from portal, say increase the core, queue, cpu etc – really hard to imagine or think about it.

#Hats off to Azure team for their flawless implementation. I was able to experience this feature end to end without any bug or hassle. few observation from my point,

How to automatically scale the worker role based on the number of messages in a queue

+ Kirk has used Azure service bus to validate this functionality. I have also used the same .NET console application to pump the queue message. It took sometime to fix those project reference etc. Finally with Nuget able to resolve the dependencies and publish it successfully.
+ Everything went flawlessly from there. Spent my time mostly in the portal to know the settings and tweaking it. I think we should bring those nuget console to the project context menu for quicker launch. Right now it is buried some where under main menu of Visual Studio.
+ Though auto scaling worked like charm, the dashboard chart is not getting refreshed or reflecting real data, not sure what’s going on there.

Note: Auto scale feature automatically creates or destroys the VM’s based on the rules

+ Source code uploaded here – &&

+ Screenshots here.

This slideshow requires JavaScript.

Happy weekend !

March 1, 2015 Posted by | Azure, Azure Cloud Service | | Leave a comment

Pizza as a Service [IaaS vs PaaS vs SaaS]

I’ve just come across the below Pizza as a Service chart from linkedin. I just added our Azure chart as well below for side by side comparison. I should give full credit to “Albert Barron” who created this pizza chart and article here. Very layman explanation for Cloud service.. Fantastic.



February 26, 2015 Posted by | Azure | | Leave a comment

Getting started with Azure RemoteApp

This weekend, I had a chance to explore Azure RemoteApp. In nutshell, this App runs on Windows 2012 R2 over rdp service. We usually RDP to a remote machine but in this case, we are rdp’ing to a particular published apps without any visible difference like window border or floating bar etc. Trust me, end user won’t be able to identify whether they are on a remote app or local app. I am really impressed with the design thought.

We can connect to a remotely published apps from a azure portal and then use it by installaing a small exe at client machine for logon and app selection. As of now, It comes with few default Office applications(apps) but in case of hybrid option you can customize by uploading your VHD’s as per our wish.

Since this supports resume and continue kind of state management, you could logoff from your office and then continue from home using any device from the place where you’ve left.

+ It delivers the functionality of the on-premises Microsoft RemoteApp, backed by Remote Desktop Services

+ Helps you provide secure, remote access to applications from many different user devices. Available for Windows 8.1, Windows 8, Windows 7 Service Pack 1, iOS, Mac OS X, Windows RT, Android, devices, and Windows Phone. It also support the Windows 10 preview.

> To achieve this, you need to install a clickonce installable RemoteAppClient from here –

> Azure documentation:

> Video –

> Azure RemoteApp Cloud Deployment overview

> Understanding Azure Remote App

This slideshow requires JavaScript.

February 16, 2015 Posted by | Azure | | Leave a comment

Interesting Azure links

Microsoft Azure infographics

Microsoft Architecture Blueprints

Top architecture trends and perspectives

Cloud application development

Azure Symbol/Icon set .

Design patterns 

February 8, 2015 Posted by | Azure | Leave a comment

Microsoft Azure ebooks download(free from MVA)



February 4, 2015 Posted by | Azure | | Leave a comment

About -Azure Storage Explorer utility

I got this tools link while searching for Azure Storage free tools – explorer. Azure Storage Explorer is simply a nice tool to work and explore. It is free, elegant and clutter free to use. It just fulfill our expectation. #Good job by david

Download it from here –

This slideshow requires JavaScript.

February 2, 2015 Posted by | Azure, Azure Storage, Azure Tools | | Leave a comment

Error while deleting Azure storage, how to safe delete

While working with Azure storage, I ran into a tricky problem where I could not able to delete the storage created implicitly during VM creation.

Though I deleted all my VM’s from my account but these underlying storage were listed under my account for some reason. I tried hard to get rid of this by going through all the dependencies but no luck.


I tried deleting using Azure Storage Explorer but same problem persisted.


Resolution: You have to delete VHD files before deleting storage. When Virtual Machine is removed, VHD file exists there for some reason – may be by design think so. You can delete it from Virtual Machines -> Disks and then try deleting the storage.


February 2, 2015 Posted by | Azure | | Leave a comment

Windows Azure storage getting started

My reading notes from this book which I bought recently – Developing Cloud Applications with Windows Azure Storage by Paul Mehner.


I will try simplify the content with examples for quicker references. Hope you enjoy this series about Windows Azure Storage.

+ Windows Azure Storage(WAS) – provides independent data management services to our application – data storage for any application/any platform/any language over HTTP

+  We are moving to NoSQL era due to volume of data/performance. In 1970’s we started with flat file –> file based relational db’s -> Relational -> Hierarchical -> N/w -> Federated -> NoSQL (not only SQL).

+ WAS is implements as NoSQL-styled db.

+ There are 3 high level data types in WAS – Blob, Tables and Queues.

+ WAS is not a relational db

+ Access to this WAS is done with simple REST API

+ WAS supports scalability, replication, geo-locaiton, geo-replication, independent and interoperability, maintains fully consistent model (Amazon S3 is eventually consitent model – read operation after update may/may not return the very recent updated data)

BLOBS (for storing unstructured data –  doc, pictures, videos and music)


>  Windows Azure blob service provides a simple RESTful APi for storing and retrieving unstructured data.

> Blobs are organized into Containers(similar to directories), you can have any number of blob’s under containers.

> Blobs and blob containers are easily accessible with unique url’s.

> You can set public access as well.

> Ideal for the storage of web content



> Windows Azure Table service  provides a simple RESTful Api for storing massive amounts of semi structured data.

> These tables are not at all like relational db tables.

> Rows are called entities, consist of properties, which are like columns.

> Different rows stored in the same table can often have different set of properties.



> Queues do not provide permanent storage of the message they handle.

> Unprocessed messages will be deleted from the queue after 7 days.

> Same like MSMQ, it will get deleted upon read, exposed through RESTful API’s.

Happy Azuring!

February 2, 2015 Posted by | Azure Storage | | Leave a comment

Microsoft Azure – Website hosting options explored..

Microsoft Azure is growing faster than ever. Being developer for all these years, I have not considered Azure is for Developer. Trust me, you will be bowled after seeing whole list of Azure offerings.
In future, there is no surprise that every developer would be touching atleast one of their offerings at some point in their dev time. If you are Microsoft. NET dev, then there is high chance that you would be asked to consider Azure offerings in your proposal/delivery. This year I am going to concentrate on Microsoft Azure and its bread crumb of technologies from Developer perspective.

Let start with simple web applications hosting, today you can do it in 3 ways using Azure services.

1) Using Azure VM – host under dedicated IIS(VM) – PaaS
> on par with your on-Premises deployments
> you own the VM(your box), so you need to take care of OS updates
> you manage the hostnames inside IIS (setup the host header within IIS)
> pretty much you can install/manage as like your on-premise edition
2) Using Cloud Services- host using Web Role(WR) -IaaS
> you own only a web-role, could service save us from OS updates and other headaches.
> You own the application, you could RDP’s to this VM and perform as you do in your on-premise
> one thing to remember – these are stateless VM. Every start and stop you get a different VM
> you own the code and your application updates – rest is taken care by MS.
> well suited for multitier application – can be scaled independetly (web and work roles)
3) Host it as Azure Website(AWs)
> easiest way to host the websites
> don’t have to worry about OS updates
> all your application updates are pushed through your tfs/dropbox.
> one click swap to production vs staging slots and other cool features
> web jobs adds processing power to our websites by adding worker role to your existing cloud services
> well suited for hosting sites like – wordpress, joomla, drupal- .NET, Java, PHP, Node.js, Python
> built-in Autoscale and load balancing
> high availability and auto-patching
> continous deployment with Git, TFS, GitHub
> SQL Db, Mysql, DocumentDB, Search, MongoDB

Let me start explore from db side in our next post :)

February 1, 2015 Posted by | Azure | , | Leave a comment

My 500′ th blog post from the past 10 years of blogging !! – Awesome

Year 2014 is something unforgettable in my career and personal life.
Yes, I moved to a newer job, second daughter “Mahanya” arrived, got leaner, becoming vegan, enjoying being single, enjoy preparing fish. I enjoy kesar sunday tea and jilabi’s – one of my weekend stress buster. Coming back, I don’t usually think about the past(reviewing year) and also not good at that. But wanted to have a checkpoint in life to see from the huge list of things I succeeded and failed in 2014. Life is too fast and most of us don’t have time to relax and look back.

Few important things I learned during this first 10 year of my career. 

1) Be focused and persistent from the day one.
2) Stay Focused on what matters the most and leave the rest.
3) Nothing wrong in Jack of all than master of one – you should aware of your battle card and ignore your peers good at it.
4) My hobbies changed every year, thinking changed – really slowing down. I can feel that.
5) Becoming techie :) I have not changed a bit from my college days..
6) Penny saved is penny earned
7) Focus on only on things which you can change and influence.
8) Thanks to Sapient and Thomson for shaping my financial knowledge. Oh yeah – I can be your trusted advisor too
9) Not lucky enough to use my passport, had always mixed feeling – but right now I am not worried a bit.
10) Anti TV and still going on..

What I learned in 2014
1) “Persistence”, “Confident” and “focus” – “NEVER GIVE UP”
2) 2014 absolutely no travel and less fun, more work and no family life
3) Got Leaner – trimmed those extra those 5 Kg
4) Feedemon is my constant weekend buster to find a good reading stuff.- thanks for that.
5) Plan for the day ahead. These days, my calendar drives my work and schedules
6) Commute to work by Office cab, timing changed to NA hours(EST)
7) Particpiated in Office Hackathon – attempted “Search and paste”
8) Set the right expectation, say “no” at the right place
9) You know what, my 2014 hobbie is listening music – Bose at home.
10) Learned some internals of Microsoft Stack technologies and debugging tools.

> Machine learning dumped it
> Failed at one of the internal key movement
> No certification/coursera
> Closed Metroskillz training business
> No rain and zero business- driest year so far I have seen

I am excited about 2015- absolutely looking forward to do some cool things in both personal and career.
1) Azure, Azure and Azure – develop these skills required for consulting & Develop some cool free office apps
2) Stay always focused and explore the connecting dots
3) Plan for at least 2 vacation with family
4) MS certification
5) Hard work never fails
6) Buy a cycle

For me, 2014 was a great year. I have really enjoyed blogging for the last ten years by exploring things which is interesting to me always. I am not going to give up.. I am sure you too..

# good luck mikky ! best wishes ! lot of sleepless night and hard work will pay you some day. ## Keep going – I am proud of your energy even after 16 hours+ of sitting..### You are different, doer !!

Cyberiafreak – MS 10.33 AM…Life is beautiful.. Trust it. …hackoo :) exiting..

December 23, 2014 Posted by | Uncategorized | Leave a comment

Languages features in C# 6 and VB 14

Feature Example C# VB
Auto-property initializers public int X { get; set; } = x; Added Exists
Getter-only auto-properties public int Y { get; } = y; Added Added
Ctor assignment to getter-only autoprops Y = 15 Added Added
Parameterless struct ctors Structure S : Sub New() : End Sub : End Structure Added Added
Using static members using System.Console; … Write(4); Added Exists
Dictionary initializer new JObject { [“x”] = 3, [“y”] = 7 } Added No
Await in catch/finally try … catch { await … } finally { await … } Added No
Exception filters catch(E e) if (e.Count > 5) { … } Added Exists
Partial modules Partial Module M1 N/A Added
Partial interfaces Partial Interface I1 Exists Added
Multiline string literals “Hello<newline>World” Exists Added
Year-first date literals Dim d = #2014-04-03# N/A Added
Line continuation comments Dim addrs = From c in Customers ‘ comment N/A Added
TypeOf IsNot If TypeOf x IsNot Customer Then … N/A Added
Expression-bodied members public double Dist => Sqrt(X * X + Y * Y); Added No
Null propagation customer?.Orders?[5]?.$price Added Added
String interpolation $”{p.First} {p.Last} is {p.Age} years old.” Added* Planned
nameof operator string s = nameof(Console.Write); Added* Planned
#pragma #Disable Warning BC40008 Added Added
Smart name resolution N/A Added
ReadWrite props can implement ReadOnly Exists Added
#region inside methods Exists Added
Overloads inferred from Overrides N/A Added
CObj in attributes Exists Added
CRef and parameter name Exists Added
Extension Add in collection initializers Added Exists
Improved overload resolution Added N/A

December 13, 2014 Posted by | Uncategorized | , | Leave a comment

Troubleshooting masterpiece by Mark Russinovich – Weekend Read. (from TechEd NA-2014)

It is always funny, geeky, informative and casual when listening to Mark Russinovich Tech-ed session. It made my weekend :)

Be sure to watch this – especially blue screen one.

Mark Russinovich.jpg

December 8, 2014 Posted by | .NET General, 100 % Fun...[really Worth] | | Leave a comment

How to create your first Office Com Addin

1) Create a C# class library project

2) Add Extensibility reference to the project
 namespace ClassLibrary1
 public class Class1 : Extensibility.IDTExtensibility2

3) Implement the interface method and place a messagebox OnStartupComplete to test
4) From Project properties > Build > "Register for COM interop"
5) From Project properties > Application > Assembly information > "Make assembly COM Visible
6) Compile - VS should automatically build and register the COM to the registry
7) This would create something like this,
 Windows Registry Editor Version 5.00
8) Now, create the below registry file "a.reg" save and run to create this entry under HCU
For Excel, create under Excel and accordingly for other product
 Windows Registry Editor Version 5.00
Copy "{0D39F056-DF63-3860-9E79-B57F6358FD4D}" and search under HKEY_CLASS_ROOT\CLSID
Windows Registry Editor Version 5.00
 [HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{0D39F056-DF63-3860-9E79-B57F6358FD4D}\Implemented Categories]
 [HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{0D39F056-DF63-3860-9E79-B57F6358FD4D}\Implemented Categories\{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}]
[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{0D39F056-DF63-3860-9E79-B57F6358FD4D}\InprocServer32] @="mscoree.dll"
 "Assembly"="ClassLibrary1, Version=, Culture=neutral, PublicKeyToken=null"
 "CodeBase"="file:///c:/users/maheshk/documents/visual studio 2013/Projects/ClassLibrary1/ClassLibrary1/bin/Debug/ClassLibrary1.dll"
 "Assembly"="ClassLibrary1, Version=, Culture=neutral, PublicKeyToken=null"
 "CodeBase"="file:///c:/users/maheshk/documents/visual studio 2013/Projects/ClassLibrary1/ClassLibrary1/bin/Debug/ClassLibrary1.dll"
9) Now launch, Excel should see the message box on load - means this add-in loaded because of load behavior set as "3" - load at start. ( at the step #8 )

10)You can check this, by Excel > File > Options > Addins > Active Application Addin: ClassLibrary1.Class, location: mscoree.dll, COM Add-in

11) Register: 
"%WINDIR%\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe" /codebase ComAddin\bin\Debug\ComAddin.dll
"%WINDIR%\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe" /unregister ComAddin\bin\Debug\ComAddin.dll

Note: You may get access denied if you did not run as VS in Admin mode. 

Refer -
Download my sample - 
Download C++ sample -

November 8, 2014 Posted by | .NET General, Office, Outlook | , | Leave a comment

How to capture the dumps when the application crash on launching ?

Two ways you can achieve this,

#1) Using Procdump

>procdump.exe -w -e -ma SomeCrashingApp.exe
[This command used to wait for the exe to appear, crash to gather the dumps ]

If you are capturing .NET 4.0 dump, then this won’t triggered, you may have to specify -e 1 to gather the dump for later framework.
>procdump.exe -w -e 1 -ma somecrashing.exe
If it is older version of .NET then you could use this.
>procdump.exe -w -e -ma somecrashing.exe

#2) Using DebugDiag

1 2 3 4

October 28, 2014 Posted by | .NET General | Leave a comment


Get every new post delivered to your Inbox.