Windows Azure for Developers Task 13: SetConfigurationSettingPublisher needs to be called before FromConfiguration Setting can be used error [Other Solution]

I would like to thank Neil Mackenzie for this post. His input on below exception [as comment in my previous post ] is content of this post .

clip_image001

In my previous post, I suggested solution of above exception , and I got a comment from one of my reader that there is an easier way to solve above exception as well. So I decided to make a post on the other way of solution as well.

Very first I won’t say solution discussed in previous post is harder than solution discussed in this post or vice versa.

Usually we read connection string as,

clip_image003

DataConnectionString is name of the connection string in setting of WebRole.

To avoid above exception read connection string as

clip_image005

So essentially,

1. First get the configuration setting value

2. Parse that

I hope this post would be useful to you in getting rid of above exception.

Dhananjay Kumar is Developer, Blogger , Speaker, Learner , Mindcracker & Microsoft MVP.

Posted in AZURE
2 comments on “Windows Azure for Developers Task 13: SetConfigurationSettingPublisher needs to be called before FromConfiguration Setting can be used error [Other Solution]
  1. david says:

    Thanks $author for the post! I will let them know where to share this!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Categories
Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my current or previous employer's view in anyway. © Copyright 2013
Follow

Get every new post delivered to your Inbox.

Join 2,120 other followers

%d bloggers like this: