JSLINQ
The security type check is performed by Jslinq\bin\Debug\Jslinq.exe. It expects the path to a Visual Studio project (*.proj) as the only parameter. JSLINQ assumes that the project was already successfully compiled. Use the following command in the root of this solution to invoke JSLINQ on the scenarios:
Jslinq\bin\Debug\Jslinq.exe Scenarios\Scenarios.fsproj
A program that passes the security policy will produce a list of constraints, substitutions, security type signatures and a success message being printed on the screen. Violation of the policy results in the display of a constraint violation.
Successful verification
Failed verification
[+] Security Type Check successfully completed.
[-] Security Type Check failed: Constraints violated
The following video shows the security type check in action on the example scenarios:
Additional Requirements for Execution of Example Applications
If you want to run the mobile app example, you additionally need to install PhoneGap. We successfully used PhoneGap 4.2.0-0.24.2. Installing PhoneGap is not necessary when you only want to verify the example using JSLINQ.
If you want to fully run and use all scenarios, an example database needs to be created. Visual Studio comes with an embedded version of Microsoft SQL Server, which is sufficient for the scenarios shipped with JSLINQ. Instructions for setting up the database are provided below.
Hosted Examples
The majority of scenarios are implemented as self-hosted web applications. Use the following commands to open a local web server which hosts the examples:
cd Scenarios\bin
Scenarios.exe .. http://localhost:9000
Then you can point your browser to http://localhost:9000 as expected.
Database Preparation
The scenarios Location-Based Service and Area Aggregation work with a database. We have prepared the necessary SQL statements for the creation of the tables and test data in Scenarios\Scenarios-DDL.sql. To make the location-based services work in your area, specify your location in the SQL file (centerLat, centerLon) and AreaAggregation.fs (look for gridBase).
Whatever method you choose to set up your example database, in the end you need to specify the connection string of it in Scenarios\App.config. To do this, replace the connection string provided for jslinq-db with your own connection string.
Mobile App
You have different options for running the mobile app. The easiest way for most platforms is as follows:
Install the PhoneGap Developer App on your mobile device.
If not done before, build the solution.
Execute the script ScenarioApp\server-app.cmd. It starts the app server, which needs to be left running.
Start the PhoneGap Developer App on your mobile device and follow the instructions given by the app and the app server to connect.
The mobile app requires also a server part. The endpoint of the application server is hardcoded at the end of ScenarioApp/Client.fs. Update this to the IP address of your test system and proceed as follows:
Build the solution
Run cd Scenarios, Scenarios.exe .. http://*:9000 as Administrator.
Running it as administrator is not strictly necessary, but then an administrator has to configure an URL ACL as follows:
netsh http add urlacl url=https://*:9000/ user=myUser
See also MSDN for information about URL prefix syntax.