Is there a way in theory to read an IIS application variable from outside
of the IIS process?

Specifically, I need to store data in an application variable, and then
poll that variable at an interval to retrieve the data and transfer it to a
database.

My plan would be to write a VBScript routine to poll the app var, and then
schedule it using scheduled tasks, although creating a service to
accomplish the task would probably be a better idea.

I'm open to any suggestions, and am competent in vb, vbscript, javascript,
and perl. Something tells me I'm going to need C++ for an effective
solution, but I hope I'm wrong...(I want to learn it, but don't have time!)

TIA,

Ziggy

Re: Read application variable from outside of IIS by Tom

Tom
Tue Jan 13 09:37:09 CST 2004

"Ziggy" <harvested@sitetamer.com> wrote in message
news:c5e76bb5103594c7d53d7e3b8afb0e75@news.teranews.com...
> Is there a way in theory to read an IIS application variable from outside
> of the IIS process?
>
> Specifically, I need to store data in an application variable, and then
> poll that variable at an interval to retrieve the data and transfer it to
a
> database.
>
> My plan would be to write a VBScript routine to poll the app var, and then
> schedule it using scheduled tasks, although creating a service to
> accomplish the task would probably be a better idea.
>
> I'm open to any suggestions, and am competent in vb, vbscript, javascript,
> and perl. Something tells me I'm going to need C++ for an effective
> solution, but I hope I'm wrong...(I want to learn it, but don't have
time!)

What you're suggesting doesn't make much sense as your VBScript routine is
out of scope/context of an ASP application var. Why not store the data in a
text file or a database table instead ... ?

--
Tom Kaminski IIS MVP
http://www.iistoolshed.com/ - tools, scripts, and utilities for running IIS
http://mvp.support.microsoft.com/
http://www.microsoft.com/windowsserver2003/community/centers/iis/




Re: Read application variable from outside of IIS by Ziggy

Ziggy
Tue Jan 13 09:55:53 CST 2004

"Tom Kaminski [MVP]" <tomk (A@T) mvps (D.O.T) org> wrote in
news:bu132c$qp89@kcweb01.netnews.att.com:


> What you're suggesting doesn't make much sense as your VBScript
> routine is out of scope/context of an ASP application var. Why not
> store the data in a text file or a database table instead ... ?
>

Ideally that is what I would do, but we're talking about a pretty active
website. It's an online training system for mortgage continuing
education, and is licensed by about 20 states. We have to track time in
courses for each student. At any given moment, we may have 300 - 500
students logged in taking courses. So, logging precise times to the
database would require as many as 500 trips to the database per minute.
(or to a text file).

The approach I'm thinking of taking would be to store the timestamps in a
dictionary, which is stored in a single application variable, and then
retrieve the all of the data from the application variable every so
often.

One way to do this would be to run a single asp page that contains the
routines for updating the database, and use a simple refresh at a
specified interval to fire the script. But there are too many
opportunities for error in that scenario (someone accidentally closing
the browser, or an unmonitored browser hanging). Which is why I'd like to
run another process outside of IIS that has the ability to "look in" and
interact.

I don't know if it can be done, but I'm thinking, "Hey, this is a
Microsoft product. There's bound to be a bug^h^h^hfeature somewhere that
will allow me to do this." ;-) (btw...I do love Microsoft ... just
couldn't resist the jab)

Ziggy