Hi:

I want to create a DLL that only can be used from applications signed with
my strong key file.

I have checked the StrongNameIdentityPermissionAttribute but it does not
work for me. So I did the next logic: When someone access the code in the
DLL, the class contained check the running application friendly name, find
the application executable, obtain its public key token and compare it with
the self public key token, if it is the same continue with the execution.

But the problem is i found applications can change its friendly name... how
can I be sure the application.exe that is running?

Or there is another way to secure who uses my dll file?

Re: Securing DLLs, Running App and AppDomain by Mattias

Mattias
Thu Jan 06 11:31:08 CST 2005

Carlos,

>I have checked the StrongNameIdentityPermissionAttribute but it does not
>work for me.

What doesn't work?

It seems to be better to figure out how to do it the supported way
than to implement your own hack.



Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.

Re: Securing DLLs, Running App and AppDomain by CarlosCampos

CarlosCampos
Thu Jan 06 11:53:06 CST 2005

Here is the reason:

"Full demands for StrongNameIdentityPermission succeed only if all the
assemblies in the stack have the correct evidence to satisfy the demand."

I want to check only the application, we use third party dlls between the
stack, so I think my application will fail. Also, what happens with COM+,
they run under Framework DLLs with another strongName, or not?

"Mattias Sjögren" wrote:

> Carlos,
>
> >I have checked the StrongNameIdentityPermissionAttribute but it does not
> >work for me.
>
> What doesn't work?
>
> It seems to be better to figure out how to do it the supported way
> than to implement your own hack.
>
>
>
> Mattias
>
> --
> Mattias Sjögren [MVP] mattias @ mvps.org
> http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
> Please reply only to the newsgroup.
>