473,320 Members | 1,859 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,320 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 1566
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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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...

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.