Connection String for ASP MVC app - Help

Discussion in 'Databases' started by Oldbie, Jun 30, 2010.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hello,
    I have an ASP.net MVC app and am trying to work out what I need to add to my connection string to connect it to my db.

    The connection string provided by DiscountASP account is
    "Data Source=tcp:esql2k802.discountasp.net;Initial Catalog=SQL2008_744874_lotusnukes;User ID=SQL2008_744874_lotusnukes_user;Password=******;"

    and within my Web.config I have the following:
    <connectionStrings>
    <add name="ApplicationServices" connectionString="Data Source=tcp:esql2k802.discountasp.net;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|SQL2008_744874_lotusnukes.mdf;User Instance=true" providerName="System.Data.SqlClient"/>
    <add name="LotusNukesConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\SQL2008_744874_lotusnukes.mdf;Initial Catalog=SQL2008_744874_lotusnukes;User ID=SQL2008_744874_lotusnukes_user;Password=*****;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/>
    </connectionStrings>

    Can anyone point me in the right direction on what the ConnectionString should be please? I am new to web development.

    Many thanks.
     
  2. Solved

    I managed to solve the issue. Typo in the connection string. doh!
    Can't see an option to delete the post as I am so embarassed!
    Lucky no one replied! lol
     
  3. mjp

    mjp

    Thanks for following up.

    No need to delete! Everyone makes that mistake a few hundred times during their lives. ;) And maybe someone will find this and it will remind them to check for typos.
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page