SmartFoxServer Silverlight API
GetRandomKey Method
NamespacesSmartFoxClientAPISmartFoxClientGetRandomKey()()()
Retrieve a random string key from the server.
This key is also referred in the SmartFoxServer documentation as the "secret key".
It's a unique key, valid for the current session only. It can be used to create a secure login system.
Declaration Syntax
C#Visual BasicVisual C++
public void GetRandomKey()
Public Sub GetRandomKey
public:
void GetRandomKey()
Remarks

Sends:
SFSEvent..::.OnRandomKeyDelegate

Version:
SmartFoxServer Pro

Examples
The following example shows how to handle the request a random key to the server.
CopyC#
SFSEvent.onRandomKey += OnRandomKey;

smartFox.GetRandomKey();

public void OnRandomKey(string key)
{
    Debug.WriteLine("Random key received from server: " + key)
}
See Also

Assembly: SmartFoxClientAPI_Silverlight (Module: SmartFoxClientAPI_Silverlight) Version: 1.0.0.0 (1.0.0.0)