Ideas for setting variables across servers?

08-06-2002, 10:25 AM
Okay, not sure how to accomplish what I need. Basically, I have 2 servers - A and B and a workstation C.

(1) Server B must fill out a setup form (an ASP page sitting on A)
(2) Server B then has an ID associated with it telling us which city it is in
(3) Workstation C then must fill out a setup form (an ASP page sitting on B) - heres the catch, it needs to know the ID from B. How?

I tried using Application variables but since setup1 and setup2 are sitting on seperate servers that didn't work. I tried setting a cookie on Server B in the setup1 form, then grabbing that cookie and putting it into an application variable for setup2 to use - nope. I need to figure out how to set a variable on the "client" and then turn around and use that machine as the "server" and still have access to that variable. I attempted creating even a txt file for just the ID but I keep getting "Access Denied" when using CreateTextFile (Microsoft says you have to modify your metabase to get it to work with an ASP page and that means nothing to me).

Any ideas on other type of variables which exist that would do what I need?


08-06-2002, 10:38 AM
I must say, this is a unique problem.

The reason you can not use server B to extract the cookie set by server A is because the cookie itself is associated directly with the parent server. So, basically, you are telling server B to look for a cookie that does not exist.

08-06-2002, 11:13 AM
Yeah, I knew that was going to happen but I had to try anyways. I'm thinking the only way is to make sure a txt file already exists (either by manually creating it on each Server B or download it when I download setup2 onto Server B from Server A) and just write to that. It seems a little messy to do it that way so if anyone has a better way then still feel free to let me know!!!


08-06-2002, 09:50 PM
When the user submits the form, you could process it and then, at the very end, encode the ID into an url and then redirect them to a page on the other server. Each time that page is executed, it would store the ID value into the database.

08-07-2002, 07:01 AM
If I understand you correctly then both ASP pages (setup 1 and setup 2) would have to be run from the same client in order to make a redirect work. Here's my actual process:

(1) Server B (onsite) contacts Server A (here in the office) and says "I'm here in city 123 and ready to go"
(2) Server A says - "great! I received your stats (such as IP, computer name, etc) and they match so here's your ID, and all the files you will need for the duration of the event" (FTPs setup2 to Server B's inetpub\wwwroot) - Server A is out of the picture then
(3) Server B is then networked with many workstations (who cannot see outside internet)
(4) Each workstation runs setup2 off Server B, which takes the ID that Server B was assigned, and couples it with the brand that workstation is representing at that show to make a unique cookie which is required by GM to later identify which brand/show combo gave which leads.

Does that make any sense? It's a little more complex then that but that is the core idea. I need the workstations to know the ID given to Server B using strictly ASP/VBScript (no changing computer name, etc, to reflect ID)


08-07-2002, 07:40 AM
I think I am following what you are saying, and I wonder if it is
possible for you to include a small database on any ServerB that
can store the ID. Of course, getting write access to the database
might end up being as difficult as just writing out a textfile, but
databases in general seem more workable with web servers.

08-07-2002, 07:45 AM
Yeah - I did think of putting a small Access database but having a database for 1 record/field seemed like overkill. I ended up just making autoshow.txt a blank textfile on Server A and making it one of the files FTP'd to Server B during setup1. As long as the file exists on Server B I can write to it. It's the CreateTextFile function that errors out. So for now its working. It just seemed like there should be some global variables that exist that I don't know about which would make the process more efficient.


EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum