以下代码是设置超时一天,供参考:
procedure THome.WebAppComponentsBeforeDispatch(Sender: TObject;
Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
var
I:Integer;
begin
for I:=0 to WebContext.Response.Cookies.Count-1 do
begin
if SameText(WebContext.Response.Cookies.Items.Name,'WebBrokerSessionID') then
begin
if WebContext.Response.Cookies.Items.Expires = -1 then
WebContext.Response.Cookies.Items.Expires:=IncDay(Date);
end;
end;
end;