<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Edwin Vriethoff &#187; .NET</title>
	<atom:link href="http://edwin.vriethoff.net/category/net/feed/" rel="self" type="application/rss+xml" />
	<link>http://edwin.vriethoff.net</link>
	<description>Edwin Vriethoff</description>
	<lastBuildDate>Fri, 04 Jun 2010 06:16:41 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>SharePoint 2010 Mobile Web Part development</title>
		<link>http://edwin.vriethoff.net/2010/01/17/sharepoint-2010-mobile-web-part-development/</link>
		<comments>http://edwin.vriethoff.net/2010/01/17/sharepoint-2010-mobile-web-part-development/#comments</comments>
		<pubDate>Sun, 17 Jan 2010 20:15:13 +0000</pubDate>
		<dc:creator>Edwin Vriethoff</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[2010]]></category>
		<category><![CDATA[demo]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[web part]]></category>

		<guid isPermaLink="false">http://edwin.vriethoff.net/?p=321</guid>
		<description><![CDATA[ For a SharePoint 2010 demo i&#8217;m building a web part that should be accessible by Mobile devices. In SharePint 2010 all mobile devices are redirected by default to the mobile SharePoint rendering engine.
The mobile rendering engine of SharePoint provides mobile users access to the sites with a completely stripped interface. Its main function is [...]]]></description>
			<content:encoded><![CDATA[<p><img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="mobiledevice" src="http://edwin.vriethoff.net/wp-content/mobiledevice.jpg" border="0" alt="mobiledevice" width="125" height="137" align="left" /> For a SharePoint 2010 demo i&#8217;m building a web part that should be accessible by Mobile devices. In SharePint 2010 all mobile devices are redirected by default to the mobile SharePoint rendering engine.</p>
<p>The mobile rendering engine of SharePoint provides mobile users access to the sites with a completely stripped interface. Its main function is to list all libraries and to provide basic access to them. For wiki and blog sites the rendering engine also provides some content rendering.</p>
<p>To keep the amount of data as low as possible, almost all web parts are completely stripped from the mobile site. Only when a web part developer provided a special mobile version of the web part, the web part will be accessible in the interface and to keep the mobile screen as empty as possible, the user must first expand the web part via its title to see it.</p>
<p>Documentation about SharePoint Mobile development is provided at <a href="http://msdn.microsoft.com/en-us/library/ms464268(office.14).aspx" onclick="javascript:pageTracker._trackPageview('/outbound/article/msdn.microsoft.com');" target="_blank">MSDN</a>. At first it all looks quite complex, but building a mobile version of a web part is actually not that hard. Below I will explain the required steps with a &#8216;Hello world&#8217; example. For this sample I will not rename the default object names provided by the Visual Studio templates.</p>
<p><span id="more-321"></span><br />
<strong>Create a sample site</strong></p>
<p>In this sample we begin with a fresh empty site. Create a new “Blank Site” and call it “Mobile Demo”.</p>
<p><a href="http://edwin.vriethoff.net/wp-content/sp2010mobiledev_step1.jpg"  target="_blank"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Create a sample site" src="http://edwin.vriethoff.net/wp-content/sp2010mobiledev_step1_thumb.jpg" border="0" alt="Create a sample site" width="240" height="185" /></a></p>
<p><strong>Create a Visual Studio 2010 Visual Web Part Project</strong></p>
<p>Visual studio 2010 includes a full set of SharePoint templates. These templates automatically publish and debug the project to your SharePoint environment.</p>
<p>Start a new “Visual Web Part Project” and name it “MobileWebPartDemo”.</p>
<p><a href="http://edwin.vriethoff.net/wp-content/sp2010mobiledev_step2.jpg"  target="_blank"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Create a Visual Studio 2010 Visual Web Part Project" src="http://edwin.vriethoff.net/wp-content/sp2010mobiledev_step2_thumb.jpg" border="0" alt="Create a Visual Studio 2010 Visual Web Part Project" width="240" height="213" /></a></p>
<p><strong>Add a literal with the “hello world” message</strong></p>
<p>We will now create the normal SharePoint web part. We only show a sample message by adding a literal to the web part controls.</p>
<p>Open the class file “VisualWebPart1UserControl.ascx.cs” and add the following code to the load event:</p>
<div class="code">Literal litHello = new Literal();<br />
litHello.Text = &#8220;Hello World. This is the normal SharePoint web part.&#8221;;<br />
Controls.Add(litHello);</div>
<p><a href="http://edwin.vriethoff.net/wp-content/sp2010mobiledev_step3.jpg"  target="_blank"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Add a literal with the “hello world” message" src="http://edwin.vriethoff.net/wp-content/sp2010mobiledev_step3_thumb.jpg" border="0" alt="Add a literal with the “hello world” message" width="240" height="192" /></a></p>
<p><strong>Build and add the web part to the page</strong></p>
<p>Press F5 to compile and build the web part. Internet explorer will start. Browse to the “Mobile demo” sample site and open the default page in edit mode. Add a new web part. Inside the “Custom” category you will find our demo web part. Add “VisualWebPart1” to the page.</p>
<p><a href="http://edwin.vriethoff.net/wp-content/sp2010mobiledev_step4.jpg"  target="_blank"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Build and add the web part to the page" src="http://edwin.vriethoff.net/wp-content/sp2010mobiledev_step4_thumb.jpg" border="0" alt="Build and add the web part to the page" width="240" height="256" /></a></p>
<p><strong>Preview the site</strong></p>
<p>Exit the edit mode of the page. You will now see your site and the web part as normal users will see it.</p>
<p><a href="http://edwin.vriethoff.net/wp-content/sp2010mobiledev_step5.jpg"  target="_blank"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Preview the site" src="http://edwin.vriethoff.net/wp-content/sp2010mobiledev_step5_thumb.jpg" border="0" alt="Preview the site" width="240" height="256" /></a></p>
<p><strong>Preview the mobile site</strong></p>
<p>To view the web site in mobile view, type a “/m” after the normal site url. For example: “http://localhost/mobiledemo/m/”.</p>
<p>At this moment the website is rendered in the mobile view. But hey! We don’t see the web part we just published. This is because the engine strips all normal web parts to keep the data transfer as low as possible. Only mobile optimized web parts will be shown.</p>
<p><a href="http://edwin.vriethoff.net/wp-content/sp2010mobiledev_step6.jpg"  target="_blank"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Preview the mobile site" src="http://edwin.vriethoff.net/wp-content/sp2010mobiledev_step6_thumb.jpg" border="0" alt="Preview the mobile site" width="134" height="320" /></a></p>
<p><strong>Create the mobile (adapter) version of our web part</strong></p>
<p>To add our web part to the mobile version of the site we must provide SharePoint with a mobile optimized version of our web part. We do this by adding a new class. Microsoft calls this class an adapter.</p>
<p>Add a new class and name it “VisualWebPart1MobileAdapter.cs”. Note that we added the name of our web part in front and added the text “MobileAdapter” at the end.</p>
<p>Microsoft recommends to use the namespace “SharePoint. WebPartPages.MobileAdapters” so modify the namespace to use “MobileWebPartDemo.SharePoint.WebPartPages .MobileAdapters”.</p>
<p>Our class should inherit the “WebPartMobileAdapter” class.</p>
<p>The adapter does not use the “OnLoad” event. Instead it uses the “CreateControlsForDetailView” to render. Override this class and add the following code:</p>
<div class="code">Literal litHello = new Literal();<br />
litHello.Text = &#8220;Hello World. This is the Mobile version of the SharePoint web part.&#8221;;<br />
Controls.Add(litHello);</div>
<p><a href="http://edwin.vriethoff.net/wp-content/sp2010mobiledev_step7.jpg"  target="_blank"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Create the mobile (adapter) version of our web part" src="http://edwin.vriethoff.net/wp-content/sp2010mobiledev_step7_thumb.jpg" border="0" alt="Create the mobile (adapter) version of our web part" width="240" height="192" /></a></p>
<p><strong>Add the adapter to the safe controls</strong></p>
<p>SharePoint should know that the adapter web part is a safe control. We did not have to add the normal web part as safe control, because the project template already fixed this for use. However, we still have to add the mobile version.</p>
<p>Open the web.config file of your SharePoint IIS site (example: C:\inetpub\wwwroot\wss\VirtualDirectories\80) and add the line below into the safecontrols section. Replace the PublicKeyToken with your own key!</p>
<div class="code">&lt;SafeControl Assembly=&#8221;MobileWebPartDemo, Version=1.0.0.0, Culture=neutral, PublicKeyToken=41167d0e1c5a217f&#8221; namespace=&#8221;MobileWebPartDemo.SharePoint.WebPartPages.MobileAdapters&#8221; TypeName=&#8221;*&#8221; Safe=&#8221;True&#8221; SafeAgainstScript=&#8221;False&#8221; /&gt;</div>
<p><strong>Configure the compat.browser file to use our mobile web part</strong></p>
<p>SharePoint must be told that there is a mobile optimized version available for our web part. Basically we are going to tell SharePoint that if there is web part “Normal” on the page, it should load version “Mobile”. Without this configuration SharePoint would just strip our web part like before.</p>
<p>Inside your SharePoint IIS directory you will see a directory “App_Browsers” and inside that directory is a file called “compat.browser”. Load this file in the editor.</p>
<p>At the top of this file you will find a “controlAdapters” section. Add the line below to this section:</p>
<div class="code">&lt;adapter controlType=&#8221;MobileWebPartDemo.VisualWebPart1.VisualWebPart1, MobileWebPartDemo, Version=1.0.0.0, Culture=neutral, PublicKeyToken=41167d0e1c5a217f&#8221; adapterType=&#8221;MobileWebPartDemo.SharePoint .WebPartPages.MobileAdapters.VisualWebPart1MobileAdapter, MobileWebPartDemo, Version=1.0.0.0, Culture=neutral, PublicKeyToken=41167d0e1c5a217f&#8221; /&gt;</div>
<p>Again, replace the PublicKeyToken with your own key! Safe the configuration and exit the file.</p>
<p><a href="http://edwin.vriethoff.net/wp-content/sp2010mobiledev_step8.jpg"  target="_blank"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Configure the compat.browser file to use our mobile web part" src="http://edwin.vriethoff.net/wp-content/sp2010mobiledev_step8_thumb.jpg" border="0" alt="Configure the compat.browser file to use our mobile web part" width="240" height="184" /></a></p>
<p><strong>Rebuild the project and reload the mobile demo site</strong></p>
<p>We finished the required steps to provide SharePoint with a web part that is optimized for the mobile page. Press F5 to build and deploy our project and re-open the mobile view of our demo site. And wow it’s almost magic! The title of our web part has suddenly appeared.</p>
<p><a href="http://edwin.vriethoff.net/wp-content/sp2010mobiledev_step9.jpg"  target="_blank"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Rebuild the project and reload the mobile demo site" src="http://edwin.vriethoff.net/wp-content/sp2010mobiledev_step9_thumb.jpg" border="0" alt="Rebuild the project and reload the mobile demo site" width="134" height="320" /></a></p>
<p><strong>Expand the web part</strong></p>
<p>To keep the mobile screen as empty as possible, not all web parts are automatically visible. Just click the title of the web part and it will be rendered.</p>
<p><a href="http://edwin.vriethoff.net/wp-content/sp2010mobiledev_step10.jpg"  target="_blank"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Expand the web part" src="http://edwin.vriethoff.net/wp-content/sp2010mobiledev_step10_thumb.jpg" border="0" alt="Expand the web part" width="134" height="320" /></a></p>
<p>And that’s it. This is all the information required to start developing web parts for the SharePoint Mobile pages. Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://edwin.vriethoff.net/2010/01/17/sharepoint-2010-mobile-web-part-development/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Enable item scheduling by code</title>
		<link>http://edwin.vriethoff.net/2009/05/18/enable-item-scheduling-by-code/</link>
		<comments>http://edwin.vriethoff.net/2009/05/18/enable-item-scheduling-by-code/#comments</comments>
		<pubDate>Mon, 18 May 2009 19:29:48 +0000</pubDate>
		<dc:creator>Edwin Vriethoff</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[events]]></category>
		<category><![CDATA[item]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[reflector]]></category>
		<category><![CDATA[Schedule]]></category>

		<guid isPermaLink="false">http://edwin.vriethoff.net/?p=246</guid>
		<description><![CDATA[I’m developing a site template, which requires item scheduling on the page library. I don’t want our users to enable the item scheduling manually at the “_layouts/ ManageItemScheduling.aspx” page. Unfortunately I was not able to find any online documentation about how to do this with code. 
It required me to dig deeper and .Net reflector [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://edwin.vriethoff.net/wp-content/scheduletime.jpg" alt="Enable item scheduling by codee" title="Enable item scheduling by code" width="160" height="137" align="right" />I’m developing a site template, which requires item scheduling on the page library. I don’t want our users to enable the item scheduling manually at the “_layouts/ ManageItemScheduling.aspx” page. Unfortunately I was not able to find any online documentation about how to do this with code. </p>
<p>It required me to dig deeper and <a href="http://www.red-gate.com/products/reflector/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.red-gate.com');" target="_blank">.Net reflector</a> turned out to be the right way to go. Microsoft made a lot of the required functions internal, which means that we cannot access the functions from our own code. By analyzing the steps I was able to add item scheduling on the pages library with the code below. </p>
<p><strong>Step 1: Enable Moderation and Minor versions</strong><br />
To allow item scheduling, we must enable moderation and minor versions on the pages list.</p>
<div class="code">
SPWeb web = new SPSite(&#8221;http://web&#8221;).OpenWeb();<br />
SPList list = web.Lists["Pages"];</p>
<p>//Enable moderation and minor versions<br />
list.EnableModeration = true;<br />
list.EnableMinorVersions = true;<br />
list.Update();
</p></div>
<p><strong>Step 2: Register Scheduling Events</strong><br />
The item scheduling requires us to register 2 events.<br />
First we will retrieve the assembly and class information of the ScheduledItemEventReceiver and then we will create the 2 events.</p>
<div class="code">
//get type information<br />
Type scheduledItemType = typeof(Microsoft.SharePoint.Publishing.Internal.ScheduledItemEventReceiver);<br />
string assemblyName = scheduledItemType.Assembly.FullName.ToString();<br />
string className = scheduledItemType.FullName;</p>
<p>//Get the eventreceivers<br />
SPEventReceiverDefinitionCollection eventReceivers = list.EventReceivers;</p>
<p>//Register the updating event<br />
SPEventReceiverDefinition updateDef = eventReceivers.Add();<br />
updateDef.Name = &#8220;Item Updating Event Handler For Scheduling&#8221;;<br />
updateDef.Type = SPEventReceiverType.ItemUpdating;<br />
updateDef.Assembly = assemblyName;<br />
updateDef.Class = className;<br />
updateDef.Update();</p>
<p>//Register the added event<br />
SPEventReceiverDefinition addDef = eventReceivers.Add();<br />
addDef.Name = &#8220;Item Added Event Handler For Scheduling&#8221;;<br />
addDef.Type = SPEventReceiverType.ItemAdded;<br />
addDef.Assembly = assemblyName;<br />
addDef.Class = className;<br />
addDef.Update();
</p></div>
<p><strong>Step 3: Unhide the startdate and expirydate fields</strong><br />
The list already contains the startdate and expirydate fields, but they are hidden. With the following code we will unhide the fields.</p>
<div class="code">
//Get the field guids of the startdate and expirydate<br />
Guid startDateGuid = Microsoft.SharePoint.Publishing.FieldId.StartDate;<br />
Guid expiryDateGuid = Microsoft.SharePoint.Publishing.FieldId.ExpiryDate;</p>
<p>//update the visibility of the startdate<br />
SPField startDateField = list.Fields[startDateGuid];<br />
startDateField.Hidden = false;<br />
startDateField.Update();</p>
<p>//update the visibility of the expirydate<br />
SPField expiryDateField = list.Fields[expiryDateGuid];<br />
expiryDateField.Hidden = false;<br />
expiryDateField.Update();
</p></div>
<p>And that’s it. With these coding steps we enabled item scheduling at the Page library.</p>
]]></content:encoded>
			<wfw:commentRss>http://edwin.vriethoff.net/2009/05/18/enable-item-scheduling-by-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Connect the RSS web part with a SharePoint list or other advanced feed</title>
		<link>http://edwin.vriethoff.net/2009/01/14/connect-the-rss-web-part-with-a-sharepoint-list-or-other-advanced-feed/</link>
		<comments>http://edwin.vriethoff.net/2009/01/14/connect-the-rss-web-part-with-a-sharepoint-list-or-other-advanced-feed/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 18:26:29 +0000</pubDate>
		<dc:creator>Edwin Vriethoff</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[ashx]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[generic handler]]></category>
		<category><![CDATA[IHttpHandler]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[rss]]></category>
		<category><![CDATA[web part]]></category>

		<guid isPermaLink="false">http://edwin.vriethoff.net/?p=163</guid>
		<description><![CDATA[I wrote this blog to give a possible workaround for RSS Web Part problems with certain feeds.
Did you ever try to connect a list feed to a SharePoint RSS feed web part? Well, I did, and it doesn&#8217;t work. The web part returned me a redirect error on public Internet sites and an authentication problem [...]]]></description>
			<content:encoded><![CDATA[<p>I wrote this blog to give a possible workaround for RSS Web Part problems with certain feeds.</p>
<p>Did you ever try to connect a list feed to a SharePoint RSS feed web part? Well, I did, and it doesn&#8217;t work. The web part returned me a redirect error on public Internet sites and an authentication problem on secure Intranet sites.</p>
<p><center><img src="http://edwin.vriethoff.net/wp-content/rss_redirect_authentication_problems.jpg" alt="Connect the RSS web part with a SharePoint list or other advanced feed" title="Connect the RSS web part with a SharePoint list or other advanced feed" width="302" height="149" /></center></p>
<p>The RSS web part is not able to handle secure RSS connections. After some debugging the problem of the redirect error was found in the fact, that certain RSS feeds are trying to return a cookie, which a web part normally does not accept. Because the cookie is not set, the RSS generator keeps redirecting the download request.</p>
<p>The cookie and authentication problems do not only apply to the SharePoint list feed, but also to a lot of other feeds on the internet.</p>
<h2>The work around</h2>
<p>To get correct RSS feeds in the standard SharePoint RSS feed web part, I&#8217;ve chosen to develop a small &#8220;proxy&#8221; handler to access the feed in Visual Studio.<br />
<span id="more-163"></span><br />
To create the proxy, we&#8217;ll start with adding a &#8220;Generic handler&#8221; file to an empty web project. The generic handler item uses the extension .ashx. I won&#8217;t recommend using the normal &#8220;Web Form&#8221; (aspx) template, because it uses more resources than the simple handler. We simply don&#8217;t need all the page rendering technology of a web form to return some xml. Keep it light and simple!</p>
<p>The generic handler implements the IHttpHandler which defines 2 functions. The &#8220;IsReusable&#8221; boolean function is used to indicate if a single instantiation of our IHttpHandler can be used to process multiple concurrent requests. We will just leave this value on it&#8217;s default &#8220;false&#8221; value. The second function, the &#8220;ProcessRequest&#8221; function, is where all the magic happens.</p>
<p>In our &#8220;ProcessRequest&#8221; function we&#8217;ll add our code to download a RSS feed. Once we downloaded the feed we will pass it back to the browser or web part. Because we are controlling the download process of the RSS feed, we can now add additional code, that the standard web parts don&#8217;t have. We can add a cookie bag to accept cookies and we can set a higher redirect value to allow more redirects. If you bought a news RSS for your intranet which requires login credentials you would also be able to add them to the proxy code.</p>
<div class="code">namespace Example<br />
{<br />
 [WebService(Namespace = "http://edwin.vriethoff.net/")]<br />
 [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]<br />
 public class RSSFeed : IHttpHandler<br />
 {<br />
  public void ProcessRequest(HttpContext context)<br />
  {<br />
   XmlReader feedReader = null;<br />
   //Create and configure httpRequest<br />
   HttpWebRequest httpRequest = (HttpWebRequest)WebRequest<br />
   .Create(&#8221;http://rss.cnn.com/rss/cnn_topstories.rss&#8221;);<br />
   httpRequest.MaximumAutomaticRedirections = 15;<br />
   httpRequest.UserAgent = &#8220;Mozilla/4.0 (compatible; MSIE 6.0;<br />
   Windows NT 5.1)&#8221;;<br />
   httpRequest.CookieContainer = new CookieContainer();<br />
   //Set XMLReader settings<br />
   XmlReaderSettings readerSettings = new XmlReaderSettings();<br />
   readerSettings.IgnoreWhitespace = true;<br />
   //Download and load the feed<br />
   feedReader = XmlReader.Create(httpRequest<br />
   .GetResponse().GetResponseStream(), readerSettings);<br />
   XmlDocument rssDoc = new XmlDocument();<br />
   rssDoc.Load(feedReader);<br />
   //Output the xml<br />
   context.Response.ContentType = &#8220;text/xml&#8221;;<br />
   context.Response.Write(rssDoc.OuterXml);<br />
  } </p>
<p>  public bool IsReusable<br />
  {<br />
   get<br />
   {<br />
    return false;<br />
   }<br />
  }<br />
 }<br />
}</p></div>
<p>Of course, in our real project, we made the proxy a lot smarter. For example, I won&#8217;t recommend using a hardcoded RSS url inside the code.</p>
<p>If we host the proxy inside a secured SharePoint environment, there is a nasty little problem left; The standard RSS web part is not able to download RSS feeds that require login credentials. Because the proxy is located inside the secure SharePoint environment, IIS requests credentials from the web part. To fix this last step we have to tell IIS that the proxy file is allowed to be accessed anonymously.</p>
<p>Open the IIS manager on the server and locate the proxy file inside the web application. Now right-click the file and request it&#8217;s properties. Open the &#8220;File Security&#8221; tab and click the &#8220;Authentication and access control&#8221; Edit button. Just check the checkbox on the top to enable the anonymous access.</p>
<p><a href="http://edwin.vriethoff.net/wp-content/anonymous_feed_full.jpg"  target="_blank"><img title="anonymous setting" src="http://edwin.vriethoff.net/wp-content/anonymous_feed.jpg" border="0" alt="" width="375" height="364" /></a></p>
<p>That&#8217;s it, save the settings and reset IIS. Now we only have to point the RSS web part to the ashx http location, and the feed will be downloaded!</p>
]]></content:encoded>
			<wfw:commentRss>http://edwin.vriethoff.net/2009/01/14/connect-the-rss-web-part-with-a-sharepoint-list-or-other-advanced-feed/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>SPUserPoll &#8211; A new SharePoint poll Web Part in town</title>
		<link>http://edwin.vriethoff.net/2008/12/28/spuserpoll-a-new-sharepoint-poll-web-part-in-town/</link>
		<comments>http://edwin.vriethoff.net/2008/12/28/spuserpoll-a-new-sharepoint-poll-web-part-in-town/#comments</comments>
		<pubDate>Sun, 28 Dec 2008 16:07:33 +0000</pubDate>
		<dc:creator>Edwin Vriethoff</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[SPUserPoll]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Poll]]></category>
		<category><![CDATA[web part]]></category>

		<guid isPermaLink="false">http://edwin.vriethoff.net/?p=151</guid>
		<description><![CDATA[Today I released my first CodePlex project: the 0.1 version of my poll Web Part. I decided to develop this Web Part to improve my SharePoint skills and to learn more about SharePoint deployment.

The Web Part is called SPUserPoll and it allows site users to quickly create polls anywhere in the Site Collection. The poll [...]]]></description>
			<content:encoded><![CDATA[<p>Today I released my first <a href="http://spuserpoll.codeplex.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/spuserpoll.codeplex.com');" target="_blank">CodePlex</a> project: the 0.1 version of my poll Web Part. I decided to develop this Web Part to improve my SharePoint skills and to learn more about SharePoint deployment.</p>
<p><img src="http://edwin.vriethoff.net/wp-content/spuserpoll_webpart_screenshot.jpg" alt="SPUserPoll Screenshot" title="spuserpoll_web_part_screenshot" width="375" /></p>
<p>The Web Part is called SPUserPoll and it allows site users to quickly create polls anywhere in the Site Collection. The poll Web Part is designed to provide a user friendly interface: Important settings and actions are available from within the Web Part. There is no direct need to work with the SharePoint Web Part setting menu and poll data is managed from normal SharePoint lists. Administrators can manage and keep track of all created polls from a centralized list.<br />
<span id="more-151"></span><br />
I know that a standard SharePoint installation also comes with a polling mechanism as part of the Survey Lists, but these surveys are complicated and require quite some time to configure. The SPUserPoll Web Part allows users to setup a single topic poll within a few minutes.</p>
<p>This first release provides the basic functionality with text-based results. In later releases more functionality and bar &amp; pie charts will be provided. I hope to receive feedback from you on my project: wishes, ideas and tips for the project are welcome. My initial roadmap for the project is provided below. You can download the first release at <a href="http://spuserpoll.codeplex.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/spuserpoll.codeplex.com');" target="_blank">the CodePlex site</a>.</p>
<h1>Project roadmap:</h1>
<h2>Version 0.1</h2>
<p>Initial version</p>
<h2>Version 0.2</h2>
<p>Deployment of poll images<br />
Bar results<br />
Poll Closingdate<br />
Caching</p>
<h2>Version 0.3</h2>
<p>Multiple answers<br />
Input validation<br />
Anonymous voting<br />
Css file</p>
<h2>Version 0.4</h2>
<p>User customizable graph colors<br />
Multilanguage<br />
Remove attachments option from created poll lists</p>
<h2>Version 0.5</h2>
<p>Support for Internet sites<br />
Delete poll and the poll&#8217;s lists from the Admin list<br />
Print results<br />
Poll preview (before publishing)</p>
<h2>Version 0.6</h2>
<p>Pie results<br />
Option to hide the &#8220;show results&#8221; link before a user has voted</p>
<h2>Version 0.7</h2>
<p>Export poll data to csv/excel</p>
<h2>Version 1.0</h2>
<p>Documentation</p>
]]></content:encoded>
			<wfw:commentRss>http://edwin.vriethoff.net/2008/12/28/spuserpoll-a-new-sharepoint-poll-web-part-in-town/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Connecting web parts: The easy way</title>
		<link>http://edwin.vriethoff.net/2008/10/09/connecting-web-parts-the-easy-way/</link>
		<comments>http://edwin.vriethoff.net/2008/10/09/connecting-web-parts-the-easy-way/#comments</comments>
		<pubDate>Thu, 09 Oct 2008 15:38:55 +0000</pubDate>
		<dc:creator>Edwin Vriethoff</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[code example]]></category>
		<category><![CDATA[connect]]></category>
		<category><![CDATA[consumer]]></category>
		<category><![CDATA[interface]]></category>
		<category><![CDATA[provider]]></category>
		<category><![CDATA[string value]]></category>
		<category><![CDATA[web part]]></category>

		<guid isPermaLink="false">http://edwin.vriethoff.net/?p=131</guid>
		<description><![CDATA[Exactly one year ago (and wow I did not time this!) I posted a blog about &#8220;Connecting a web part with a standard SharePoint list&#8221;. For my current project I had to develop 2 web parts that could connect with each other.  
Since Moss2007 you can implement your own connection interface which enables you [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://edwin.vriethoff.net/wp-content/connecting_webparts_the_easy_way.jpg" alt="Connecting web parts the easy way" align="left" style="margin-right:12px;" />Exactly one year ago (and wow I did not time this!) I posted a blog about <a href="/2007/10/09/connecting-a-web-part-with-a-standard-sharepoint-list/" target="_blank">&#8220;Connecting a web part with a standard SharePoint list&#8221;</a>. For my current project I had to develop 2 web parts that could connect with each other.  </p>
<p>Since Moss2007 you can implement your own connection interface which enables you to connect customized web parts. It looks like you can basically transfer any serializable information. </p>
<p>The first thing you have to do is to define a very simple interface. The second step is to inherit the interface at the web part class that sends the information. In this class you&#8217;ll have to assign the interface as the connection interface. The last step in the provider web part is to include the &#8220;get function&#8221; described by the interface to pass the value.</p>
<p>In our consumer web part we have to retrieve the connection interface. Once this connection has been setup we can read and use the given value.</p>
<p>In the example code we will use the interface with the name &#8220;IMossStringConnection&#8221; to pass a string value.</p>
<p><span id="more-131"></span>Our web part and interface that provides our custom value:</p>
<div class="code">
namespace Sample.Code<br />
{<br />
&nbsp;/// <summary><br />
&nbsp;/// Our custom interface<br />
&nbsp;/// </summary><br />
&nbsp;public interface IMossStringConnection<br />
&nbsp;{<br />
&nbsp;&nbsp;string ProvidedString { get;}<br />
&nbsp;}</p>
<p>&nbsp;/// <summary><br />
&nbsp;/// Web Part Class<br />
&nbsp;/// </summary><br />
&nbsp;public class ProviderWebPart : WebPartBase, IMossStringConnection<br />
&nbsp;{<br />
&nbsp;&nbsp;&#8230;.WEB PART CODE&#8230;.</p>
<p>&nbsp;&nbsp;//We start our connection provider here. The property name is the name <br/>&nbsp;&nbsp;SharePoint will show in the connection menu (Called UserID in our image<br/>&nbsp;&nbsp;example).<br />
&nbsp;&nbsp;[ConnectionProvider("PropertyName")]<br />
&nbsp;&nbsp;public IMossStringConnection ConnectionInterface()<br />
&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;return this;<br />
&nbsp;&nbsp;}</p>
<p>&nbsp;&nbsp;//function to provide our value<br />
&nbsp;&nbsp;public string ProvidedString<br />
&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;get<br />
&nbsp;&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return &#8220;Example value&#8221;;<br />
&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;}<br />
&nbsp;}<br />
}
</p></div>
<p><img src="http://edwin.vriethoff.net/wp-content/provider_and_consumer_web_part.jpg" alt="The web part shows the property name (UserID) in the connection menu." /></p>
<p>And here is the code for the web part that consumes the provided value:</p>
<div class="code">
namespace Sample.Code<br />
{<br />
&nbsp;/// <summary><br />
&nbsp;/// Web Part to consume the value<br />
&nbsp;/// </summary><br />
&nbsp;public class ConsumerWebPart : WebPartBase<br />
&nbsp;{<br />
&nbsp;&nbsp;&#8230;.WEB PART CODE&#8230;.</p>
<p>&nbsp;&nbsp;IMossStringConnection m_providerPart = null;</p>
<p>&nbsp;&nbsp;/// <summary><br />
&nbsp;&nbsp;/// Encapsulate the interface<br />
&nbsp;&nbsp;/// </summary><br />
&nbsp;&nbsp;public IMossStringConnection ProviderPart<br />
&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;get { return m_providerPart; }<br />
&nbsp;&nbsp;&nbsp;set { m_providerPart = value; }<br />
&nbsp;&nbsp;}</p>
<p>&nbsp;&nbsp;//We start our connection consumer here. The property name is the name<br/>&nbsp;&nbsp;SharePoint will show in the connection menu (Called UserID in our image<br/>&nbsp;&nbsp;example).<br />
&nbsp;&nbsp;[ConnectionConsumer("Property")]<br />
&nbsp;&nbsp;public void GetConnectionInterface(IMossStringConnection providerPart)<br />
&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;ProviderPart = providerPart;<br />
&nbsp;&nbsp;&nbsp;//Now we can retrieve the value of the other web part<br />
&nbsp;&nbsp;&nbsp;string retrieveValue = ProviderPart.ProvidedString;<br />
&nbsp;&nbsp;}<br />
&nbsp;}<br />
}
</div>
<p>And that&#8217;s basically all the code you need to implement. Just copy and paste it in your web parts and have some fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://edwin.vriethoff.net/2008/10/09/connecting-web-parts-the-easy-way/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
