INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Classic ASP: Remote Scripting problem

Classic ASP: Remote Scripting problem

(OP)
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: http://<company-name>/default.asp 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

RE: Classic ASP: Remote Scripting problem

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 

RE: Classic ASP: Remote Scripting problem

(OP)
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

RE: Classic ASP: Remote Scripting problem

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

RE: Classic ASP: Remote Scripting problem

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.

&quot;Nothing is impossible until proven otherwise&quot;

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close