I have an application that uses a simple utility DLL. The DLL has a key
specified in AssemblyInfo file:
[assembly: AssemblyKeyFile(@"..\..\Utils.snk")]
Everything works fine on a development machine. Now when I try to install
the application with utility assembly on a machine with just W2K and .NET
1.1 installed, it does not start.
("Application has generated exception that could not be handled...").
This exception is generated when application is being loaded.
If I remove the above line (assembly key file specification) everything
goes fine.
What can this mean?
TIA
Vagif Abilov
Hi Vagif,
check if W2K is fully patched and if it has Strong Cryptography pack
installed.
-Valery.
See my blog at:
http://www.harper.no/valery
> I have an application that uses a simple utility DLL. The DLL has a key
> specified in AssemblyInfo file:
[quoted text clipped - 17 lines]
>
> Vagif Abilov
Vagif Abilov - 22 Mar 2004 12:12 GMT
Hello Valery! Nice to hear from you.
I was going to thank you for saving my day, but unfortunately you did not
:-) This is kind of mystery. Few more facts.
All developers run applications on XP machines. Works fine.
We have two W2K servers and as long as utilitly assembly has strong key, the
applications won't start. If I remove a AssemblyKeyFile entry, it works. We
have SP4 and other patches installed, and we just installed High Encryption
Pack as you suggested.
Strange enough, I can't find similar cases if I search with Google. Weird.
Thansk anyway
Vagif
> Hi Vagif,
> check if W2K is fully patched and if it has Strong Cryptography pack
[quoted text clipped - 26 lines]
> >
> > Vagif Abilov
Vagif Abilov - 22 Mar 2004 13:16 GMT
Well, now it's solved :-)
Actually your advice maybe helped us. What happenned is being desperate to
fix the problem I was trying to run test application on the server but
directly from a network share pointing to my machine. Then I installed
encryption pack, and it didn't help. Now I discovered that .NET does not
indeed set permissions for applications across Intranet, but if I copy the
application on the server or lower security, it runs.
Thanks for your help.
Vagif
> Hi Vagif,
> check if W2K is fully patched and if it has Strong Cryptography pack
[quoted text clipped - 26 lines]
> >
> > Vagif Abilov
Ice - 22 Mar 2004 14:27 GMT
Don't know your security restrictions but we solved that by creating a code
access group that encapsulates our key.
ice
> Well, now it's solved :-)
>
[quoted text clipped - 41 lines]
> > >
> > > Vagif Abilov
Valery Pryamikov - 22 Mar 2004 15:28 GMT
Aha! The problem is that adding strong key signature automatically adds
FullTrust link demand on all public methods of assembly. When you run code
from intranet, code is assigned Intranet code group and isn't able to
satisfy FullTrust link demand. You can add AllowPartiallyTrustedCallers
attribute to your signed assembly as workaround, however be aware about
security related issues related to APTC assemblies.
-Valery.
> Well, now it's solved :-)
>
[quoted text clipped - 41 lines]
> > >
> > > Vagif Abilov
Vagif Abilov - 24 Mar 2004 13:15 GMT
That's a good tip - to add AllowPartiallyTrustedCallers attribute.
Thanks again.
Vagif
> Aha! The problem is that adding strong key signature automatically adds
> FullTrust link demand on all public methods of assembly. When you run code
[quoted text clipped - 52 lines]
> > > >
> > > > Vagif Abilov