Reputation: 6186
I am designing an application in .net using MVC3. I am using Visual studio 2010 and i am using Sql Server for database. what connection string should i use in Web.Config file.?
Upvotes: 2
Views: 1288
Reputation: 16757
Here is a site with any connection string you want:
http://www.connectionstrings.com/
Basically, you should probably use something like this:
Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI;
This way you are using trusted security (not storing a SQL username and password in your config file). You will just need to make sure that the account that your application runs under has access to the database. Really, though, you should have a data access layer that has the permissions. I would recommend against direct data access from your front-end. If possible, maybe even WCF.
Upvotes: 3