R
Riaan
Hi guys!
I have an issue that needs urgent resolution. Imagine this scenario:
You have:
1 production server running Windows Server 2003, IIS6 and an instance
of MSDE 2000.
There is an asp.net app (written in C#) running which has the only
purpose of rendering a page with a "Next" button on it and some status
info. When the user clicks the next button, an event is written to the
database and the status info is updated and returned. The page thus
reloads showing the new status info.
There are twenty remote workstations, each with a touch-screen and
running a custom application (written in Delphi 7.0), which has an
imbedded web browser on the main form. The web browser connects to the
ASP application and renders the page.
The reason the web browser is imbedded in another app is simply because
the application interface exposes other functionality which has been
developed before. The web browser is just an add-in. The additional
advantage is that the Delphi application can load a client-side config
file which identifies the station:
Each workstation has a unique integer ID (1 - 20), which gets added
onto the URL for the TWebBrowser's Navigate() method, for example:
var url : string;
..
..
url := '\\server\asp_app?stationid=' + IntToStr(stationID);
WebBrowser1.Navigate(url);
The asp.net app reads the station id from the request to start the
session, this ID is linked to each database record as described above.
My problem is that I need a way to pass along the station ID every time
the user clicks the next button in the browser. I can use the Session[]
keys to store the station ID, but the moment the session expires, this
information is lost. The stationID only gets passed along in the
initial Delphi app TWebBrowser page request, subsequent clicks on the
next button have nothing to do with the delphi app, the web browser
works in isolation.
Increasing the session timeout is not a solution, as a day or more may
go by between next button clicks. I need a way for the session to
expire naturally, but when the user clicks the next button, the session
is reopened (or a new one created, passing back the station id) without
having to rely on the delphi app to monitor what is happening to the
session.
Fundamentally, what is required is for the web page itself to remember
the station ID, and pass it back to the web server. So the web server
must somehow add the station info to the page, and when the button is
clicked, the page is resubmitted, and the web server app somehow reads
the remembered info.
How do I do this? I assume that the button itself will have to be
runat="client", with some imbedded Jscript to re-initialise the
request?
And the remembered station id? Do I need a hidden field to store it?
Any advice would be very much appreciated! Thank you in advance!
Regards,
Riaan
I have an issue that needs urgent resolution. Imagine this scenario:
You have:
1 production server running Windows Server 2003, IIS6 and an instance
of MSDE 2000.
There is an asp.net app (written in C#) running which has the only
purpose of rendering a page with a "Next" button on it and some status
info. When the user clicks the next button, an event is written to the
database and the status info is updated and returned. The page thus
reloads showing the new status info.
There are twenty remote workstations, each with a touch-screen and
running a custom application (written in Delphi 7.0), which has an
imbedded web browser on the main form. The web browser connects to the
ASP application and renders the page.
The reason the web browser is imbedded in another app is simply because
the application interface exposes other functionality which has been
developed before. The web browser is just an add-in. The additional
advantage is that the Delphi application can load a client-side config
file which identifies the station:
Each workstation has a unique integer ID (1 - 20), which gets added
onto the URL for the TWebBrowser's Navigate() method, for example:
var url : string;
..
..
url := '\\server\asp_app?stationid=' + IntToStr(stationID);
WebBrowser1.Navigate(url);
The asp.net app reads the station id from the request to start the
session, this ID is linked to each database record as described above.
My problem is that I need a way to pass along the station ID every time
the user clicks the next button in the browser. I can use the Session[]
keys to store the station ID, but the moment the session expires, this
information is lost. The stationID only gets passed along in the
initial Delphi app TWebBrowser page request, subsequent clicks on the
next button have nothing to do with the delphi app, the web browser
works in isolation.
Increasing the session timeout is not a solution, as a day or more may
go by between next button clicks. I need a way for the session to
expire naturally, but when the user clicks the next button, the session
is reopened (or a new one created, passing back the station id) without
having to rely on the delphi app to monitor what is happening to the
session.
Fundamentally, what is required is for the web page itself to remember
the station ID, and pass it back to the web server. So the web server
must somehow add the station info to the page, and when the button is
clicked, the page is resubmitted, and the web server app somehow reads
the remembered info.
How do I do this? I assume that the button itself will have to be
runat="client", with some imbedded Jscript to re-initialise the
request?
And the remembered station id? Do I need a hidden field to store it?
Any advice would be very much appreciated! Thank you in advance!
Regards,
Riaan