Comments in CAS permission set
In case you want to add informative comments to your CAS permission set node in your manifest.xml – for example something like the red line below:
- <codeaccesssecurity>
- .
- .
- <policyitem>
- <permissionset class="NamedPermissionSet" version="1" description="Permission set for MyControls.">
- <!--Do not try to be cool by adding comments inside your PermissionSet node, okay?-->
- <ipermission class="System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" unrestricted="true">
- </ipermission>
- </permissionset>
- </policyitem>
- .
- .
When you wrap your code into a package and deploy it , here is what you get in the CAS configuration file (stored in ….\12\config\) without any of your IPermission nodes applied:
- <codeaccesssecurity>
- .
- .
- <policyitem>
- <permissionset class="NamedPermissionSet" version="1" description="Permission set for MyControls.">
- <!--Do not try to be cool by adding comments inside your PermissionSet node, okay?-->
- </permissionset>
- </policyitem>
- .
- .
- </codeaccesssecurity>
And here is what ULS log shows :CAS Deployment :
Added CAS Permission Set. Xml :
- <PermissionSet class="NamedPermissionSet" version="1" Description="Permission set for MyControls." Name="mypackage.wsp-8b8f6f28-7235-42c9-93a6-8fa57e962ddb-1">
- <!--Do not try to be cool by adding comments inside your PermissionSet node, okay?-->
- </PermissionSet>
It seems that deployment APIs ignore applying IPermission nodes when there is a comment line in the beginning of PermissionSet. In short, comments in CAS permission set node is NOT welcome!
Categories: MOSS 2007
Hi Big guy,
you misspelled Wrap for Warp. 🙂
Thanks Chad. You know where to look for my mistakes , eh? 😉
I feel your pain, I’m struggling with that 🙁 so any update would be appreciated.
Regards