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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Classic ASP: Remote Scripting problem

Status
Not open for further replies.

JScannell

Programmer
Jan 9, 2001
306
0
0
US
This is a very odd problem. I have a small 4 workstation intranet running Classic ASP, IIS (version 5.5 I think), running on a Windows Server 2000 platform. The web app is accessible from all of the workstations. However, a problem has recently surfaced that I can't figure out. I am using remote scripting (the old original method with rs.asp, rs.asm, server.asp) to perform client-driven database queries. It has been working flawlessly for close to 10 years. All of a sudden the remote queries only work from a browser session on the server. My client swears that he hasn't done anything in the way of software installations from the outside to cause this problem.

I need a way to diagnose the problem so I can come up with a solution. Here is some things that I do know and some things I've tried:

1. Last fall they had a power failure that lasted about a minute.
2. When they turned everything back on (web server first followed by workstations after) the site couldn't be reached by any of the workstations.
3. The original URL was ip-based and after the power failure that IP was no longer valid. When I tried pinging the IP address from any of the workstations I got timeouts.
4. The server is a shared device with the name <company-name>.
5. So I tried connecting to the website by: and it worked.
6. I then edited everyone's desktop shortcut to reflect that change.
7. I tested everything (including the remote scripting if I remember correctly) and it seemed to be working.
8. The program's structure is:
- General javascript file called "database.js" that has the calls to SQL commands found in my "server.asp"
- The database is connected via an ODBC connection on the web server.
8. As a test I placed a few "alert();" statements in the database.js and monitored the results from both a workstation and the server PC and everything seems to be the same except when it comes to calling the functions in server.asp and viewing the results. I can't seem to modify server.asp (javascript based) with 'alert()', etc. So all I can do is provide an alert() immediately after the calls from within the database.js.

I have several intranet and internet applications elsewhere that use classic ASP and remote scripting based completely on this company's code and I have never had this problem before except for the handling syntatically incorrect SQL queries which also return an empty string.

I need some advice on how to troubleshoot this problem. Somebody suggested looking at the server logs but I have no experience with that and don't know where to begin. If I knew where to concentrate my efforts I might be able to figure out what's going on.

One of the first things, how do I add debugging statements to my server.asp module so I can monitor the progress of the server side function calls from the very start?

I don't have the code with me here at work, but I could make it available to anyone who would like to look at it...

Thanks in advance,

Jerry Scannell
 
For debugging / logging, I use the FileSystem object. For example:

Code:
Sub AddToLog(strLine)
   Dim fso, f, ForReading, ForWriting, ForAppending
   ForReading = 1 : ForWriting = 2 : ForAppending = 8
   Set fso = CreateObject("Scripting.FileSystemObject")
   Set f = fso.OpenTextFile("d:\serverlogs\log.txt", ForAppending, True)
   f.WriteLine strLine
   f.Close
End Sub
 
Thanks. I will add that to my code.

Do you have any clues as to what my problem might be?

Thanks in advance,

Jerry Scannell
 
Not really, and I'm unfamiliar with "Remote Scripting". But, it really doesn't make sense that references to the server by IP stopped working after a reboot (unless the server was assigned a new IP somehow). So, some of the website works from the workstations (if referenced by server name, not by IP), but "remote queries" do not? I would try to isolate the exact commands that are failing (if you havent done so already) with logging, and then maybe the solution will be clearer. I would also check the server's event log, see if any funky error messages started after the power failure
 
Hmmm, so the server crashed and IP shortcuts failed.
Try finding the old IP address of the server, if you still know it, by searching all the scripts on your site. It would not be the first time someone had referred to a fixed IP address. If you find any entries rename them to the new IP address, or better still use the alias.

Anthony.

[sub]&quot;Nothing is impossible until proven otherwise&quot;[/sub]​
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top