HighTechTalks DotNet Forums  

How to validate calling assembly?

Dotnet Security microsoft.public.dotnet.security


Discuss How to validate calling assembly? in the Dotnet Security forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Don
 
Posts: n/a

Default How to validate calling assembly? - 12-02-2007 , 07:17 PM






I'm creating a common .net dll for use by multiple projects (applications).
I want to ensure that only my applications (my code) can use the above dlls.
Is it possible to sign the dll or place some attribute/code such that only
my dlls (developed/signed by me) can use the dll?

basically i want to prevent others from being able to use my DLL?

Reply With Quote
  #2  
Old   
Henning Krause [MVP - Exchange]
 
Posts: n/a

Default Re: How to validate calling assembly? - 12-03-2007 , 11:33 AM






Hello,

Short answer: You can't.

Long answer: You can make in somewhat harder to prevent other people from
using your code. But in the end, if they have the assembly on their machine
they can just decompile it and remove your protection. Now you can check the
callstack and use an obfuscator to make it harder.

To really prevent other parties from using your code you'll have to keep it
from them (using a WebService for example, which might or might not be an
option in your case).

Kind regards,
Henning Krause

"Don" <Don (AT) discussions (DOT) microsoft.com> wrote

Quote:
I'm creating a common .net dll for use by multiple projects
(applications).
I want to ensure that only my applications (my code) can use the above
dlls.
Is it possible to sign the dll or place some attribute/code such that only
my dlls (developed/signed by me) can use the dll?

basically i want to prevent others from being able to use my DLL?


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.