473,378 Members | 1,522 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

ASP.NET assemblies - running under a specific URL

Hello,

I have an ASP.NET application as an assembly running on a specific website.
I would like to prevent anybody from using the application if they copy the
assembly to another website. The application should not start when copied to
a website other than specified.

The question is how to secure the assembly so it works only on a specified
URL?
What namespace in .NET framework should I use?
What technique should I utilize?

Thanks for any help,
Leszek Taratuta
Nov 18 '05 #1
1 982
There are two possible approaches for this:

1. Screen request URLs for a permitted list of sites (by DNS name and IP).
2. Implement a licensing mechanism.

Of the two, #1 is easier to implement, but it's also much less flexible than
licensing. You should also keep in mind that both approaches are reasonably
simple to bypass by decompiling, modifying, then recompiling your
assemblies, and anyone who is willing to ignore contractual and/or licensing
agreements to copy your application is very likely willing to ignore similar
injunctions against decompliation.

That said, if you want to use the simplest implementation, adding a
BeginRequest event handler to screen for acceptable server addresses would
do the trick. For example, if you had an application that should only run
on the Microsoft site, you might want to use something like the following:

protected void Application_BeginRequest(Object sender, EventArgs e)
{
bool allowRequest;

switch (Request.Url.Host.ToLower())
{
case "localhost":
case "127.0.0.1":
case "www.microsoft.com":
case "207.46.250.252":
allowRequest = true;
break;
default:
allowRequest = false;
break;
}

if (!allowRequest) throw new HttpException(404, null);
}

HTH,
Nicole

"Leszek Taratuta" <ad*@taratuta.net> wrote in message
news:eZ**************@TK2MSFTNGP11.phx.gbl...
Hello,

I have an ASP.NET application as an assembly running on a specific
website.
I would like to prevent anybody from using the application if they copy
the
assembly to another website. The application should not start when copied
to
a website other than specified.

The question is how to secure the assembly so it works only on a specified
URL?
What namespace in .NET framework should I use?
What technique should I utilize?

Thanks for any help,
Leszek Taratuta

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Tom Dacon | last post by:
If you're not putting assemblies in the GAC, but are referencing shared code with copylocal=true into the projects that use them, is there any value to signing the assemblies? In the environment...
0
by: thbst16 | last post by:
After a number of weeks of fruitless research and experimentation, I decided to turn to the group with this issue and see if anyone had any experiences or insights that might help me out. Here's...
6
by: JonS. | last post by:
Hi, I'm trying to create a Windows Forms portal application and need some help. What I currently have is a main application (.exe) containing an MDI form. The idea is that this main application...
5
by: Raterus | last post by:
I'm just throwing this error out for my sanity, I've seen posts about this, but never solutions. I'm using VS.NET 2003, Framework 1.1, and I'm getting a random error about every 1 out of 10 times...
8
by: Charles Law | last post by:
I'm sorry to keep harping on about this one, but it is really quite important for me to be able to list _all_ required assemblies in my Help About box. Herfried kindly posted some code before that...
2
by: Tim | last post by:
I have placed my assemblies in different folders (as per project req.). I am using config file with <codebase> option and registry with codebase option (COM Interop) to enable the runtime to locate...
1
by: John H Clark | last post by:
I need some direction on how to configure IIS to use assemblies from the GAC instead of bin. I install assemblies in the GAC but IIS 6.0 doesn't find them. What's the secret? Many thanks... --...
4
by: =?Utf-8?B?VzFsZDBuZTc0?= | last post by:
When one architects a new project one of the first steps in the decision is to decide on the layers. (In my opinion anyway) One architecture that I have used before is to go solid OO and create...
4
by: illegal.prime | last post by:
Hi all, I'm getting unexpected results when trying to preload assemblies into an AppDomain I'm creating. Upon creation of the AppDomain - I attach an AssemblyResolve to both my current AppDomain...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.