March 5, 2018 at 9:22 am
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="data source=(LocalDB)\MSSQLLocalDB;attachdbfilename=|DataDirectory|CMS.mdf;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework"" 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.
March 5, 2018 at 10:46 am
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/
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply