For performance reasons the Znodestorefront License is only checked at application startup. From there the state of the license is cached in memory. While this greatly increases performance it can make getting the license set up correctly on server a little tricky. Here are some basic rules to follow to ensure your license is installed correctly:
- Set up a URL
redirection from mystore.com to www.mystore.com. You
should have this set up for your SSL certificate anyway.
- Move the
Web/Data/Default/Config/*.dlsc files to another directory.
- Restart the
application pool. This will clear out the license from shared memory.
- Access your site using the full URL (www.mystore.com in this example). You should now be prompted to activate your license. Verify you can now access your site.
- Close all your browser windows (including those that don't point to your site). This will ensure that all sessions are closed.
- Restart your application pool. This will clear the cached license from memory.
- Access your site again. You should be able to access your store directly without being prompted for a license.
Accessing your site from another domain name
Services such as DiscountASP give you a temporary domain name that you can use to access the site. Instead of using the temporary domain name you should always use your main site URL.
It is very important that you access your site from a single domain. Accessing it from a different domain will trigger the license manager to check for a valid license key. Since the site is Activated to another domain it will ask you for an activation.
The way around this is to set up a host header for your site. This will prevent it from being accessed from any other URL.
If setting up your site with host headers is not an option here is a work around. In Activate/default.aspx.cs update the following function. The critical line is commented. What this does is force the licensing to be removed from cache before it is checked. The result will be that if you access the site from an invalid URL you will still get the activation page, but that invalid activation will not be cached. In version 5.1 and above this code has been added by default. Put the following code in the Page_Load event.
// Remove the license from the cache so that we will be sure to re-check it.
if (HttpContext.Current.Application["ZNODELICENSE"] != null)
{
HttpContext.Current.Application.Remove("ZNODELICENSE");
}
Znode Administrator
email: support@znode.com
url: www.znode.com