These files can be used to create a WindwardCustomCallbacks.dll file that will check and allow, change or disapprove each select before it requests data from the datasource.
This provides you a means to limit access to the datasource. However, like any security measure, it has weaknesses and we strongly recommend you use the tightest possible limitation in the access allowed in the datasource via the credentials used in addition to this functionality.
Open Catapult. (Found under Start -> All Programs -> Windward Studios -> Windward .NET Engine -> .Catapult - Windward .NET Engine demos)
In the Catapult menu, select C# from the list of programming languages.
Under C# demos select Specialized.
Scroll to the right and click Custom Callbacks
This will open the project file in Visual Studio.
In the file WindwardCustomCallbacks.cs, you can write your own custom callbacks to be used with the .NET Engine. This sample contains a function that will check to see if the user is accessing the salary node in our CustomCallbacksData.xml datasource. If they are, it throws a new DataSourceException and does not allow the request to hit the data source.
Once you have installed the .dll you have built with our sample, you can test using the Windward Custom Callbacks Example Template.docx and CustomCallbacksData.xml samples that are installed with AutoTag. By default the files are located in C:\Users\<username>\Documents\AutoTag
- Click Build, Rebuild Solution. (The build will output a file called WindwardCustomCallbacks.dll)
- Right click the project and click Open Folder in File Explorer.
- In the source folder, open to bin, Debug. If your configuration was set to Release, open the Release folder. Your new .dll file is in this folder.
Installing WindwardCustomCallbacks.dll for use with the .NET Engine
Installing these callbacks depends on your .NET Engine installation options. Choose the option that applies to you below, and follow those instructions.
If you chose to install your .dll files in the Global Assembly Cache (GAC) – an option in the Installer – you must still register the new file in the Global Assembly Cache.
- Open a Visual Studio Command Prompt. (Found under Start -> All Programs -> Visual Studio -> Visual Studio Tools -> Visual Studio Command Prompt)
- Type “cd\” to navigate to the C: Directory.
- To navigate to the folder where your WindwardCustomCallbacks.dll file is located type:
“cd C:\Users\USERNAME\Documents\Windward DotNet Engine Samples\CS\Specialized\CustomCallbacks\WindwardCustomCallbacks\bin\Debug”
4. To add your new WindwardCustomCallbacks.dll file to the GAC type :
“gacutil /i WindwardCustomCallbacks.dll”
If you did not chose the GAC option during installation, you must copy the files over to the .NET Engine and AutoTag install directories.
In the .NET Engine Installation, .dll files were NOT copied to the GAC.
- Navigate to the folder containing your new WindwardCustomCallbacks.dll file.
- Copy the file WindwardCustomCallbacks.dll.
- Navigate to the install directory of the .NET Engine.
- Open the folder dll.
- Paste your new dll.
- If you also have AutoTag installed, navigate to the AutoTag Directory, delete the WindwardCustomCallbacks.dll file, and paste your new file in its place.