|Summary||This article is a description of a Webprod feature|
|Written for||developers ; security administrators ; field managers|
|Keywords||URL ; short ; pretty ; prettify ; webprod ; 5.3.5 ; link ; encryption ; feature ; highlight|
In v5.3.5 of WebProd we added 2 often-requested features:
When starting a web interview, we normally need links like this:
This has two main drawbacks:
- It isn’t very pretty to look at
- People can add/remove/modify parameters
Both issues have been addressed:
- We added ‘pretty’ links
- It’s possible to encrypt links
To start an interview, you can now use a link like this:
You have to admit this looks much nicer, no?
If post/redirect/get is enabled (this option can be selected while installing Webprod), you’ll also have a pretty link visible in the location bar while the interview is in progress. It will look like this:
Instead of this:
Here’s the full list of available links to start an interview:
You’ll see that all links looks the same – the only way to see which link type is used is the number of parameters. Note that it is still possible to add additional parameters. You’ll just lose some of the prettiness:
To prevent users from messing with the links, you can choose to distribute encrypted links instead of clear text links. An added benefit is that these encrypted links are also quite a bit shorter than the original links. That’s because known parts (like Action=StartSurvey) are replaced by placeholders.
This link for example:
Would be encrypted to something like this:
A DoExternalPanel link (which is normally quite long), will also be quite a bit shorter. This link for example:
Will become something like this:
Extra parameters are also possible, but the encrypted link gets a bit longer.
Will become something like this:
Which is quite a bit longer than the link above
Encrypting an URL
To get an encrypted URL you can use AskiaExt as well, using the Action=EncryptLink, and the parameters (the part after the question mark) as the ‘Link’ parameter.
For this request for example:
You will get a plain text encrypted value back like this:
To use this in a link you have to include the prefix yourself (including a ~ to indicate this is an encrypted link). So in our case we have to start each link with http://askia.com/WebProd/~
Note that you have to URL-encode the link parameter!
So instead of using
You have to use
It’s also possible to use a ‘pretty’ version of this command which doesn’t require URL encoding:
Will also return the encrypted value
Enabling this is optional, and not difficult at all.
All this functionality is provided by an embedded ISAPI filter, which allows us to intercept and change URL requests.
Enabling this is as easy as installing the ISAPI filter.
- In IIS Manager, go to the WebSite’s configuration (not the server configuration!)
- Open the ISAPI Filters item (by double-clicking it)
- Click on ‘add’ in the right-side menu:
- Enter a name, and the path to AskiaExt.dll:
- When you click ‘OK’, you’re done! (no IISReset or application pool is necessary)
- You can use the original links, pretty links, and encrypted links concurrently
- When you install the ISAPI filter (and post/redirect/get is enabled) the browser will always contain the pretty URL once the interview is started (…/WebProd/Interview/JDJSJJSDJ…).
You can still start/resume new interviews using all three link types.
- When post/redirect/get is disabled and you start an interview using a pretty link, the browser will show a non-pretty link once the interview is started.
- Even if an interview is started with an encrypted link, once an interview is started you’ll always see either a pretty link or a regular link.
We could implement encryption of this link as well if necessary.
- You can get an error while encrypting a link if the link to encrypt has a length greater than 260 characters. It's because the Http.sys service is coded with default maximum of 260 characters per Url segment. The solution here is to add a regkey on the Webprod server. Key to add:
Data: Desired amount. (Max Value is 32766)
Restarting the PC is required after having added this key.