|
3.2.7 - Enable Permission |
Top Previous Next |
|
Overview
SpeedCheck Java Applet checks the permission page (parameter: permission_url) everytime the user clicks the "start" button. The server-side script returns a flag (1 or 0) as plain text and tells SpeedCheck to start/stop functioning.
Usage example: we can query the raw data from database and tell SpeedCheck to stop working if an unique address has reached the daily transfer limit. In our sample application, we limit each user to have maximum 5 MB of transfer. If a user exceeds that limit, they will get an error message.
By default, this feature is turned OFF. It is optional for you to use this functionary.
Prerequisites
It is necessary to have statistics feature running sucessfully before reading this section.
Installation
Permission by default is disabled. To enable it, edit Web.Config and change the following:
<add key="SC_Permission_Enabled" value="False" />
change to:
<add key="SC_Permission_Enabled" value="True" />
Again, you need to have make sure you have the right username/password to access the database. See statistics section for database configuration.
Technical Details
SpeedCheck_permission.aspx returns 2 lines and SpeedCheck Java Applet reads the 2 lines to determine Applet working status.
Line 1: permission flag to run SpeedCheck: 1=allow, 0=not allow Line 2: Error message to be displayed if not allowed (0) is set
If you VIEW SOURCE in Internet Explorer, you will see the HTML returned as the following:
Example
If you have enabled permission and you have exceeded the limit (the default limit is set to 5 MB, you can change it in the script), you should see the following message:
|