Steve Spencer's Blog

Blogging on Azure Stuff

“SetConfigurationSettingPublisher needs to be called before FromConfigurationSetting can be used” Error on Azure SDK 1.3

Last week I was trying to demonstrate accessing Azure Table Storage after I upgraded to the Azure SDK 1.3. During the demo I kept getting the exception “SetConfigurationSettingPublisher needs to be called before FromConfigurationSetting can be used” even though I had written this code and my demos all worked fine previously. After some digging and some help from a delegate who had seen this problem before I removed the sites configuration from my ServiceDefinition.csdef file.

<Sites>
   <Site name="Web">
     <Bindings>
       <Binding name="HttpIn" endpointName="HttpIn" />
     </Bindings>
   </Site>
</Sites>

My demo’s suddenly started working. The sites configuration is part of a feature to allow you to host multiple websites within a single web role. (This also explained why all my projects wanted to be upgraded when they were opened). Steve Marx has written a blog post which details the fixes and reasons why this issue arises. I have now moved my code for SetConfigurationSettingPublisher from my web role OnStart to my Global.asax.cs Application_Start. My demo’s now work correctly :)

Comments (2) -

  • Kent

    2/16/2011 9:51:24 AM | Reply

    Awesome.


    I've been stuck with this error for a while and this post do the trick.


    Thanks Smile

  • Steve

    3/23/2011 3:27:27 AM | Reply

    Yeah.. It works.. Thanks.. Smile

Loading