Last post Jul 15, 2011 09:16 AM by ignatandrei
Jul 14, 2011 04:09 PM|sinharajnish1987|LINK
I'm working on a MVC web app. the database of this app has been moved to a different network server, how do I change the datasource of this web app? I am totally a novice with MVC and I've got no clue. Please help.
Jul 14, 2011 05:07 PM|ignatandrei|LINK
usually the server name/ip is in the web.config.
I am totally a novice with MVC and I've got no clue.
Jul 14, 2011 05:23 PM|a_shimoon|LINK
MVC applications, by default, have to associated datasource. MVC allows you to choose your own framework for the M (Model). I am assuming you are using entity framework for your models, in which case, the setting should be in your web.config.
Jul 14, 2011 05:47 PM|ignatandrei|LINK
when I read about "datasource" ( like in WebForms) and MVC ... for me it's an oximoron.
Please talk about "database connection"....
Jul 14, 2011 06:13 PM|Gaspard|LINK
If you are talking about Database Connection here there is a good example
Jul 14, 2011 09:35 PM|richwangler|LINK
Jul 15, 2011 08:24 AM|sinharajnish1987|LINK
my web.config has got the following connection string:
<add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"/>
<add name="SalesRepTrackerConnectionString" connectionString="Data Source=CMF000605\SQLEXPRESS;Initial Catalog=SalesRepTracker;Integrated Security=True" providerName="System.Data.SqlClient"/>
<add name="RepTrackerConnectionString" connectionString="Data Source=”servername”;Initial Catalog=RepTracker;Integrated Security=True" providerName="System.Data.SqlClient"/>
<add name="RepTrackerConnectionString1" connectionString="Data Source=”servername”;Initial Catalog=RepTracker;Persist Security Info=True;User ID=cmf_reptracker;Password=”password” " providerName="System.Data.SqlClient"/>
Now, I changed data source = "servername" to the server where data is stored, but it still wont work. is there anything else that I have to check or do ?
Jul 15, 2011 09:16 AM|ignatandrei|LINK
it still wont work. is there anything else that I have to check or do ?
check into the source if it uses the connection