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.

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

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

  2. […] Windows Azure for Developers Task 13: SetConfigurationSettingPublisher needs to be called before Fro… […]

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 )

Facebook photo

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

Connecting to %s

Create a website or blog at WordPress.com