SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Converting a connection string for the live environment


Converting a connection string for the live environment

Author
Message
john 84054
john 84054
Forum Newbie
Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)

Group: General Forum Members
Points: 6 Visits: 6
Apologies up front for my lack of SQL knowledge.

I have a database in the app_data folder of my Asp.Net web application.

The database contains simple page meta data for the application.

I have a few questions.

First, here's my connection string from my development machine. It uses Visual Studios built in SQL - I'm guessing some variant of SQL Server Express.
This needs to be transformed so that it works on the live server, however the live server runs SQL Server 2014 Web Edition - what do I need to change, assuming it will still reside in the app_data folder?

<add name="CMSEntities" connectionString="metadata=res://*/CmsModel.csdl|res://*/CmsModel.ssdl|res://*/CmsModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=(LocalDB)\MSSQLLocalDB;attachdbfilename=|DataDirectory|CMS.mdf;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />

Secondly are there any other changes that should be made to the string with regards to security etc?

Lastly, is it bad practice to use the app_data folder in the first place?

Thanks in advance.
Chris Harshman
Chris Harshman
SSC-Dedicated
SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)

Group: General Forum Members
Points: 36292 Visits: 6947
This is LocalDB, not exactly SQL Server Express. If it was Express the connection string would look similar to what your production one needs to be. LocalDB works more like a desktop file based DB, more like MS-Access than SQL Server. For production purposes, your connection string will look very different.
Take a look at this site that shows you various methods of writing your connection strings depending on what connection library you are using:
https://www.connectionstrings.com/sql-server/
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum








































































































































































SQLServerCentral


Search