A
antic_ant
Unregistered / Unconfirmed
GUEST, unregistred user!
1(50).intraweb网面打开后,长时间不操作(大概10分钟左右),再操作就会提示
My Intraweb Application Error
Session not found. Session may have expired.
2(150)我用intraweb做了个登录的功能,别人在一台机器上以A用户登录后,我把他的登录信息
记录下来,我再以B用户登录,以后A用户的操作,都记录到B用户的头上了。保存用户信息
的结构如下
type
TCurUserRec = record
UserID: string;
UserName: string;
IP: string;
end;
ServerController单元文件内容如下,是否需要修改,如何改
unit ServerController;
{PUBDIST}
interface
uses
SysUtils, Classes, IWServerControllerBase,
IWApplication, IWAppForm;
type
TIWServerController = class(TIWServerControllerBase)
procedure IWServerControllerBaseNewSession(ASession: TIWApplication;
var VMainForm: TIWAppForm);
private
public
end;
TUserSession = class
public
end;
function UserSession: TUserSession;
implementation
{$R *.dfm}
uses
IWInit;
function UserSession: TUserSession;
begin
Result := TUserSession(RWebApplication.Data);
end;
procedure TIWServerController.IWServerControllerBaseNewSession(
ASession: TIWApplication; var VMainForm: TIWAppForm);
begin
ASession.Data := TUserSession.Create;
end;
end.
My Intraweb Application Error
Session not found. Session may have expired.
2(150)我用intraweb做了个登录的功能,别人在一台机器上以A用户登录后,我把他的登录信息
记录下来,我再以B用户登录,以后A用户的操作,都记录到B用户的头上了。保存用户信息
的结构如下
type
TCurUserRec = record
UserID: string;
UserName: string;
IP: string;
end;
ServerController单元文件内容如下,是否需要修改,如何改
unit ServerController;
{PUBDIST}
interface
uses
SysUtils, Classes, IWServerControllerBase,
IWApplication, IWAppForm;
type
TIWServerController = class(TIWServerControllerBase)
procedure IWServerControllerBaseNewSession(ASession: TIWApplication;
var VMainForm: TIWAppForm);
private
public
end;
TUserSession = class
public
end;
function UserSession: TUserSession;
implementation
{$R *.dfm}
uses
IWInit;
function UserSession: TUserSession;
begin
Result := TUserSession(RWebApplication.Data);
end;
procedure TIWServerController.IWServerControllerBaseNewSession(
ASession: TIWApplication; var VMainForm: TIWAppForm);
begin
ASession.Data := TUserSession.Create;
end;
end.