{"id":584,"date":"2008-07-05T12:49:16","date_gmt":"2008-07-05T17:49:16","guid":{"rendered":"http:\/\/blogs.devhorizon.com\/reza\/?p=584"},"modified":"2008-08-03T07:32:20","modified_gmt":"2008-08-03T12:32:20","slug":"comments-in-cas-permission-set","status":"publish","type":"post","link":"https:\/\/blogs.devhorizon.com\/reza\/2008\/07\/05\/comments-in-cas-permission-set\/","title":{"rendered":"Comments in CAS permission set"},"content":{"rendered":"<p>In case you want to add informative comments to your CAS permission set node in your manifest.xml &#8211; for example something like the red line below:<br \/>\n[xml]<br \/>\n<codeaccesssecurity><br \/>\n.<br \/>\n.\n<policyitem>\n<permissionset class=\"NamedPermissionSet\" version=\"1\" description=\"Permission set for MyControls.\">\n<!--Do not try to be cool by adding comments inside your PermissionSet node, okay?--><br \/>\n<ipermission class=\"System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" version=\"1\" unrestricted=\"true\"><br \/>\n<\/ipermission>\n<\/permissionset>\n<\/policyitem>\n.<br \/>\n.<br \/>\n[\/xml]<br \/>\nWhen you wrap your code into a package and deploy it , here is what you get in the CAS configuration file (stored in &#8230;.\\12\\config\\) without any of your IPermission nodes applied:<br \/>\n[xml]<br \/>\n<codeaccesssecurity><br \/>\n.<br \/>\n.\n<policyitem>\n<permissionset class=\"NamedPermissionSet\" version=\"1\" description=\"Permission set for MyControls.\">\n<!--Do not try to be cool by adding comments inside your PermissionSet node, okay?-->\n<\/permissionset>\n<\/policyitem>\n.<br \/>\n.<br \/>\n<\/codeaccesssecurity><br \/>\n[\/xml]<\/p>\n<p>And here is what ULS log shows :CAS Deployment :<br \/>\nAdded CAS Permission Set. Xml :<\/p>\n<p>[xml]<br \/>\n<PermissionSet class=\"NamedPermissionSet\" version=\"1\" Description=\"Permission set for MyControls.\" Name=\"mypackage.wsp-8b8f6f28-7235-42c9-93a6-8fa57e962ddb-1\"><br \/>\n<!--Do not try to be cool by adding comments inside your PermissionSet node, okay?--><br \/>\n<\/PermissionSet><br \/>\n[\/xml]<br \/>\nIt seems that deployment APIs ignore applying IPermission nodes when there is a comment line in the beginning of PermissionSet. In short,\u00a0 comments in CAS permission set node is NOT welcome!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In case you want to add informative comments to your CAS permission set node in your manifest.xml &#8211; for example something like the red line below: [xml] . . . . [\/xml] When you wrap your code into a package and deploy it , here is what you get in the CAS configuration file (stored [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43],"tags":[],"class_list":["post-584","post","type-post","status-publish","format-standard","hentry","category-moss-2007"],"_links":{"self":[{"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/posts\/584","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/comments?post=584"}],"version-history":[{"count":0,"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/posts\/584\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/media?parent=584"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/categories?post=584"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/tags?post=584"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}