Problem with connection string using
I have an ASP.NET project which gives me the following exception if I try to run it
Where should I "call" it before I can use it开发者_开发百科 ?
There is no global.asax in my solution
As it should be called only once, you should put it in your global.asax Application_Start function IMO
This method is from Class CloudStorageAccount that provides methods for managing account information for storage services.
SetConfigurationSettingPublisher
Method should be called once
to set up the environment.
Try calling it in Global.asax
in Application_Start
Method.
This link at MSDN might help
- CloudStorageAccount.SetConfigurationSettingPublisher Method
It turns out that I had set a web-role as the startup project, and that made the "onstart" funcition not run when it was supposed to, thus not setting my connection.
精彩评论