<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Code Access Security policy template for Visual Studio 2010 SharePoint Developer Tools</title>
	<atom:link href="http://blog.mastykarz.nl/code-access-security-policy-template-visual-studio-2010-sharepoint-developer-tools/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mastykarz.nl/code-access-security-policy-template-visual-studio-2010-sharepoint-developer-tools/</link>
	<description>Innovation Matters &#124; SharePoint Server MVP &#124; ISSN 2210-9390</description>
	<lastBuildDate>Fri, 10 Feb 2012 18:00:19 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Waldek Mastykarz</title>
		<link>http://blog.mastykarz.nl/code-access-security-policy-template-visual-studio-2010-sharepoint-developer-tools/comment-page-1/#comment-83040</link>
		<dc:creator>Waldek Mastykarz</dc:creator>
		<pubDate>Wed, 22 Jun 2011 04:26:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mastykarz.nl/code-access-security-policy-template-visual-studio-2010-sharepoint-developer-tools/#comment-83040</guid>
		<description>@Alex: You should be able by adding a custom CAS policy to your Package and configuring permissions for the WebService. This article might help you find out which permissions your assembly requires exactly: http://blog.mastykarz.nl/working-easier-custom-cas-policies/.</description>
		<content:encoded><![CDATA[<p>@Alex: You should be able by adding a custom CAS policy to your Package and configuring permissions for the WebService. This article might help you find out which permissions your assembly requires exactly: <a href="http://blog.mastykarz.nl/working-easier-custom-cas-policies/" rel="nofollow">http://blog.mastykarz.nl/working-easier-custom-cas-policies/</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://blog.mastykarz.nl/code-access-security-policy-template-visual-studio-2010-sharepoint-developer-tools/comment-page-1/#comment-82978</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Tue, 21 Jun 2011 16:16:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mastykarz.nl/code-access-security-policy-template-visual-studio-2010-sharepoint-developer-tools/#comment-82978</guid>
		<description>I&#039;ve got an assembly that workd perfectly well if I set my app trust level to &quot;Full&quot; but I don&#039;t want to do that, I&#039;d prefer setting only my assembly&#039;s trust to full, is that possible? the problem I have is that this assembly call webservice, any url could be entered. I tried adding this to my package.template.xml file but it didn&#039;t work : 

        
          
            
          
        </description>
		<content:encoded><![CDATA[<p>I&#039;ve got an assembly that workd perfectly well if I set my app trust level to &#034;Full&#034; but I don&#039;t want to do that, I&#039;d prefer setting only my assembly&#039;s trust to full, is that possible? the problem I have is that this assembly call webservice, any url could be entered. I tried adding this to my package.template.xml file but it didn&#039;t work :</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vasu K</title>
		<link>http://blog.mastykarz.nl/code-access-security-policy-template-visual-studio-2010-sharepoint-developer-tools/comment-page-1/#comment-78922</link>
		<dc:creator>Vasu K</dc:creator>
		<pubDate>Wed, 11 May 2011 03:04:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mastykarz.nl/code-access-security-policy-template-visual-studio-2010-sharepoint-developer-tools/#comment-78922</guid>
		<description>We created a custom workflow and associated it with a document library. This works fine when I make &quot;Trust Level&quot; to &quot;Full&quot; in the web.config file. We kept &quot;Trust Level&quot; to &quot;WSS_Minimal&quot; in web.config file and created a &quot;Code Security Access (CAS)&quot; policy and added to the workflow project&#039;s &quot;Package Manifest&quot; as described in this post.

We are getting &quot;Failed to Start (retrying)&quot; error now and workflow is not starting.

Here is the CodeAccessSecurity that we used:
















Can you please let us know if we need to make changes to the above CAS policy to make the workflow work?</description>
		<content:encoded><![CDATA[<p>We created a custom workflow and associated it with a document library. This works fine when I make &#034;Trust Level&#034; to &#034;Full&#034; in the web.config file. We kept &#034;Trust Level&#034; to &#034;WSS_Minimal&#034; in web.config file and created a &#034;Code Security Access (CAS)&#034; policy and added to the workflow project&#039;s &#034;Package Manifest&#034; as described in this post.</p>
<p>We are getting &#034;Failed to Start (retrying)&#034; error now and workflow is not starting.</p>
<p>Here is the CodeAccessSecurity that we used:</p>
<p>Can you please let us know if we need to make changes to the above CAS policy to make the workflow work?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Waldek Mastykarz</title>
		<link>http://blog.mastykarz.nl/code-access-security-policy-template-visual-studio-2010-sharepoint-developer-tools/comment-page-1/#comment-71357</link>
		<dc:creator>Waldek Mastykarz</dc:creator>
		<pubDate>Thu, 03 Mar 2011 14:31:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mastykarz.nl/code-access-security-policy-template-visual-studio-2010-sharepoint-developer-tools/#comment-71357</guid>
		<description>@Oliver: The CAS policy that I provided is basically a starting point. Depending on what you&#039;re doing you might need to extended it with additional permissions, and elevating privileges is an example of this. When calling RunWithElevatedPrivileges in your code you need to add the Impersonate attribute (http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.security.sharepointpermissionattribute.impersonate.aspx) to your SharePoint Permission in CAS (Impersonate=&quot;true&quot;). With that everything should work okay.</description>
		<content:encoded><![CDATA[<p>@Oliver: The CAS policy that I provided is basically a starting point. Depending on what you&#039;re doing you might need to extended it with additional permissions, and elevating privileges is an example of this. When calling RunWithElevatedPrivileges in your code you need to add the Impersonate attribute (<a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.security.sharepointpermissionattribute.impersonate.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.security.sharepointpermissionattribute.impersonate.aspx</a>) to your SharePoint Permission in CAS (Impersonate=&#034;true&#034;). With that everything should work okay.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Oliver</title>
		<link>http://blog.mastykarz.nl/code-access-security-policy-template-visual-studio-2010-sharepoint-developer-tools/comment-page-1/#comment-71113</link>
		<dc:creator>Oliver</dc:creator>
		<pubDate>Mon, 28 Feb 2011 17:51:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mastykarz.nl/code-access-security-policy-template-visual-studio-2010-sharepoint-developer-tools/#comment-71113</guid>
		<description>Hi Waldek,

I read your blog post about how to add CAS policies to a sharepoint 2010 solution with Visual Studio 2010. Really very informative :-)

At the moment I&#039;m working on a little sharepoint 2010 webpart where I added a methode that uses RunWithElevatedPrivileges.
I need to add CAS policies to that webpart project - so I added the policies I copied from your post.
That worked fine until my code calls the method with RunElevatedPrivileges. In that case a security exception is thrown telling me that there is something wrong with aquiring policies from .
But I already added this to my CAS policies (like you&#039;ve done).
I&#039;m really stuck now - what policy do I need to added when using RunWithElevatedPrivileges?
Although I&#039;m not a newbie to sharepoint development - I&#039;m a newbie to using CAS. So I really would appreciate to get some help from you.

Regards,
Oliver</description>
		<content:encoded><![CDATA[<p>Hi Waldek,</p>
<p>I read your blog post about how to add CAS policies to a sharepoint 2010 solution with Visual Studio 2010. Really very informative :-)</p>
<p>At the moment I&#039;m working on a little sharepoint 2010 webpart where I added a methode that uses RunWithElevatedPrivileges.<br />
I need to add CAS policies to that webpart project &#8211; so I added the policies I copied from your post.<br />
That worked fine until my code calls the method with RunElevatedPrivileges. In that case a security exception is thrown telling me that there is something wrong with aquiring policies from .<br />
But I already added this to my CAS policies (like you&#039;ve done).<br />
I&#039;m really stuck now &#8211; what policy do I need to added when using RunWithElevatedPrivileges?<br />
Although I&#039;m not a newbie to sharepoint development &#8211; I&#039;m a newbie to using CAS. So I really would appreciate to get some help from you.</p>
<p>Regards,<br />
Oliver</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Waldek Mastykarz</title>
		<link>http://blog.mastykarz.nl/code-access-security-policy-template-visual-studio-2010-sharepoint-developer-tools/comment-page-1/#comment-68007</link>
		<dc:creator>Waldek Mastykarz</dc:creator>
		<pubDate>Thu, 27 Jan 2011 08:35:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mastykarz.nl/code-access-security-policy-template-visual-studio-2010-sharepoint-developer-tools/#comment-68007</guid>
		<description>@Jos: great to hear it&#039;s working. You&#039;re welcome :)</description>
		<content:encoded><![CDATA[<p>@Jos: great to hear it&#039;s working. You&#039;re welcome :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jos van Putte</title>
		<link>http://blog.mastykarz.nl/code-access-security-policy-template-visual-studio-2010-sharepoint-developer-tools/comment-page-1/#comment-68005</link>
		<dc:creator>Jos van Putte</dc:creator>
		<pubDate>Thu, 27 Jan 2011 08:15:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mastykarz.nl/code-access-security-policy-template-visual-studio-2010-sharepoint-developer-tools/#comment-68005</guid>
		<description>@Waldek: I found it.. I started a new solution (empty) and added a new item to it from the solution explorer. There were the new items from the power tools..
Thnaks for your help.</description>
		<content:encoded><![CDATA[<p>@Waldek: I found it.. I started a new solution (empty) and added a new item to it from the solution explorer. There were the new items from the power tools..<br />
Thnaks for your help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Waldek Mastykarz</title>
		<link>http://blog.mastykarz.nl/code-access-security-policy-template-visual-studio-2010-sharepoint-developer-tools/comment-page-1/#comment-68003</link>
		<dc:creator>Waldek Mastykarz</dc:creator>
		<pubDate>Thu, 27 Jan 2011 07:41:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mastykarz.nl/code-access-security-policy-template-visual-studio-2010-sharepoint-developer-tools/#comment-68003</guid>
		<description>@Jos: Did you install Visual Studio 2010 SharePoint Power Tools? There are other Power Tools as well so you have to check the ones you&#039;ve got are the ones for SharePoint.</description>
		<content:encoded><![CDATA[<p>@Jos: Did you install Visual Studio 2010 SharePoint Power Tools? There are other Power Tools as well so you have to check the ones you&#039;ve got are the ones for SharePoint.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jos van Putte</title>
		<link>http://blog.mastykarz.nl/code-access-security-policy-template-visual-studio-2010-sharepoint-developer-tools/comment-page-1/#comment-68002</link>
		<dc:creator>Jos van Putte</dc:creator>
		<pubDate>Thu, 27 Jan 2011 07:32:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mastykarz.nl/code-access-security-policy-template-visual-studio-2010-sharepoint-developer-tools/#comment-68002</guid>
		<description>Thank you. I thought it was a security problem..
(Sorry for the duplicate messages)

I found the power tools and installed them but it is still not possible to create a sandboxed visual web part project.</description>
		<content:encoded><![CDATA[<p>Thank you. I thought it was a security problem..<br />
(Sorry for the duplicate messages)</p>
<p>I found the power tools and installed them but it is still not possible to create a sandboxed visual web part project.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Waldek Mastykarz</title>
		<link>http://blog.mastykarz.nl/code-access-security-policy-template-visual-studio-2010-sharepoint-developer-tools/comment-page-1/#comment-67923</link>
		<dc:creator>Waldek Mastykarz</dc:creator>
		<pubDate>Wed, 26 Jan 2011 16:15:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mastykarz.nl/code-access-security-policy-template-visual-studio-2010-sharepoint-developer-tools/#comment-67923</guid>
		<description>@Jos: As the error says, you cannot deploy ASCX to CONTROLTEMPLATES in a Sandboxed Solution. Instead, you should be using the Visual Web Part Sandboxed that ships with the Visual Studio 2010 SharePoint Power Tools.</description>
		<content:encoded><![CDATA[<p>@Jos: As the error says, you cannot deploy ASCX to CONTROLTEMPLATES in a Sandboxed Solution. Instead, you should be using the Visual Web Part Sandboxed that ships with the Visual Studio 2010 SharePoint Power Tools.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

