Connection String for ASP MVC app - Help

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

Thread Status:
Not open for further replies.
  1. Hello,
    I have an 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;Initial Catalog=SQL2008_744874_lotusnukes;User ID=SQL2008_744874_lotusnukes_user;Password=******;"

    and within my Web.config I have the following:
    <add name="ApplicationServices" connectionString="Data;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"/>

    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 DiscountASP.NET Staff

    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:
Not open for further replies.

Share This Page