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:
01326518
Views:
16
Linda,

Your database key needs to match what you have in you app.config file. Do you have a line that has a key for 'LCCTrack'

e.g.
<databases>
    <add key ="LCCTrack\Connection" value="Data Source=DEVSERVER;Initial Catalog=LCCTrack;Integrated Security=True" />
    <add key="LCCTrack\DataAccessClass" value="DataAccessSql" />
</databases>
>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.
>
>I can't think of anything else to do.
>
>Suggestions?
>
>Thanks in advance.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform