Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Tue Jun 16, 2009 6:07 am Post subject: Can I lock an ASP.NET application to a domain |
|
|
Yes - if you use Authenticated Licensing in an ASP.NET application then this is default. When running in an ASP.NET application the AuthenticationLicenseProvider.GetComputerID method returns the domain name of the licensed web page (eg infralution.com). The Authenticated Web App sample project illustrates using Authenticated licensing in a ASP.NET application.
Note that if you use authenticated licensing for an ASP.NET application then your customers must always access the page through the licensed domain. If they don't and (for instance) access the page through a direct IP address or internal network name then the license will not be valid.
A customer can ensure that traffic is always directed to the page via one domain by adding a rewrite rule to the <system.webServer> section of the Web.Config file:
Code: | <rewrite>
<rules>
<rule name="Redirect to domain" stopProcessing="true">
<match url=".*"/>
<conditions>
<add input="{HTTP_HOST}" pattern="^otherdomain.com$"/>
</conditions>
<action type="Redirect" url="http://www.domainhere.com/{R:0}"
redirectType="Permanent"/>
</rule>
</rules>
</rewrite> |
This rule redirects traffic from one domain to another. _________________ Infralution Support |
|