Knowledgebase Home Page  >  RapidSpell Web ASP.NET  >  Misc
Search the Knowledge Base
How do I use multiple deployment keys for multiple domain names pointing to one web application?
https://keyoti.com/kb/Default.aspx?ToDo=view&questId=45&catId=60

Options

Print this page
Email this to a friend
Please note: this article is specific to version 2 only, in version 3 multiple keys are settable through the web.config - please consult the user-guide.
 
In situations where one application is called via two domain names it is necessary to use two license keys.  The following describes how to programmatically switch license keys based on the domain name used to access the application.  (Note, for 'domain name' read 'server name' if the application is internal)
 
Once you have generated your 'deployment keys' using our online key generator (please see the instructions in the file 'license-keys.txt' which came with the download) you can switch the keys by adding the following code in the page load method in the code behind of your spell checker popup page.
 
VB.NET
 
If Request.ServerVariables("SERVER_NAME") = "www.mydomain.com" Then
            RapidSpellWeb1.LicenseKey ="<deployment key for www.mydomain.com>"
        Else
            RapidSpellWeb1.LicenseKey = "<deployment key for other domain>"
        End If

and in the main page that uses RapidSpellWebLauncher;

If Request.ServerVariables("SERVER_NAME") = "www.mydomain.com" Then
            RapidSpellWebLauncher1.LicenseKey ="<deployment key for www.mydomain.com>"
        Else
            RapidSpellWebLauncher1.LicenseKey = "<deployment key for other domain>"
        End If
 
 
 
C#
 
if (Request.ServerVariables["SERVER_NAME"] == "www.mydomain.com"){
            RapidSpellWeb1.LicenseKey ="<deployment key for www.mydomain.com>";
} else {
            RapidSpellWeb1.LicenseKey = "<deployment key for other domain>";
}

and in the main page that uses RapidSpellWebLauncher;

if (Request.ServerVariables["SERVER_NAME"] == "www.mydomain.com"){
            RapidSpellWebLauncher1.LicenseKey ="<deployment key for www.mydomain.com>"
}else{
            RapidSpellWebLauncher1.LicenseKey = "<deployment key for other domain>"
}

Related Questions:

Attachments:

No attachments were found.