|
security
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
CAS and Strong Named EntLib 2.0 Assembliesshares. I've got a successful strong named build of Enterprise Library 2.0, and I can build strong named assemblies referencing these assemblies. I've then used the Increase Trust wizard to trust all assemblies with a specific public key (ignoring version). My build output folder is a remote network share, and when I run (with or without debug) from within the VS IDE, my application work fine (Click once security needs to be enabled with Full Trust for this to work). But when I run the assembly by double-clicking in Windows Explorer, I receive Request for permission of type 'System.Permissions.SecurityPermission' ... PublicKeyToken=b77a5c561934e089' failed. I've tried increasing the trust to this specific DLL and this public key, but still nothing seems to work. I've read a lot of websites about working with CAS (but I am still no expert), and have it working for other apps. This is my first attempt to mix CAS and Entlib. Have I missed a step somewhere? or am I off the mark completely? What is considered 'best practice'? October 7, 2006
My memory is hazy on this suggestion... but take a look at this dialog: http://cactidevelopers.resdev.net/access/pictures/policylevel.jpg You will see two checkboxes at the bottom.... I believe you need to check a combination of these or something.... My memory is very hazy, but you may want to check into whether this might be causing a permission problem where even though it has FullTrust.... its permissions get cut back by other code groups. Hope this helps! -- Show quoteHide quoteJoseph Bittman Microsoft Certified Solution Developer Microsoft Most Valuable Professional -- DPM Blog/Web Site: http://CactiDevelopers.ResDev.Net/ "Mike" <M***@discussions.microsoft.com> wrote in message news:83BAD610-E5E6-4B63-A19E-9768FB5E8EE9@microsoft.com... > > My goal is to run .NET assemblies referencing Entlib 2.0 from remote > network > shares. > > I've got a successful strong named build of Enterprise Library 2.0, and I > can build strong named assemblies referencing these assemblies. I've then > used the Increase Trust wizard to trust all assemblies with a specific > public > key (ignoring version). > > My build output folder is a remote network share, and when I run (with or > without debug) from within the VS IDE, my application work fine (Click > once > security needs to be enabled with Full Trust for this to work). But when I > run the assembly by double-clicking in Windows Explorer, I receive Request > for permission of type 'System.Permissions.SecurityPermission' ... > PublicKeyToken=b77a5c561934e089' failed. > > I've tried increasing the trust to this specific DLL and this public key, > but still nothing seems to work. > > I've read a lot of websites about working with CAS (but I am still no > expert), and have it working for other apps. This is my first attempt to > mix > CAS and Entlib. > > Have I missed a step somewhere? or am I off the mark completely? What is > considered 'best practice'? Joseph,
The link results in a 404..... Mike Show quoteHide quote "Joseph Bittman MVP MCSD" wrote: > October 7, 2006 > > My memory is hazy on this suggestion... but take a look at this dialog: > > http://cactidevelopers.resdev.net/access/pictures/policylevel.jpg > > You will see two checkboxes at the bottom.... I believe you need to check a > combination of these or something.... > > My memory is very hazy, but you may want to check into whether this might be > causing a permission problem where even though it has FullTrust.... its > permissions get cut back by other code groups. > > Hope this helps! > > -- > > Joseph Bittman > Microsoft Certified Solution Developer > Microsoft Most Valuable Professional -- DPM > > Blog/Web Site: http://CactiDevelopers.ResDev.Net/ > "Mike" <M***@discussions.microsoft.com> wrote in message > news:83BAD610-E5E6-4B63-A19E-9768FB5E8EE9@microsoft.com... > > > > My goal is to run .NET assemblies referencing Entlib 2.0 from remote > > network > > shares. > > > > I've got a successful strong named build of Enterprise Library 2.0, and I > > can build strong named assemblies referencing these assemblies. I've then > > used the Increase Trust wizard to trust all assemblies with a specific > > public > > key (ignoring version). > > > > My build output folder is a remote network share, and when I run (with or > > without debug) from within the VS IDE, my application work fine (Click > > once > > security needs to be enabled with Full Trust for this to work). But when I > > run the assembly by double-clicking in Windows Explorer, I receive Request > > for permission of type 'System.Permissions.SecurityPermission' ... > > PublicKeyToken=b77a5c561934e089' failed. > > > > I've tried increasing the trust to this specific DLL and this public key, > > but still nothing seems to work. > > > > I've read a lot of websites about working with CAS (but I am still no > > expert), and have it working for other apps. This is my first attempt to > > mix > > CAS and Entlib. > > > > Have I missed a step somewhere? or am I off the mark completely? What is > > considered 'best practice'? > If your application requires additional CAS permissions on the client, you
will need to either modify the CAS policy on each client machine or deploy as a ClickOnce application. Since you're targeting .NET 2.0, ClickOnce would probably be the simpler approach. For details on how to deploy and run an application using ClickOnce, see http://msdn2.microsoft.com/en-us/library/t71a733d.aspx. (Simply copying your assemblies to a network location after enabling ClickOnce security for debugging in Visual Studio is not enough.) Show quoteHide quote "Mike" <M***@discussions.microsoft.com> wrote in message news:83BAD610-E5E6-4B63-A19E-9768FB5E8EE9@microsoft.com... > > My goal is to run .NET assemblies referencing Entlib 2.0 from remote > network > shares. > > I've got a successful strong named build of Enterprise Library 2.0, and I > can build strong named assemblies referencing these assemblies. I've then > used the Increase Trust wizard to trust all assemblies with a specific > public > key (ignoring version). > > My build output folder is a remote network share, and when I run (with or > without debug) from within the VS IDE, my application work fine (Click > once > security needs to be enabled with Full Trust for this to work). But when I > run the assembly by double-clicking in Windows Explorer, I receive Request > for permission of type 'System.Permissions.SecurityPermission' ... > PublicKeyToken=b77a5c561934e089' failed. > > I've tried increasing the trust to this specific DLL and this public key, > but still nothing seems to work. > > I've read a lot of websites about working with CAS (but I am still no > expert), and have it working for other apps. This is my first attempt to > mix > CAS and Entlib. > > Have I missed a step somewhere? or am I off the mark completely? What is > considered 'best practice'? That is exactly what I was looking for! Thanks!
Show quoteHide quote "Nicole Calinoiu" wrote: > If your application requires additional CAS permissions on the client, you > will need to either modify the CAS policy on each client machine or deploy > as a ClickOnce application. Since you're targeting .NET 2.0, ClickOnce > would probably be the simpler approach. For details on how to deploy and > run an application using ClickOnce, see > http://msdn2.microsoft.com/en-us/library/t71a733d.aspx. (Simply copying > your assemblies to a network location after enabling ClickOnce security for > debugging in Visual Studio is not enough.) >
CASPOL - StrongName trusts not being applied
Any Obfuscator can hide the Key & iv? Thread.CurrentPrincipal only set once strong name validation failed problem Trusting a location for Framework 2.x XML files and .Net, digital signatures, WebService Security how to use microsoft application blocks ent lib june 2005 interop assembly requiring full trust Windows File Encryption Re: Encrypting using RSA private Key |
|||||||||||||||||||||||