0

Since I've got a local copy of my database server, I would like to change the server IP address in hosts file and point it to the local database. Is there any way of doing this without having to amend any piece of code?

tereško
  • 58,060
  • 25
  • 98
  • 150
threesixnine
  • 1,733
  • 7
  • 30
  • 56

2 Answers2

2

Change the connection string in your web.config.debug file

You can change it using the xdt:Transforms Like this:

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
  <connectionStrings>
    <add name="name" connectionString="local connection string here" xdt:Transform="Replace" xdt:Locator="Match(name)" />
  </connectionStrings>
</configuration>
Richard Seal
  • 4,248
  • 14
  • 29
1

It depends on how you've coded the application. If you have created the connection string inside the application , they you would need to change code . Or if the settings are in a config file . editing the config file should be enough.

If you have changed the host entry , check if the IP itself is accessible and the specific port is open or not.

Also do you need to authenticate differently ? Posting the stack trace might be helpful.

m5c
  • 567
  • 8
  • 13