.NET Questions (CLOSED)

Questions and Answers on any aspect of .NET. Now closed.

This discussion group is now closed.

Have a question about .NET development? Try stackoverflow.com, a worldwide community of great developers asking and answering questions 24 hours a day.

The archives of .NET Questions contain years of Q&A. Even older .NET Questions are still online, too.

StrongNameIdentityPermission?

For some reason lately, a third party component I'm using it throwing a security exception on some machines:

"The application attempted to perform an operation not allowed by the security policy.  The application required SecurityException. To grant this application..."

And in the exception text it says the permission it was trying to use was the StrongNameIdentityPermission.  I don't know much or anything about this.  Can someone tell me what it's trying to do and what needs to be allowed on a system to let this work?
Noob
Tuesday, January 16, 2007
 
 
Hmmm.... maybe you should try "Google  StrongNameIdentityPermission"?

It implies a versioning issue with an assembly signed with a strong name. Any more info than that and you'll have to pay my hourly rate.
anon
Tuesday, January 16, 2007
 
 
I tried Google first... I couldn't see what security policy would throw this exception.

Versioning issue wouldn't seem to make sense since this error doesn't occur on 90% of computers I've tested.
Noob
Tuesday, January 16, 2007
 
 
You say that 90% of your devices tested worked, was the app by any chance running as full trust on those machines?

Remember Full Trust does exactly what it says on the tin, any and all permission demands pass under full trust.
Graeme Bradbury
Wednesday, January 17, 2007
 
 
Noob, I've seen this before.

When it happened to me, the reason was that a strongly-named assembly was trying to call some reflection code that wasn't strongly-named (or possibly wasn't strongly-named with the same strong name, I can't remember).

One suggestion to fix this can be found here - I can't verify that it works, though:
http://blogs.msdn.com/eugene_bobukh/archive/2004/03/10/87603.aspx
Mark Pearce Send private email
Wednesday, January 17, 2007
 
 
Or if this is the problem, and you're using .NET 2.0, you can use the LinkDemandChoice SecurityAction.
Mark Pearce Send private email
Wednesday, January 17, 2007
 
 
Reading again, and noting that it's a third-party component that you're having problems with, my bet is that it does indeed have a strong name different to your own assembly's strong name.
Mark Pearce Send private email
Wednesday, January 17, 2007
 
 
Thanks for the link... I think I'm getting closer to tracking this down.  Your explanation would make sense, the only thing I don't get it why it only occurs on some computers, and not others.
Noob
Wednesday, January 17, 2007
 
 
Doesn't the fact that it only occurs on some computers imply a versioning issue? That was my very first thought. That's why I was so cheaky with my first reply. Sorry for being so cheaky earlier. I'm on pain meds from having my tonsils removed and I'm out to bite the head off of anyone who makes me the least bit edgy.  ;)

Take a hard look at the third party component and its requirements. One or more of your machines probably has conflicting components installed from other sources (or just older versions of the same assemblies).
anon
Wednesday, January 17, 2007
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz