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

Display ASP data on the webserver monitor that is hosting the ASP

Status
Not open for further replies.

jbs

Programmer
Feb 19, 2000
121
US
I'm sure this is possible but I just can't find anything in the many reference manuals that will show me how to have a variable that was entered by an internet user automatically displayed on a window on the monitor of the web server that is serving as the host.<br><br>Since the ASP code is running on the server I sort of thought this would be easy..but I can't find anything that is clearly showing me how to do this..<br><br>After a few days of thinking about it I started thinking that I need somehow to pass the data to a separate VBASIC file that is resident on the webserver.&nbsp;&nbsp;But my gut tells me that there must be away to activate a window on the server and display data on the window since the ASP code is running on the webserver.<br><br>Storing the variables from the internet user in a file and then having a separate program look for data in the file won't work in this situation.&nbsp;&nbsp;I can't have the data stored on a webserver file, but rather it must be displayed on the monitor for a certain small period of time.<br><br>Again, given the ASP code is running on the webserver...this is probably simple.<br><br>Can anyone help?
 
problem though is that so many ASP may be running sychronously, may I sugest you create an ActiveX for this purpose, it may help update the window, and help control the instances being called. Also the ASP code may be running on the server, but even a single page may have about 10 instances running at once, and if you really wanted to, you could just have the ASP use FileSystemObject and write to a file on disk, and have your monitor page or program read from the file everytime you refresh. <p>Karl<br><a href=mailto:kb244@kb244.com>kb244@kb244.com</a><br><a href= </a><br>Experienced in : C++(both VC++ and Borland),VB1(dos) thru VB6, Delphi 3 pro, HTML, Visual InterDev 6(ASP(WebProgramming/Vbscript)<br>
 
I'd like to experiment a little bit.&nbsp;&nbsp;Can you tell me the ASP command(s) need to create a window on the web server and how do I display a variable in that window?<br><br>I should also add that I'm new to ASP.&nbsp;&nbsp;I've done some real basic stuff....but nothing complicated.<br><br>thanks,<br><br>Jerry
 
if you belive that creating a window is going to solve your problem, you're in for alot, keep in mind, a single ASP page, does not mean you will have a single execution at a time, try throwing in MsgBox(&quot;YO&quot;, vbokonly)... , on a public scale you may see 10 message boxes at a time, which is why I recomended appending to a single file, and having a seperate program read the file&nbsp;&nbsp;by refreshing. May I ask why you would need to do such? <p>Karl<br><a href=mailto:kb244@kb244.com>kb244@kb244.com</a><br><a href= </a><br>Experienced in : C++(both VC++ and Borland),VB1(dos) thru VB6, Delphi 3 pro, HTML, Visual InterDev 6(ASP(WebProgramming/Vbscript)<br>
 
I agree that in a multi-user environment the server will end up with massive msg boxes popping up on it's monitor. However, for the fun of it I tried to make a msg box pop up on the server from an asp because I may want that capability at some point in the future.&nbsp;&nbsp;So, for the fun of it I stuck the following code into the asp.<br><br>&lt;%<br>MsgBox &quot;this is a test&quot;, vbokonly<br>%&gt;<br><br><br>I was expecting from the above code for a MsgBox to popup on the webservers screen....but instead I got the following error msg:<br><br>Microsoft VBScript runtime error '800a0046'.&nbsp;&nbsp;Permission denied: 'MsgBox'&nbsp;&nbsp;/process.asp, line 28<br><br>I looked on my IIS configuration but can't seem to figure out which (if any) box I need to check in order to let users execute a MsgBox on the Server.&nbsp;&nbsp;Can u provide some advice.<br><br>Also, instead of a MsgBox, is their a way to have a &quot;window&quot; pop up that is blank except for the data inside the window? <br><br>Jerry<br>
 
ASP is more oriented to formating data and processing data requested by the user viewing the ASP, it is not exactly something that interacts with the Admin, it wouldnt make sense to have a message box, mainly because if a user causes a msgbox to popup, their page is never returned because the Script is waiting for someone to press ok on the message box, which brings me back to the ActiveX option, I feel either writing to a file, or using an ActiveX is about the best way to go. <p>Karl<br><a href=mailto:kb244@kb244.com>kb244@kb244.com</a><br><a href= </a><br>Experienced in : C++(both VC++ and Borland),VB1(dos) thru VB6, Delphi 3 pro, HTML, Visual InterDev 6(ASP(WebProgramming/Vbscript)<br>
 
I agree.&nbsp;&nbsp;Completely.&nbsp;&nbsp;My friend is concerned about kids using the internet to try and hack in and gain access to files store on his webserver.&nbsp;&nbsp;I've explained how easy it would be to just grab data via asp and store it in a view and then have a background task that constant looks for data and then does whatever he wants with the data after it exists in a file.&nbsp;&nbsp;<br><br>I also understand about the problem with the 'ok' button on the MsgBox that pops-up on the server...although I hadn't thought about it until I read your note.<br><br>Thanks again....<br><br>Jerry
 
basically all ASP are processed when requested, so none of the ASP code is sent to the client, best thing to do, is not to store sentative Files on the server, somehwere outside of the but still accessible to the ASP. It wouldnt be easy to find a file listing on IIS (depending on how you set it up) but they still could grab any file if they know the file name (they couldnt get ASP code, even through FTP because IIS would process the script before returning the HTML) <p>Karl<br><a href=mailto:kb244@kb244.com>kb244@kb244.com</a><br><a href= </a><br>Experienced in : C++(both VC++ and Borland),VB1(dos) thru VB6, Delphi 3 pro, HTML, Visual InterDev 6(ASP(WebProgramming/Vbscript)<br>
 
you could try to create a another management type page accessible only by you and use asp to send you the information. you could also use this to monitor the number of hits and any other info you might want.

another possibilty is to use the download default behaivior of IE 5 and download a text file into your browser, again a management page kind of idea, with your requested info. But only text files will work this way. See Windows Web Scripting Developer's Guide by Dan Heflin & Todd Ney ISDN
0072122803

good luck

Bastien
 
Another way of approaching it might be to create a separate ASP page that displays a value from an Application variable, and refreshes itself at whatever interval you deem necessary. Open a browser window on the server with this page open.
Then in your client-side script, whenever your event occurs (which you want to show on the server console) write it to that Application variable.
Something like this:

Application(&quot;MyVariable&quot;) = Application(&quot;MyVariable&quot;) & &quot;my special event just occured &quot; & Now() & &quot;<BR>&quot;

Your server window will then just grow as each new event is written to the variable. Ultimately you will need to check the length of the variable and clear it if it gets too big or you'll be in for a whole new batch of troubles, but it would do what you are proposing.

A. W.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top