Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can't connect to SQL 2008R2
Message
De
21/06/2010 14:29:18
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, États-Unis
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Titre:
Can't connect to SQL 2008R2
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Divers
Thread ID:
01469983
Message ID:
01469983
Vues:
81
Hi All

I have just installed the developer version of msSql2008R2. I can't seem to get VS2010 to connect using asp.net. I can add a connection using the server explorer. It seems that the problem is with the web.config connection string but I can't seem to get it working. This is what worked using sqlexpress.
    <add name="LocalSqlServer" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" 
         providerName="System.Data.SqlClient" />
  </connectionStrings>
This is the closest I have come to making it work with sqlserver except it won't recognize the trusted user.
    <add name="ApplicationServices"
         connectionString="data source=JIM3\MSSQL2008R2;Database=aspnetdb.mdf; Trusted_Connection=True"
        providerName="System.Data.SqlClient" />
Thanks.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform