Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems with connection string in app.config
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01326509
Message ID:
01327472
Views:
11
Linda,

Just curious...this is what my reply to your original posting suggested, that the key did not match your app.config file. Did the additional line I added to the config file for the dataaccess stuff divert your attention from the issue??

Again, just curious. :)

>Kevin,
>
>Thanks so much. I sure feel silly. I can't believe how many times I looked right at that and missed the obvious. Thanks for your gracious help.
>
>>Linda,
>>
>>>I have a new project using MS SQL Server 2005 as the database. The development environment is on a server with MS SQL Server 2005. We also have a server with SQL Server 2000 that is accessible from this server.
>>>
>>>In the app.config file, I have the following connection string:
>>>
>>>    <add key="DEVSERVER\Connection" value="server=DEVSERVER;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=LCCTrack" />
>>>
>>>
>>>I also tried this with (local) and that didn't work either.
>>>
>>>When I run the application, I get the following error:
>>>
>>>A connection string could not be found in the application configuration file for database key 'LCCTrack'.
>>>
>>>I have the databasekey set in ABusinessObject.cs.
>>
>>Notice the error says ther is no connection string fr database key "LCCTrack". Notice he key in your config file is not DEVSERVER, not LCCTrack. To get this to work with LCCTrack, change it to the following:
>>
>>
>>    <add key="LCCTrack\Connection" value="server=DEVSERVER;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=LCCTrack" />
>>
>>
>>Also, do the same to any associated DataAccessClass entry you have in your config file. NOTE: Make sure you do this both in your business object project's confg file as well as your UI project's config file.
>>
>>Best Regards,
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform