0

I have an ASP.NET 2 (very old) web app that I am trying to migrate to a new server. BTW, I am a complete ASP.NET noob but have a good amount experience with other web technologies.

In the web.config, I can see the following connection string XML:

<connectionStrings>
    <add name="myCon" 
         connectionString="Data Source=DEVELOP\DEV_SQL2008R2;Initial Catalog=QO2_New;Persist Security Info=True;User ID=sa;Password=q"/>
</connectionStrings>

I did "nslookup" on the machine name 'DEVELOP' and RDP into the server. To my surprise, I don't see any SQL Server process running. Also, there is no SQL Server installed on that server. I am 100% that the app is running and I am very confident that there are content that comes from the database. I also did a search on the code base and it seems like the connection string is being used.

On a side note, we do have some other databases on separate machines. My questions are the following:

  1. Can the machine DEVELOP somehow redirect the DB connection to somewhere else? If yes, how do I find out which IP is it being redirected at?
  2. If DB connection cannot be redirected, then what is going here exactly?

Unfortunately, I have very little people whom I can ask what is going with this app. Any tips that you can share is much appreciated.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Yao Hong Kok
  • 165
  • 2
  • 12
  • https://www.wireshark.org/ – OrElse Aug 15 '17 at 22:06
  • Yup. Did that. Did not find anything too useful. – Yao Hong Kok Aug 15 '17 at 22:14
  • How did you determine that no SQL Server process was running on `DEVELOP` ?? The connection string uses a **named instance** (`DEV_SQL2008R2`) of SQL Server which might not be the same as the standard, default (unnamed) instance .... – marc_s Aug 16 '17 at 05:01

2 Answers2

0

Nslookup uses DNS but there is a chance your machine has a hosts file entry that points DEVELOP to somewhere else..

However, if you RDP'ed into DEVELOP (as in, used that name when connecting RDP, not the ip address given by nslookup) then you should have been able to see a sqlserver install in the list of services.

If there is surely no sqlserver installed there then, from within your RDP session, use TCPView from sysinternals to see what process is listening on port 1433. Could be some kind of TCP redirector like PortTunnel from SteelBytes, bouncing the connection somewhere else. Remember to run tcpview on the server, not your local machine

Perhaps you can try getting connected to the sqlserver using management studio, using the credentials in the web config, you can get sqlserver itself to tell you more about where it is running, such as:

SQL - Query to get server's IP address

Using Environment variables in T-SQL

Caius Jard
  • 72,509
  • 5
  • 49
  • 80
  • thanks for the info. I have given that a try. But, I definitely don't see anything related to SQL on that server. I have some new clues as to what is happening. I am going to test that out. Will update this question soon. – Yao Hong Kok Aug 16 '17 at 19:46
0

I am truly ashamed to inform everyone that the database in the web config was never being used. Therefore, even though it is pointing to a non-existing database, it still works. The data from the old database have been converted to static files.

I should have checked this the first thing I came across it. Thanks again for all the help.

Yao Hong Kok
  • 165
  • 2
  • 12