>>:-}
>>But since that looks like connection string info I was wondering why you were not using the connectionString section ?
>
>I just used the example I found on-line. Does the app.config have pre-set sections? I didn't know that, I thought I could use anything I wanted.Hi Frank,
You can put connection strings in the appSettings section and it works fine. But, there is also a connectionStrings section (as Viv says), and you can also use that for connection strings. We do it both ways, actually.
This is what it looks like:
The section in the app.config:
<connectionStrings>
<add name="QueueLocal" connectionString="server=(local);uid=sa;pwd=MyPassword;database=queue"/>
<add name="QueueAzure" connectionString="Server=tcp:MyAzure;User ID=MyId;pwd=MyPassword;Database=queue;Trusted_Connection=False;Encrypt=True"/>
</connectionStrings>
To access the connection string in C#:
string connString = ConfigurationManager.ConnectionStrings["QueueLocal"];
~~Bonnie