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.


Discover more from Dhananjay Kumar

Subscribe to get the latest posts sent to your email.

Published by Dhananjay Kumar

Dhananjay Kumar is founder of NomadCoder and ng-India

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

Leave a comment

Discover more from Dhananjay Kumar

Subscribe now to keep reading and get access to the full archive.

Continue reading