locked
connection string mvc 5 entity framework 6 RRS feed

  • Question

  • What is the connection string for mvc 5 entity framework 6 with userid and password for the web.config to connect to local sql server database?
    • Edited by SashaStacyL Sunday, February 21, 2016 10:08 PM
    Sunday, February 21, 2016 10:04 PM

Answers

  • Hi SashaStacyL,

    Thanks for your post.

    Please try this:

    <add name="ConnectionStringName"
        providerName="System.Data.SqlClient"
        connectionString="Data Source=ServerName;Initial Catalog=DatabaseName;Integrated Security=False;User Id=userid;Password=password;MultipleActiveResultSets=True" />


    For the detailed information about "SQL Server Connection Strings for ASP.NET Web Applications", please take a look at the following document.

    https://msdn.microsoft.com/en-us/library/jj653752%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396

    Best Regards,

    Lake Xiao

    • Proposed as answer by lake Xiao Tuesday, February 23, 2016 2:21 AM
    • Marked as answer by lake Xiao Monday, February 29, 2016 3:52 AM
    Monday, February 22, 2016 7:06 AM