Hi jaklithn,
Thanks for your feedback.
#1, yes, you are right. This is because of the principle of security.
Security is all about trust. Because our application runs in a network
share folder, it can not have all the trust as an application on local
disk.(Also, application from internet will have a much more restricted
trust). This is by design of .Net code access security. Maybe we can place
some hint information on the application to notify the end user to give
more "trust" to our application(that is give security configuration to your
application)
#2, when adding a code group, we should make sure our application fails in
the boundary of this code group, for example, we can use URL as a
condition, then we can associate our application URL with this code group.
After setting up an enough permission set, it will appear in the code group
permission set list. So we should first create the code group, then create
the code group, and select the new created permission set for this code
group.
For more information regarding .Net CAS, please refer to the link below:
"Understanding .NET Code Access Security"
http://www.codeproject.com/dotnet/UB_CAS_NET.asp
Hope this helps
Best regards,
Jeffrey Tan
Microsoft Online Partner Support

Signature
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Jakob Lithner - 12 Jan 2006 12:19 GMT
I find the .Net security concept hard to grasp. Do you really intend the end
users to make all those security configuarations manually on their own local
machines? I am a fairly experienced developer and I am quite lost myself.
I created a PermissionSet called ClipboardPermission and added a
UserInterface permission with the Grant Assemblies ... All Clipboard set.
I added this PermissionSet to the All_Code group. I know this is not
recomended, but just for the sake of testing. I still was not able to copy
from the GridView!
When I added the FullTrust PermissionSet to All_Code, then it worked.
Question: Are there more necessary permissions involved, apart from
AllClipboard?
My preliminary conclusion is: Don't bother to add nice features to your
application if they involve custom safety requirements. It is not worth the
labour.
"Jeffrey Tan[MSFT]" - 13 Jan 2006 06:42 GMT
Hi jaklithn,
Thanks for your feedback.
No, just as I pointed out in first reply, this issue is not constrained by
UIPermission, but by SecurityPermission with
SecurityPermissionFlag.UnmanagedCode. Look below:
[SecurityPermission(SecurityAction.LinkDemand,
Flags=SecurityPermissionFlag.UnmanagedCode)]
So we should assign Security permission to the code group. Select Security
permission in the left ¡°Available Permissions¡± listbox, then click Add>>,
we should check ¡°Allow calls to unmanaged assemblies¡± option then click
¡°Ok¡±.
Only partial trusted place running application will be constrained by .Net
CAS, such as internet, shared folder etc.., the local running app will be
full trusted.
Thanks
Best regards,
Jeffrey Tan
Microsoft Online Partner Support

Signature
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.