1

I have a working SQL Server Express running in my computer as MYPC\SQLEXPRESS.

In my ASP.NET MVC 5 project I need to use this connection string in order to connect with it:

<add name="maymoneyDB" 
     connectionString="Server=MYPC\SQLEXPRESS;Initial Catalog=myDB;Integrated Security=True;MultipleActiveResultSets=True" 
     providerName="System.Data.SqlClient" />

The problem is that my coworkers have their SQL Server instances at . so I need to change the connection string each time I pull changes from TFS.

How can I change my server path? I try with link but seems to change @@SERVERNAME but not the path.

Any explanation about handle this situation is also helpful (maybe change the path is not the best approach).

Thanks

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
cesarluis
  • 897
  • 6
  • 14
  • You could remove and re-install SQL Server and install it as the **default** (unnamed) instance on your machine - after that, you'd be able to connect to it using `.` also – marc_s Sep 09 '15 at 16:16
  • possible duplicate of [Changing SQL Server named instance to default instance](http://stackoverflow.com/questions/7831137/changing-sql-server-named-instance-to-default-instance) – PashaPash Sep 09 '15 at 16:20
  • did you tried using `IP address` ?? – A_Sk Sep 09 '15 at 16:51
  • either you can connect your coworker DB or you have to change each time your connection instance in web config. another way don't take update of web.config from TFS – wiretext Sep 09 '15 at 17:51

0 Answers0