Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / CLR / March 2004

Tip: Looking for answers? Try searching our database.

Weird assembly key problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Vagif Abilov - 22 Mar 2004 10:13 GMT
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
Valery Pryamikov - 22 Mar 2004 11:25 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.