Marcelo
Marcelo

Reputation: 3391

Problem with connection string using

I have an ASP.NET project which gives me the following exception if I try to run it

alt text

Where should I "call" it before I can use it ?


There is no global.asax in my solution

Upvotes: 1

Views: 141

Answers (3)

Marcelo
Marcelo

Reputation: 3391

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.

Upvotes: 0

Asad
Asad

Reputation: 21938

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

Upvotes: 1

Gregoire
Gregoire

Reputation: 24872

As it should be called only once, you should put it in your global.asax Application_Start function IMO

Upvotes: 2

Related Questions