Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IP address cached?

Status
Not open for further replies.

kaijanm

Programmer
May 14, 2003
102
US
Hello all, I have searched the forum for this, but so far haven't found anything. I have a c# desktop application that I've written which connects to a SQL Server express database. I did the development on my laptop and had the database installed locally. Then I migrated the database to a remote machine and configured the machine and got it working on my home network. The database machine was dynamically assigned an IP address of 10.0.0.11. If I try to set the IP address (haven't tried to set it to that address, but to others), the application won't connect. The connection string contains the IP address, which I update to the IP address of the server. The only time the app works is when that server has the address of 10.0.0.11. If not, the app won't even work locally. After playing with the server for a long time, I finally put a port sniffer on the computers. The app always tries to connect to 10.0.0.11 (even when SQL server services are not running). This explains why I can no longer run the app locally on my development laptop. The address 10.0.0.11 is no where in the code that I can find. Is it possible that it's somehow cached somewhere or something? Anyone else have any experience with something like this? Thanks in advance!

Kimberly
 
Kimberly,

Are you changing the connection string in your config file or have you hard coded it somewhere?

If it's in your config file (Settings.Settings) then make sure it is set to "Application" and not "User" as a setting.

The user settings are stored in a separate config file somewhere under the Documents and Settings folder (XP) or Users folder (Vista)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top