Few days ago, I was working on a Windows Azure App, I created
a Web Role which was representing my application interface.
Its purpose was to upload images. I needed to
generate thumbnails as well.I thought to delegate
this responsibility to a Worker Role.
My Web
Role add image to a Blob and add a message in queue as well for
the worker role, so that it can read it and generate thumbnails for each queued
image, later.
When I created a worker role and tried to access the storage account with my defined connection string, it started giving me RoleEnvironmentException
, I set
the connecting-string for the application so I thought it will work
for both Web ad Worker Roles, but it was not the case.
For Windows Azure,
we have to set connection string for every worker and web roles, independently. I hope this
will help any new bee on Windows Azure.
Thank You
and Happy Coding.......