473,387 Members | 1,493 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,387 software developers and data experts.

Protecting Assemblies

Hi,

When an application is shipped is there a way of un-authroized people from using the assemblies in their own applications?

Regards,

Michael
Jul 21 '05 #1
4 1570
Hi,

http://windowsforms.net/articles/Licensing.aspx

Ken
--------------------------
"Michael" <an*******@discussions.microsoft.com> wrote in message
news:F2**********************************@microsof t.com...
Hi,

When an application is shipped is there a way of un-authroized people from using the assemblies in their own applications?
Regards,

Michael

Jul 21 '05 #2
Check out the StrongNameIdentityPermissionAttribute class. This will make
it so that only your, trusted, assemblies can bind to your assemblies. If
someone tries to reference your assemblies, they will get an exception.

"Michael" <an*******@discussions.microsoft.com> wrote in message
news:F2**********************************@microsof t.com...
Hi,

When an application is shipped is there a way of un-authroized people from using the assemblies in their own applications?
Regards,

Michael

Jul 21 '05 #3
Thank you for your replies.

I've had a look at the StrongNameIdentityPermissionAttribute and I'm not sure if it is work correctly. I'll tell you what I've done and maybe you can tell me where I've gone wrong.

1) Create a class library and a strong name using sn.exe
2) Modified the AssemblyKeyFile attribute on the assembly to point to the strong name file.
3) Set DelaySign to false.
4) Got the public key using "sn -o" and removed the spaces an commas.
5) Places the result of "Step 4" in a StringNameIdentityPermission attribute on the assembly with a RequestMinimum.
6) Create a UI application that referenced this assembly and attempted to use a class. This generated a PolicyException.
7) I then signed the EXE with the same strong name, Steps 2 and 3, ran it again.
8) I still got the PolicyException message.

Can you tell me where I've gone wrong? The PolicyException states that the "Required Permissions Cannot Be Aquired".

Thank you,

Michael
Jul 21 '05 #4
If I place the StrongNameIdentityPermissionAttribute at class level, then everything works fine. But it fails at assembly level.
Jul 21 '05 #5

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

Similar topics

24
by: Yang Li Ke | last post by:
Hi guys! Anyone know a way so that users purchasing my scripts would not be able to share them with other people ? Yang
6
by: nell | last post by:
Hi all, I've developed a testing application in python, and should supply it in a way that no one (lets say they are regular users) will understand it and edit it. The application source is all...
5
by: Sky Fly | last post by:
Hi, I know that when an .NET exe is run, the CLR loads the exe (along with dependent assemblies), compiles them to native code then runs the code. Assuming the assemblies are loaded from a...
12
by: Roland Hall | last post by:
I read Aaron's article: http://www.aspfaq.com/show.asp?id=2276 re: protecting images from linked to by other sites. There is a link at the bottom of that page that references an interesting...
4
by: Michael | last post by:
Hi, I have written an application in C# and when I distribute it I would like to prevent un-authorised people from using these assemblies in their own applications. Is it possible to do this?...
3
by: Typpo | last post by:
Hi all, Because the programs I work on are intended to be limited to only certain users, I have had several problems concerning people hex'ing out authentication procedures and replacing strings...
7
by: Bobby C. | last post by:
My company is in the process of getting ready (well actually QTR 2 2004) to roll out a rewritten version of a vertical market application for the municipal market (small and medium sized cities). ...
4
by: Michael | last post by:
Hi, When an application is shipped is there a way of un-authroized people from using the assemblies in their own applications? Regards, Michael
12
by: David | last post by:
Hi, I want to be able to make a class only visible within the namespace, i.e. only other classes within the namespace will have access to it. I have tried putting a protected keyword against...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.