Add-on for Internet Explorer - installers for web sites
This NuGet package is primarily intended for use as a dependency of our other packages that provide ASP.NET Server Controls. The package is separate so that we don't tie the release of updates to the Server Control packages to the ScriptX binaries. The package will be updated with each release of ScriptX.
The package also provides an alternative and convenient method to obtaining the latest Resource Kit.
The package installs the following:
- Client PC installer packages smsx.cab and ScriptX.msi
- .NET Class library MeadCo.ScriptX.ScriptXConfigHandler to provide a custom config section in web.config
- Updates to web.config for the custom section
The installer packages are copied to the folder ~/Content/MeadCo.ScriptX/installers.
There is no problem with using this location and following the notes on Installing ScriptX on client PCs using code such as this (assuming MVC/Razor syntax):
However, this code will need updating with the correct version number with each update to the package.
However, as for basic use, this code will need updating with the correct version number with each update to the package. The code (viewpage) will also need to be updated with each revision to the license. It would be better practice to only have to update the web.config file when the license revision changes. The config handler provides support for this.
Using the Config Handler
The updates by the NuGet package to web.config are:
1. Declare the custom section handler:
The class MeadCo.ScriptX.ScriptXConfigHandler provides access to the custom config section
2. A config section completed with version and location information:
3. A config section completed with code version and location information and license information:
The MeadCo.ScriptX namespace provides a number of classes to simplify access to the ‘meadco’ confguration section in web.config.
The MeadCo.ScriptX.Configuration class provides two properties to access the code installation and license installation configuration.
1. InstallerConfig MeadCo.ScriptX.Configuration.ClientInstaller
The ClientInstaller object provides the information required to build a codebase string for an object tag:
|string FileName||The name and location of the file to use for installation -- the value of the attribute ‘filename’.|
|string Version||Returns the required installed version -- the value of the attribute ‘version’. If version is in dotted form it will be converted to comma-separated form.|
The ClientInstaller object can be used to improve the sample code above (MVC, Razor):
2. LicenseConfig MeadCo.ScriptX.Configuration.License
The License object provides the information required to build the parameters for a Security Manager object to specify the license file.
|Guid GUID||The identifier of the license|
|int Revision||The revision number of the license|
|string FileName||The location and name of the license file (.mlf)|
|bool PerUser||True (default) if the license is to be installed per-user, not for the machine (note that installing for the machine requires administrator access).|
The License object can be used to improve the sample code above (MVC, Razor):