locked
Please couild someone check my Connection String RRS feed

  • Question

  • User968462096 posted

    Hi guys

    Connection Strings and publishing is something that I haven't yet quite got my head around with asp.net development.

    I've recently created a webpages project that needs database access.  The connection string I am using works and my application reads and writes as expected.

    I would appreciated if you could give this connection a quick look to see if it's correct and secure. Should my password be in this string?

    Data Source=123.123.123.123;Initial Catalog=MYDATABASENAME;Persist Security Info=True;User ID=MYUSER;Password=MYPASSWORD"

    My host is GoDaddy and it's using a shared MS SQL Server 2014. Are there any other GoDaddy users who have experience of GoDaddy connection strings.

    Thanks

    David

    Saturday, March 5, 2016 7:59 PM

Answers

  • User-821857111 posted

    If the application works, the connection string is correct. There are other variations that you could use but if you are connecting using SQL Server authentication (which that string does) you need to pass in the password for the login. You can encrypt the password if you want. Search for "encrypt connection string in web.config" for articles on how to do that.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, March 5, 2016 8:24 PM

All replies

  • User-821857111 posted

    If the application works, the connection string is correct. There are other variations that you could use but if you are connecting using SQL Server authentication (which that string does) you need to pass in the password for the login. You can encrypt the password if you want. Search for "encrypt connection string in web.config" for articles on how to do that.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, March 5, 2016 8:24 PM
  • User968462096 posted

    excellent news, thanks.

    Monday, March 7, 2016 9:33 AM