Jump to content

How to set SessionRestrict


mierlp

Recommended Posts

Hi,

 

I load some values for the serverModule from a .ini file...so also SesstionRestrict with this code (nothing fancy)

 

UniServerModule.ServerLimits.SessionRestrict:=Inifile.ReadString('SERVER', 
'SessionRestrict', 'srNone');
 

i got the following compile error:

 

[DCC Error] MainModule.pas(91): E2010 Incompatible types: 'TUniSessionRestrict' and 'string'

 

Also when i first assign the value to a variabel (let's say for the example TEST) i got the same error :

 

UniServerModule.ServerLimits.SessionRestrict:=TEST;
 

 

What type is the SessionRestrict value (not a string and integer) ?

 

Regards Peter

Link to comment
Share on other sites

Noby any suggestion....?

 

When i assign it by code like below in the UniGUIServerModuleBeforeInit it works..but i

 

 

UniServerModule.ServerLimits.SessionRestrict:=srOnePerIP;
 

 

When using it as a variabel it' doesn't work...and all other server settings which i assign by variable

are working...the settings are readed from a config.ini.

 

Settings which i change and working are :

 

  UniServerModule.Port
  UniServerModule.AllowMultiIP 
  UniServerModule.LoadingMessage 
  UniServerModule.ServerLimits.MaxConnections
  UniServerModule.ServerLimits.MaxSessions 
  UniServerModule.ServerLimits.SessionRestrict
  UniServerModule.ServerMessages.InvalidSessionMessage
  UniServerModule.ServerMessages.TerminateMessage
  UniServerModule.SessionTimeOut 
  UniServerModule.Title 
  UniServerModule.UnavailableErrMsg
 

 

regards Peter

Link to comment
Share on other sites

  • 6 months later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...