Strong Naming Assemblies + permissions

A

adrian.snell

I have a strong names signed assembly which contains a user control. I
wish to embed this user control in an html file that will display in a
browser. This control references and makes use of the System.IO.Ports
and System.Net.Sockets libraries, which means permissions must be
granted for this to work correctly. To do this, in Control
Panel>Administrative Tools>.NET Framework 2.0 Configuration I have
added a code group under machine for LocalIntranetZone that should
allow any libraries with the strong name key that is used in the
assembly to be executed. However, this does not work - the control does
not appear on the browser. Please bear in mind that if I add a code
group in there to grant full permissions to ALL code, then it works
correctly, as does it if the assembly is unsigned. Any ideas what could
be wrong?

Many thanks in advance for your help.
 
W

Willy Denoyette [MVP]

|I have a strong names signed assembly which contains a user control. I
| wish to embed this user control in an html file that will display in a
| browser. This control references and makes use of the System.IO.Ports
| and System.Net.Sockets libraries, which means permissions must be
| granted for this to work correctly. To do this, in Control
| Panel>Administrative Tools>.NET Framework 2.0 Configuration I have
| added a code group under machine for LocalIntranetZone that should
| allow any libraries with the strong name key that is used in the
| assembly to be executed. However, this does not work - the control does
| not appear on the browser. Please bear in mind that if I add a code
| group in there to grant full permissions to ALL code, then it works
| correctly, as does it if the assembly is unsigned. Any ideas what could
| be wrong?
|
| Many thanks in advance for your help.
|

"LocalIntranetZone" does not have SockePermission nor FileIoPermission. You
should take some time to read more about CAS evidence and the different
permission sets, this is not something you will learn overnight.

Willy.
 
A

adrian.snell

I _should_ have given LocalIntranetZone FullTrust when the assembly has
this particular strong name key, by adding a new code access group.
This is what doesnt work...it does not grant permissions for all
assemblies with the strong name I give it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top