<?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>Patrick's Bytes</title>
	<atom:link href="http://patrickyong.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://patrickyong.net</link>
	<description>Techie for the past 30 years...</description>
	<lastBuildDate>Fri, 20 Apr 2012 09:21:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Error 401 Unauthorized Exception with Managed Client Object Model on ASP.NET website</title>
		<link>http://patrickyong.net/2012/04/20/error-401-unauthorized-exception-with-managed-client-object-model-on-asp-net-website/</link>
		<comments>http://patrickyong.net/2012/04/20/error-401-unauthorized-exception-with-managed-client-object-model-on-asp-net-website/#comments</comments>
		<pubDate>Fri, 20 Apr 2012 09:21:05 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[Sharepoint]]></category>

		<guid isPermaLink="false">http://patrickyong.net/?p=1829</guid>
		<description><![CDATA[I am trying to access a file permission from a separate ASP.NET web application using Managed Client Object Model. Since I need to get the user&#8217;s permission I have to use CredentialCache.DefaultCredentials. Everything runs fine using Visual Studio debug mode &#8230; <a href="http://patrickyong.net/2012/04/20/error-401-unauthorized-exception-with-managed-client-object-model-on-asp-net-website/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I am trying to access a file permission from a separate ASP.NET web application using Managed Client Object Model. Since I need to get the user&#8217;s permission I have to use CredentialCache.DefaultCredentials. Everything runs fine using Visual Studio debug mode but I hit the following error when I host the site on IIS (same as SharePoint but difference web app)</p>
<p><code><br />
[WebException: The remote server returned an error: (401) Unauthorized.]<br />
DocViewer._default.Page_Load(Object sender, EventArgs e) in C:\Users\administrator\Documents\Visual Studio 2010\Projects\SharePointDocViewer\DocViewer\default.aspx.vb:174<br />
System.Web.UI.Control.OnLoad(EventArgs e) +132<br />
System.Web.UI.Control.LoadRecursive() +66<br />
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428<br />
</code></p>
<p>Most blogs on the web suggested instantiating a new NetworkCredential but that is not the way to go for my case.</p>
<p>I eventually solved the problem by setting the App Pool of the ASP.NET to be that of the SharePoint app pool. Below is fragment of my code using SPCOM.</p>
<p><code><br />
Using client As ClientContext = New ClientContext(Request.QueryString("portalUrl"))<br />
Try<br />
client.Credentials = System.Net.CredentialCache.DefaultCredentials<br />
Dim web = client.Web<br />
Dim file As SharePoint.File = web.GetFileByServerRelativeUrl(Request.QueryString("fileUrl"))<br />
Dim item As ListItem = file.ListItemAllFields</code></p>
<p>client.Load(item, Function(i) i.EffectiveBasePermissions)<br />
client.ExecuteQuery()</p>
]]></content:encoded>
			<wfw:commentRss>http://patrickyong.net/2012/04/20/error-401-unauthorized-exception-with-managed-client-object-model-on-asp-net-website/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>User Profile Synchronization Service cannot be started</title>
		<link>http://patrickyong.net/2012/02/14/user-profile-synchronization-service-cannot-be-started/</link>
		<comments>http://patrickyong.net/2012/02/14/user-profile-synchronization-service-cannot-be-started/#comments</comments>
		<pubDate>Tue, 14 Feb 2012 10:21:07 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Sharepoint]]></category>

		<guid isPermaLink="false">http://patrickyong.net/2012/02/14/user-profile-synchronization-service-cannot-be-started/</guid>
		<description><![CDATA[Just setup a new VM and I was having problem starting User Profile Synchronization Service for the passed few days despite following all the steps outline in TechNet. Finally I figured out the only thing different on my new VM &#8230; <a href="http://patrickyong.net/2012/02/14/user-profile-synchronization-service-cannot-be-started/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Just setup a new VM and I was having problem starting User Profile Synchronization Service for the passed few days despite following all the steps outline in <a href="http://technet.microsoft.com/en-us/library/ee721049.aspx">TechNet</a>. Finally I figured out the only thing different on my new VM is that the Windows User Account Control feature is enabled. </p>
<p>Everything works flawlessly now after I disable UAC and restart the server! <img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://patrickyong.net/wp-content/uploads/2012/02/wlEmoticon-smile.png" /></p>
]]></content:encoded>
			<wfw:commentRss>http://patrickyong.net/2012/02/14/user-profile-synchronization-service-cannot-be-started/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Like my WordPress theme?</title>
		<link>http://patrickyong.net/2011/12/28/like-my-wordpress-theme/</link>
		<comments>http://patrickyong.net/2011/12/28/like-my-wordpress-theme/#comments</comments>
		<pubDate>Wed, 28 Dec 2011 03:49:32 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://patrickyong.net/2011/12/28/like-my-wordpress-theme/</guid>
		<description><![CDATA[The WordPress theme used in my blog was taken from Joe McBride’s blog but offhand I couldn’t find the zip package. So if you are interested, please download mine and modify the sidebar.php accordingly with your profile info. http://patrickyong.net/metro-wp-theme.zip]]></description>
			<content:encoded><![CDATA[<p align="left"><img src="http://patrickyong.net/wp-content/themes/metro-wp-theme/screenshot.png" /></p>
<p>The WordPress theme used in my blog was taken from Joe McBride’s <a href="http://xamlcoder.com/blog/">blog</a> but offhand I couldn’t find the zip package. </p>
<p>So if you are interested, please download mine and modify the sidebar.php accordingly with your profile info.</p>
<p><a title="http://patrickyong.net/metro-wp-theme.zip" href="http://patrickyong.net/metro-wp-theme.zip">http://patrickyong.net/metro-wp-theme.zip</a></p>
]]></content:encoded>
			<wfw:commentRss>http://patrickyong.net/2011/12/28/like-my-wordpress-theme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Missing Microsoft.Web.Infrastructure</title>
		<link>http://patrickyong.net/2011/12/23/missing-microsoft-web-infrastructure/</link>
		<comments>http://patrickyong.net/2011/12/23/missing-microsoft-web-infrastructure/#comments</comments>
		<pubDate>Fri, 23 Dec 2011 06:37:20 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[ravendb]]></category>

		<guid isPermaLink="false">http://patrickyong.net/2011/12/23/missing-microsoft-web-infrastructure/</guid>
		<description><![CDATA[Products such as RavenDB which includes an option to deploy it as a IIS web service, however it has dependency on non core .NET Framework assemblies such as in my case Microsoft.Web.Infrastructure. If you do a clean install of IIS &#8230; <a href="http://patrickyong.net/2011/12/23/missing-microsoft-web-infrastructure/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Products such as RavenDB which includes an option to deploy it as a IIS web service, however it has dependency on non core .NET Framework assemblies such as in my case Microsoft.Web.Infrastructure.</p>
<p>If you do a clean install of IIS on Windows Server and try to deploy RavenDB, you will encounter a Microsoft.Web.Infrastructure.dll not found error.</p>
<p>To fix this just download the Web Platform Installer (<a href="http://microsoft.com/web">http://microsoft.com/web</a>) on your Windows Server and install the ASP.NET Web Pages component on your Windows Server</p>
<p><a href="http://patrickyong.net/wp-content/uploads/2011/12/ScreenClip35.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="ScreenClip(35)" border="0" alt="ScreenClip(35)" src="http://patrickyong.net/wp-content/uploads/2011/12/ScreenClip35_thumb.png" width="621" height="158" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://patrickyong.net/2011/12/23/missing-microsoft-web-infrastructure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Entity Framework Code First Migrations Beta 1 released</title>
		<link>http://patrickyong.net/2011/12/05/entity-framework-code-first-migrations-beta-1-released/</link>
		<comments>http://patrickyong.net/2011/12/05/entity-framework-code-first-migrations-beta-1-released/#comments</comments>
		<pubDate>Mon, 05 Dec 2011 11:17:36 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[General .NET Stuffs]]></category>
		<category><![CDATA[entityframework]]></category>

		<guid isPermaLink="false">http://patrickyong.net/2011/12/05/entity-framework-code-first-migrations-beta-1-released/</guid>
		<description><![CDATA[Got the news that the migration tool has been updated 5 days ago by the ADO.NET team. You can get the package from NuGet using the command Install-Package EntityFramework.Migrations or Update-Package EntityFramework.Migrations if you have Alpha 3 installed. Going forward &#8230; <a href="http://patrickyong.net/2011/12/05/entity-framework-code-first-migrations-beta-1-released/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Got the news that the migration tool has been updated 5 days ago by the ADO.NET team. </p>
<p>You can get the package from NuGet using the command Install-Package EntityFramework.Migrations or Update-Package EntityFramework.Migrations if you have Alpha 3 installed. Going forward the migration tool will be RTM’ed as part of Entity Framework 4.3.</p>
<p>For someone coming from Alpha, I see a few changes</p>
<p>1. Settings.cs inside Migration folder has been replaced with Configuration.cs. You have to delete the old Settings.ca file</p>
<p>2. ChangeColumn API is now called AlterColumn </p>
]]></content:encoded>
			<wfw:commentRss>http://patrickyong.net/2011/12/05/entity-framework-code-first-migrations-beta-1-released/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Procedure or function expects parameter &#8216;@something&#8217;, which was not supplied.</title>
		<link>http://patrickyong.net/2011/10/28/procedure-or-function-expects-parameter-something-which-was-not-supplied/</link>
		<comments>http://patrickyong.net/2011/10/28/procedure-or-function-expects-parameter-something-which-was-not-supplied/#comments</comments>
		<pubDate>Fri, 28 Oct 2011 10:52:08 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[General .NET Stuffs]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://patrickyong.net/2011/10/28/procedure-or-function-expects-parameter-something-which-was-not-supplied/</guid>
		<description><![CDATA[Where in actually fact I have already insert the parameter into my SQLCommand object. In the end I realize, the problem is not caused by the parameter but the SQLCommand.CommandType; which I had left out. Caused me 1 hour of &#8230; <a href="http://patrickyong.net/2011/10/28/procedure-or-function-expects-parameter-something-which-was-not-supplied/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Where in actually fact I have already insert the parameter into my SQLCommand object. In the end I realize, the problem is not caused by the parameter but the SQLCommand.CommandType; which I had left out. Caused me 1 hour of unproductive time to look for this. </p>
<p>Other common cause which I found online is the use of null value for paramters (especially OUTPUT parameters), you should actually use DBNull.Value. </p>
]]></content:encoded>
			<wfw:commentRss>http://patrickyong.net/2011/10/28/procedure-or-function-expects-parameter-something-which-was-not-supplied/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Cryptic WCF service not found error</title>
		<link>http://patrickyong.net/2011/10/24/cryptic-wcf-service-not-found-error/</link>
		<comments>http://patrickyong.net/2011/10/24/cryptic-wcf-service-not-found-error/#comments</comments>
		<pubDate>Mon, 24 Oct 2011 14:27:36 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[General .NET Stuffs]]></category>
		<category><![CDATA[sync framework]]></category>
		<category><![CDATA[WCF]]></category>

		<guid isPermaLink="false">http://patrickyong.net/2011/10/24/cryptic-wcf-service-not-found-error/</guid>
		<description><![CDATA[When your WCF service returns you the error “The type ‘MyNamespace.MyService’, provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found.” The common culprit will inside the .svc file, &#8230; <a href="http://patrickyong.net/2011/10/24/cryptic-wcf-service-not-found-error/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>When your WCF service returns you the error “<strong>The type ‘MyNamespace.MyService’, provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found</strong>.” The common culprit will inside the .svc file, you just double check the Code behind file or DLL are deployed in the bin folder. But one rarely known cause is that your WCF service can’t be activated due to missing dependency, which in my case today I realize I didn’t deploy the Sync Framework. So beware, WCF errors can be quite cryptic sometimes. </p>
]]></content:encoded>
			<wfw:commentRss>http://patrickyong.net/2011/10/24/cryptic-wcf-service-not-found-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Azure &#8220;Data Explorer&#8221; announced</title>
		<link>http://patrickyong.net/2011/10/20/sql-azure-data-explorer-announced/</link>
		<comments>http://patrickyong.net/2011/10/20/sql-azure-data-explorer-announced/#comments</comments>
		<pubDate>Thu, 20 Oct 2011 04:13:57 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[Azure]]></category>
		<category><![CDATA[sqlazure]]></category>

		<guid isPermaLink="false">http://patrickyong.net/2011/10/20/sql-azure-data-explorer-announced/</guid>
		<description><![CDATA[The SQL Azure team has announced that they are going to introduce a new feature for SQL Azure code named “Data Explorer” (code name should be named after animals and food!). From the product team’s blog, Data Explorer” is a &#8230; <a href="http://patrickyong.net/2011/10/20/sql-azure-data-explorer-announced/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The SQL Azure team has announced that they are going to introduce a new feature for SQL Azure code named “Data Explorer” (code name should be named after animals and food!). From the product team’s blog, Data Explorer” is a new concept which provides an innovative way to gain new insights from the data you care about. And the data you care about need not to be SQL Azure or SQL Server, they can be in any form such as Excel, file (unstructured) and Windows Azure Marketplace (list based)</p>
<p>My complain of traditional data analytics tools such as SQL Server Analysis Services is the lack of integration with external data source to provide more information about your data. So with “Data Explorer”, you can then discover additional data which you may need, as new datasets and data services from the <a href="https://datamarket.azure.com/">Windows Azure Marketplace</a> are automatically recommended for you</p>
<p>“Data Explorer” is not yet available yet but you can sign up for preview here. <a title="https://dataexplorer-signup.sqlazurelabs.com/" href="https://dataexplorer-signup.sqlazurelabs.com/">https://dataexplorer-signup.sqlazurelabs.com</a></p>
<p>For screenshots and detail explanations, check out the official blog <a title="http://blogs.msdn.com/b/dataexplorer/" href="http://blogs.msdn.com/b/dataexplorer/">http://blogs.msdn.com/b/dataexplorer/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://patrickyong.net/2011/10/20/sql-azure-data-explorer-announced/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>3rd Party DLL references missing after rebuild?</title>
		<link>http://patrickyong.net/2011/10/18/3rd-party-dll-references-missing-after-rebuild/</link>
		<comments>http://patrickyong.net/2011/10/18/3rd-party-dll-references-missing-after-rebuild/#comments</comments>
		<pubDate>Tue, 18 Oct 2011 08:39:51 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[General .NET Stuffs]]></category>

		<guid isPermaLink="false">http://patrickyong.net/2011/10/18/3rd-party-dll-references-missing-after-rebuild/</guid>
		<description><![CDATA[In Visual Studio 2010, target framework for console, Windows services, and WinForm app is .NET Framework 4.0 Client Profile. When you try to add DLLs such as the famous log4net, you will find VS complains about missing references where you &#8230; <a href="http://patrickyong.net/2011/10/18/3rd-party-dll-references-missing-after-rebuild/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In Visual Studio 2010, target framework for console, Windows services, and WinForm app is .NET Framework 4.0 Client Profile. When you try to add DLLs such as the famous log4net, you will find VS complains about missing references where you have already added log4net.dll. The problem lies with DLL such as log4net requires the full .NET Framework. So solve this just change the target framework.</p>
<p><a href="http://patrickyong.net/wp-content/uploads/2011/10/ScreenClip29.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="ScreenClip(29)" border="0" alt="ScreenClip(29)" src="http://patrickyong.net/wp-content/uploads/2011/10/ScreenClip29_thumb.png" width="512" height="319" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://patrickyong.net/2011/10/18/3rd-party-dll-references-missing-after-rebuild/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Awesome latest generation 4 data centre for Microsoft&#8217;s cloud services</title>
		<link>http://patrickyong.net/2011/10/17/awesome-latest-generation-4-data-centre-for-microsofts-cloud-services/</link>
		<comments>http://patrickyong.net/2011/10/17/awesome-latest-generation-4-data-centre-for-microsofts-cloud-services/#comments</comments>
		<pubDate>Mon, 17 Oct 2011 11:33:41 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[Azure]]></category>

		<guid isPermaLink="false">http://patrickyong.net/2011/10/17/awesome-latest-generation-4-data-centre-for-microsofts-cloud-services/</guid>
		<description><![CDATA[Microsoft don’t active talk about their datacentres especially what they have running inside. Even the team managing the centres known as Microsoft Global Foundation Services (but they have their own website!) doesn’t get much limelight for themself. But today I &#8230; <a href="http://patrickyong.net/2011/10/17/awesome-latest-generation-4-data-centre-for-microsofts-cloud-services/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Microsoft don’t active talk about their datacentres especially what they have running inside. Even the team managing the centres known as Microsoft Global Foundation Services (but they have their own <a href="http://www.globalfoundationservices.com/">website</a>!) doesn’t get much limelight for themself. But today I found out Dave Aiken has a blog post with a couple of videos on what is powering our Windows Azure instances. </p>
<p>Below is a video showing the inside of datacentres running not just Windows Azure but also the more familiar Windows Live (aka Hotmail), Office 365 and XBox Live. Also shown the Dublin datacentre running latest Generation 4 modular datacentre.</p>
<p>&#160;</p>
<p><iframe height="315" src="http://www.youtube.com/embed/hOxA1l1pQIw" frameborder="0" width="560" allowfullscreen="allowfullscreen"></iframe></p>
<p>Grab more videos here <a title="http://www.davidaiken.com/2011/10/07/our-datacenters-are-awesomeness-in-a-box/" href="http://www.davidaiken.com/2011/10/07/our-datacenters-are-awesomeness-in-a-box/">http://www.davidaiken.com/2011/10/07/our-datacenters-are-awesomeness-in-a-box/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://patrickyong.net/2011/10/17/awesome-latest-generation-4-data-centre-for-microsofts-cloud-services/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

