<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Musings on Education and Technology</title>
	<atom:link href="http://jefferytay.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://jefferytay.wordpress.com</link>
	<description>Listing my findings on technology and the usage of technology in education</description>
	<lastBuildDate>Wed, 23 May 2012 14:16:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='jefferytay.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Musings on Education and Technology</title>
		<link>http://jefferytay.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://jefferytay.wordpress.com/osd.xml" title="Musings on Education and Technology" />
	<atom:link rel='hub' href='http://jefferytay.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Enabling dual date format output for JSON.NET</title>
		<link>http://jefferytay.wordpress.com/2012/05/09/enabling-dual-date-format-output-for-json-net/</link>
		<comments>http://jefferytay.wordpress.com/2012/05/09/enabling-dual-date-format-output-for-json-net/#comments</comments>
		<pubDate>Wed, 09 May 2012 00:45:36 +0000</pubDate>
		<dc:creator>kwanann</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[ASP.NET]]></category>

		<guid isPermaLink="false">https://jefferytay.wordpress.com/?p=467</guid>
		<description><![CDATA[&#160; By default the JSON.Net library will emit all dates using the ISO Date format e.g &#34;2012-05-09T00:00:00Z&#34;, but Microsoft’s JSON formatter for date will emit using Microsoft’s own format “new Date(1234656000000)” &#160; Problem comes in when you have previously been using Microsoft’s JSON formatter and now want to use JSON.NET’s implementation. You will then have [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jefferytay.wordpress.com&#038;blog=8893556&#038;post=467&#038;subd=jefferytay&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>&#160;</p>
<p>By default the JSON.Net library will emit all dates using the ISO Date format e.g &quot;2012-05-09T00:00:00Z&quot;, but Microsoft’s JSON formatter for date will emit using Microsoft’s own format “new Date(1234656000000)”</p>
<p>&#160;</p>
<p>Problem comes in when you have previously been using Microsoft’s JSON formatter and now want to use JSON.NET’s implementation. You will then have to decide whether you want to use the new format and change all your existing apps, or use the old format and make it slightly less interoperable.</p>
<p>&#160;</p>
<p>One other alternative which I’m going to suggest below is to emit <strong>both</strong> date types, and suffix the other date property with a “_js” to differentiate between the 2 dates</p>
<p><a href="http://jefferytay.files.wordpress.com/2012/05/image.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image" border="0" alt="image" src="http://jefferytay.files.wordpress.com/2012/05/image_thumb.png?w=525&h=45" width="525" height="45" /></a></p>
<p>&#160;</p>
<p>To get this to work, just follow the steps below</p>
<ol>
<li>Download the latest JSON.NET library at <a href="http://json.codeplex.com/">http://json.codeplex.com/</a> </li>
<li>Open the solution and goto the Newtonsoft.Json project      <br /><a href="http://jefferytay.files.wordpress.com/2012/05/image1.png"><img style="background-image:none;margin:0;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image" border="0" alt="image" src="http://jefferytay.files.wordpress.com/2012/05/image_thumb1.png?w=212&h=240" width="212" height="240" /></a> </li>
<li>Open JsonSerializerInternalWriter.cs </li>
<li>Search for the following function      <br /><strong>private void WriteMemberInfoProperty(JsonWriter writer, object memberValue, JsonProperty property, JsonContract contract, JsonContainerContract collectionContract)
<p></strong><em>This function is the primary function that writes out the JSON output based what you passed in to serialize</em> </li>
<li>The function should look something like      <br /><a href="http://jefferytay.files.wordpress.com/2012/05/image2.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image" border="0" alt="image" src="http://jefferytay.files.wordpress.com/2012/05/image_thumb2.png?w=512&h=330" width="512" height="330" /></a> </li>
<li>What we are targeting is the last 2 lines of the function i.e      <br /> <br />
<blockquote>
<p>writer.WritePropertyName(propertyName);          <br />SerializeValue(writer, memberValue, contract, property, collectionContract, null);</p>
</blockquote>
</li>
<li>Change these 2 lines of code to
<p>//Ensure membervalue is not null and is a datetime type</li>
<p>if (memberValue != null &amp;&amp; memberValue.GetType() == typeof(DateTime))     <br />{      <br />&#160;&#160;&#160; //Default property uses Microsoft Date Format      <br />&#160;&#160;&#160; writer.WritePropertyName(propertyName);      <br />&#160;&#160;&#160; writer.DateFormatHandling = DateFormatHandling.MicrosoftDateFormat;      <br />&#160;&#160;&#160; SerializeValue(writer, memberValue, contract, property, collectionContract, null);</p>
<p>&#160;&#160;&#160; //Same property with a _js returns a ISO Date Format     <br />&#160;&#160;&#160; writer.WritePropertyName(propertyName + &quot;_js&quot;);      <br />&#160;&#160;&#160; writer.DateFormatHandling = DateFormatHandling.IsoDateFormat;      <br />&#160;&#160;&#160; SerializeValue(writer, memberValue, contract, property, collectionContract, null);      <br />}      <br />else      <br />{      <br />&#160;&#160;&#160; //Original implementation&#160; <br />&#160;&#160;&#160; writer.WritePropertyName(propertyName);      <br />&#160;&#160;&#160; SerializeValue(writer, memberValue, contract, property, collectionContract, null);      <br />}</p>
<li>Compile the project and copy the new json.net dll to your server</li>
<li>Test and make sure you see both dates being emitted     </li>
</ol>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jefferytay.wordpress.com/467/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jefferytay.wordpress.com/467/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jefferytay.wordpress.com/467/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jefferytay.wordpress.com/467/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jefferytay.wordpress.com/467/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jefferytay.wordpress.com/467/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jefferytay.wordpress.com/467/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jefferytay.wordpress.com/467/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jefferytay.wordpress.com/467/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jefferytay.wordpress.com/467/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jefferytay.wordpress.com/467/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jefferytay.wordpress.com/467/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jefferytay.wordpress.com/467/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jefferytay.wordpress.com/467/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jefferytay.wordpress.com&#038;blog=8893556&#038;post=467&#038;subd=jefferytay&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jefferytay.wordpress.com/2012/05/09/enabling-dual-date-format-output-for-json-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/27d3f15ba9242eae1078607670d81806?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kwanann</media:title>
		</media:content>

		<media:content url="http://jefferytay.files.wordpress.com/2012/05/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://jefferytay.files.wordpress.com/2012/05/image_thumb1.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://jefferytay.files.wordpress.com/2012/05/image_thumb2.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Windows Identity Foundation&#8211;Updating an expired issuer certificate</title>
		<link>http://jefferytay.wordpress.com/2012/05/03/windows-identity-foundationupdating-an-expired-issuer-certificate/</link>
		<comments>http://jefferytay.wordpress.com/2012/05/03/windows-identity-foundationupdating-an-expired-issuer-certificate/#comments</comments>
		<pubDate>Thu, 03 May 2012 03:55:59 +0000</pubDate>
		<dc:creator>kwanann</dc:creator>
				<category><![CDATA[ASP.NET]]></category>

		<guid isPermaLink="false">https://jefferytay.wordpress.com/?p=459</guid>
		<description><![CDATA[Because Windows Identity Foundation (aka STS) requires a non expired certificate to work, when a certificate expires, you will start getting errors such as ID4175: The issuer of the security token was not recognized by the IssuerNameRegistry. To accept security tokens from this issuer, configure the IssuerNameRegistry to return a valid name for this issuer. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jefferytay.wordpress.com&#038;blog=8893556&#038;post=459&#038;subd=jefferytay&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Because Windows Identity Foundation (aka STS) requires a non expired certificate to work, when a certificate expires, you will start getting errors such as</p>
<blockquote><p>ID4175: The issuer of the security token was not recognized by the IssuerNameRegistry. To accept security tokens from this issuer, configure the IssuerNameRegistry to return a valid name for this issuer. </p>
</blockquote>
<p>There are quite a few steps to fix this if you are running your own STS provider</p>
<p>&#160;</p>
<p>For the STS provider</p>
<ol>
<li>Start up Management Console (mmc.exe)</li>
<li>Add the Certificates Snap In for Computer Account (Add/Remove Snap In, Select Certificates, Computer Account)</li>
<li>Import the new certificate into the Personal\Certificate Branch (right click, import)     <br /><strong>IMPORTANT: Make sure the certificate which you are importing has the private key inside</strong></li>
<li><strong>Type out </strong>the thumbprint (Details\Thumbprint).       <br /><strong>IMPORTANT: DO NOT COPY AND PASTE, this will cause the same error to occur</strong></li>
</ol>
<p>For the STS Consumer</p>
<ol>
<ol>
<ol>
<li>Update the Federation Metadata, using the command below         </p>
<p>&quot;C:\Program Files (x86)\Windows Identity Foundation SDK\v4.0\FedUtil.exe&quot; /u &quot;[PATH to Web.config]&quot; /o &quot;[Path to Log File]&quot; /m &quot;[Federation Metadata Location]&quot;          </p>
<p>eg: &quot;C:\Program Files (x86)\Windows Identity Foundation SDK\v4.0\FedUtil.exe&quot; /u &quot;D:\Websites\sts\web.config&quot; /o &quot;D:\Websites\sts\UpdateLog.txt&quot; /m <a href="https://stsprovider/FederationMetadata/2007-06/FederationMetadata.xml">https://stsprovider/FederationMetadata/2007-06/FederationMetadata.xml</a></li>
<li>Paste and replace the <strong><u>typed</u></strong> thumbprint from the provider inside the web.config file (microsoft.identitymodel –&gt; service –&gt; issuerNameRegistry –&gt; trustedIssuers)</li>
<li>Save and test</li>
</ol>
</ol>
</ol>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jefferytay.wordpress.com/459/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jefferytay.wordpress.com/459/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jefferytay.wordpress.com/459/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jefferytay.wordpress.com/459/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jefferytay.wordpress.com/459/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jefferytay.wordpress.com/459/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jefferytay.wordpress.com/459/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jefferytay.wordpress.com/459/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jefferytay.wordpress.com/459/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jefferytay.wordpress.com/459/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jefferytay.wordpress.com/459/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jefferytay.wordpress.com/459/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jefferytay.wordpress.com/459/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jefferytay.wordpress.com/459/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jefferytay.wordpress.com&#038;blog=8893556&#038;post=459&#038;subd=jefferytay&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jefferytay.wordpress.com/2012/05/03/windows-identity-foundationupdating-an-expired-issuer-certificate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/27d3f15ba9242eae1078607670d81806?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kwanann</media:title>
		</media:content>
	</item>
		<item>
		<title>.NET Stack Trace</title>
		<link>http://jefferytay.wordpress.com/2012/04/19/net-stack-trace/</link>
		<comments>http://jefferytay.wordpress.com/2012/04/19/net-stack-trace/#comments</comments>
		<pubDate>Thu, 19 Apr 2012 09:15:18 +0000</pubDate>
		<dc:creator>kwanann</dc:creator>
				<category><![CDATA[ASP.NET]]></category>

		<guid isPermaLink="false">https://jefferytay.wordpress.com/?p=457</guid>
		<description><![CDATA[To get the current Stack Trace, use the following function var s = new System.Diagnostics.StackTrace(); And to access the stack frames, look at the GetFrames() function &#160; Finally if you need to know what is the current class and function name, you can use var theMethod = s.GetFrames().First().GetMethod(); var theClassDotMethod = theMethod.ReflectedType + &#34;.&#34; + [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jefferytay.wordpress.com&#038;blog=8893556&#038;post=457&#038;subd=jefferytay&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>To get the current Stack Trace, use the following function</p>
<blockquote><p>var s = new System.Diagnostics.StackTrace();</p>
</blockquote>
<p>And to access the stack frames, look at the GetFrames() function</p>
<p>&#160;</p>
<p>Finally if you need to know what is the current class and function name, you can use</p>
<blockquote><p><font>var theMethod = s.GetFrames().First().GetMethod();</font></p>
<p>var theClassDotMethod = theMethod.ReflectedType + &quot;.&quot; + theMethod.Name</p>
</blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jefferytay.wordpress.com/457/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jefferytay.wordpress.com/457/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jefferytay.wordpress.com/457/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jefferytay.wordpress.com/457/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jefferytay.wordpress.com/457/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jefferytay.wordpress.com/457/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jefferytay.wordpress.com/457/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jefferytay.wordpress.com/457/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jefferytay.wordpress.com/457/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jefferytay.wordpress.com/457/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jefferytay.wordpress.com/457/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jefferytay.wordpress.com/457/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jefferytay.wordpress.com/457/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jefferytay.wordpress.com/457/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jefferytay.wordpress.com&#038;blog=8893556&#038;post=457&#038;subd=jefferytay&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jefferytay.wordpress.com/2012/04/19/net-stack-trace/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/27d3f15ba9242eae1078607670d81806?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kwanann</media:title>
		</media:content>
	</item>
		<item>
		<title>System Centre 2012 Prerequisites</title>
		<link>http://jefferytay.wordpress.com/2012/04/12/system-centre-2012-prerequisites/</link>
		<comments>http://jefferytay.wordpress.com/2012/04/12/system-centre-2012-prerequisites/#comments</comments>
		<pubDate>Thu, 12 Apr 2012 07:10:25 +0000</pubDate>
		<dc:creator>kwanann</dc:creator>
				<category><![CDATA[System Centre 2012]]></category>

		<guid isPermaLink="false">https://jefferytay.wordpress.com/?p=455</guid>
		<description><![CDATA[Below is the list of all the prerequisites for System Centre 2012 along with the steps on how to get the required files Microsoft.NET Framework 4 Extended Just click on the download link Microsoft Report Viewer Redistributable 2008 Click on the download link, you will need to put it in a separate folder from the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jefferytay.wordpress.com&#038;blog=8893556&#038;post=455&#038;subd=jefferytay&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Below is the list of all the prerequisites for System Centre 2012 along with the steps on how to get the required files</p>
<p><strong>Microsoft.NET Framework 4 Extended</strong></p>
<ul>
<li>Just click on the download link</li>
</ul>
<p><strong>Microsoft Report Viewer Redistributable 2008</strong></p>
<ul>
<li>Click on the download link, you will need to put it in a separate folder from the next item since both have the same filename</li>
</ul>
<p><strong>Microsoft Report Viewer Redistributable 2010</strong></p>
<ul>
<li>Click on the download link, you will need to put it in a separate folder from the above item since both have the same filename</li>
</ul>
<p><strong>Microsoft SQL Server 2008 R2</strong></p>
<ul>
<li>All the files in whichever version of SQL 2008 R2 you are using (typically all files in the iso)</li>
<p>   <a href="http://jefferytay.files.wordpress.com/2012/04/image3.png"><img style="background-image:none;border-bottom:0;border-left:0;padding-left:0;padding-right:0;display:inline;border-top:0;border-right:0;padding-top:0;" title="image" border="0" alt="image" src="http://jefferytay.files.wordpress.com/2012/04/image_thumb3.png?w=561&h=338" width="561" height="338" /></a></ul>
<p><strong>Microsoft SQL Server 2008 R2 Native Client</strong></p>
<ul>
<li>Just click on the download link</li>
</ul>
<p><strong>Windows Automated Installation Kit</strong></p>
<ul>
<li>Just click on the download link</li>
</ul>
<p><strong>Microsoft SQL Server 2008 R2 Analysis Management Objects</strong></p>
<ul>
<li>Just click on the download link</li>
</ul>
<p><strong>Microsoft SQL Server 2008 R2 Command Line Utilities</strong></p>
<ul>
<li>Just click on the download link</li>
</ul>
<p><strong>Microsoft SQL Server 2008 R2 Service Pack 1</strong></p>
<ul>
<li>Click on the download link</li>
<li>Extract all the files into a folder, point to the folder</li>
</ul>
<p><strong>Microsoft SQL Server 2008 R2 Cumulative Update 4</strong></p>
<ul>
<li>Click on the download link to request for the actual links to be emailed to you</li>
<li>It is the one which is about 350MB</li>
<li>Once you download the file (441824_intl_x64_zip), unzip it to extract out the executable file</li>
<li>Extract the file (SQLServer2008R2-KB2633146-x64.exe) in the executable file into another folder</li>
<li>Point to this folder</li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jefferytay.wordpress.com/455/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jefferytay.wordpress.com/455/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jefferytay.wordpress.com/455/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jefferytay.wordpress.com/455/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jefferytay.wordpress.com/455/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jefferytay.wordpress.com/455/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jefferytay.wordpress.com/455/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jefferytay.wordpress.com/455/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jefferytay.wordpress.com/455/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jefferytay.wordpress.com/455/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jefferytay.wordpress.com/455/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jefferytay.wordpress.com/455/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jefferytay.wordpress.com/455/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jefferytay.wordpress.com/455/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jefferytay.wordpress.com&#038;blog=8893556&#038;post=455&#038;subd=jefferytay&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jefferytay.wordpress.com/2012/04/12/system-centre-2012-prerequisites/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/27d3f15ba9242eae1078607670d81806?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kwanann</media:title>
		</media:content>

		<media:content url="http://jefferytay.files.wordpress.com/2012/04/image_thumb3.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>System Centre 2012 Unified Installer : Fix for The WinRM settings are not configured correctly</title>
		<link>http://jefferytay.wordpress.com/2012/04/12/system-centre-2012-unified-installer-fix-for-the-winrm-settings-are-not-configured-correctly/</link>
		<comments>http://jefferytay.wordpress.com/2012/04/12/system-centre-2012-unified-installer-fix-for-the-winrm-settings-are-not-configured-correctly/#comments</comments>
		<pubDate>Thu, 12 Apr 2012 03:11:53 +0000</pubDate>
		<dc:creator>kwanann</dc:creator>
				<category><![CDATA[System Centre 2012]]></category>
		<category><![CDATA[Windows Server]]></category>

		<guid isPermaLink="false">https://jefferytay.wordpress.com/?p=451</guid>
		<description><![CDATA[&#160; When installing System Centre 2012 Unified Installer on a Windows 2008 R2 machine, you might encounter the following error &#160; To fix this, first ensure that your administrator account has a password. Next fire up a command prompt with Administrator rights and run the following commands reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v LocalAccountTokenFilterPolicy /t REG_DWORD /d [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jefferytay.wordpress.com&#038;blog=8893556&#038;post=451&#038;subd=jefferytay&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>&#160;</p>
<p>When installing System Centre 2012 Unified Installer on a Windows 2008 R2 machine, you might encounter the following error</p>
<p><a href="http://jefferytay.files.wordpress.com/2012/04/image2.png"><img style="background-image:none;border-bottom:0;border-left:0;padding-left:0;padding-right:0;display:inline;border-top:0;border-right:0;padding-top:0;" title="image" border="0" alt="image" src="http://jefferytay.files.wordpress.com/2012/04/image_thumb2.png?w=377&h=169" width="377" height="169" /></a></p>
<p>&#160;</p>
<p>To fix this, first <strong>ensure that your administrator account has a password</strong>.</p>
<p>Next fire up a command prompt with Administrator rights and run the following commands</p>
<blockquote><p>reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f</p>
</blockquote>
<p>&gt;reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f   <br />The operation completed successfully.    </p>
<blockquote><p>winrm qc -q</p>
</blockquote>
<p>&gt;winrm qc -q   <br />WinRM is not set up to receive requests on this machine.    <br />The following changes must be made:</p>
<p>Start the WinRM service.</p>
<p>WinRM has been updated to receive requests.</p>
<p>WinRM service started.   <br />WinRM is not set up to allow remote access to this machine for management.    <br />The following changes must be made:</p>
<p>Create a WinRM listener on <a href="http://*">HTTP://*</a> to accept WS-Man requests to any IP on this    <br />machine.    <br />Enable the WinRM firewall exception.</p>
<p>WinRM has been updated for remote management.</p>
<p>Created a WinRM listener on <a href="http://*">HTTP://*</a> to accept WS-Man requests to any IP on this    <br /> machine.    <br />WinRM firewall exception enabled.</p>
<p>&#160;</p>
<blockquote><p>winrm set winrm/config/service/auth @{CredSSP=&quot;True&quot;}     </p>
</blockquote>
<p>&gt;winrm set winrm/config/service/auth @{CredSSP=&quot;True&quot;}   <br />Auth    <br />&#160;&#160;&#160; Basic = false    <br />&#160;&#160;&#160; Kerberos = true    <br />&#160;&#160;&#160; Negotiate = true    <br />&#160;&#160;&#160; Certificate = false    <br />&#160;&#160;&#160; CredSSP = true    <br />&#160;&#160;&#160; CbtHardeningLevel = Relaxed</p>
<blockquote><p>winrm set winrm/config/winrs @{AllowRemoteShellAccess=&quot;True&quot;}</p>
</blockquote>
<p>&gt;winrm set winrm/config/winrs @{AllowRemoteShellAccess=&quot;True&quot;}   <br />Winrs    <br />&#160;&#160;&#160; AllowRemoteShellAccess = true    <br />&#160;&#160;&#160; IdleTimeout = 180000    <br />&#160;&#160;&#160; MaxConcurrentUsers = 5    <br />&#160;&#160;&#160; MaxShellRunTime = 2147483647    <br />&#160;&#160;&#160; MaxProcessesPerShell = 15    <br />&#160;&#160;&#160; MaxMemoryPerShellMB = 150    <br />&#160;&#160;&#160; MaxShellsPerUser = 5</p>
<blockquote><p>winrm set winrm/config/winrs @{MaxMemoryPerShellMB=&quot;2048&quot;}     </p>
</blockquote>
<p>&gt;winrm set winrm/config/winrs @{MaxMemoryPerShellMB=&quot;2048&quot;}    <br />Winrs    <br />&#160;&#160;&#160; AllowRemoteShellAccess = true    <br />&#160;&#160;&#160; IdleTimeout = 180000    <br />&#160;&#160;&#160; MaxConcurrentUsers = 5    <br />&#160;&#160;&#160; MaxShellRunTime = 2147483647    <br />&#160;&#160;&#160; MaxProcessesPerShell = 15    <br />&#160;&#160;&#160; MaxMemoryPerShellMB = 2048    <br />&#160;&#160;&#160; MaxShellsPerUser = 5</p>
<blockquote><p>winrm set winrm/config/client @{TrustedHosts=&quot;*&quot;}</p>
</blockquote>
<p>&gt;winrm set winrm/config/client @{TrustedHosts=&quot;*&quot;}</p>
<p>Client   <br />&#160;&#160;&#160; NetworkDelayms = 5000    <br />&#160;&#160;&#160; URLPrefix = wsman    <br />&#160;&#160;&#160; AllowUnencrypted = false    <br />&#160;&#160;&#160; Auth    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; Basic = true    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; Digest = true    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; Kerberos = true    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; Negotiate = true    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; Certificate = true    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; CredSSP = false    <br />&#160;&#160;&#160; DefaultPorts    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; HTTP = 5985    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; HTTPS = 5986    <br />&#160;&#160;&#160; TrustedHosts = *</p>
<blockquote><p>winrm set winrm/config/client/auth @{CredSSP=&quot;True&quot;}</p>
</blockquote>
<p>&gt;winrm set winrm/config/client/auth @{CredSSP=&quot;True&quot;}   <br />Auth    <br />&#160;&#160;&#160; Basic = true    <br />&#160;&#160;&#160; Digest = true    <br />&#160;&#160;&#160; Kerberos = true    <br />&#160;&#160;&#160; Negotiate = true    <br />&#160;&#160;&#160; Certificate = true    <br />&#160;&#160;&#160; CredSSP = true</p>
<p>&#160;</p>
<p>You can now try installing System Centre 2012 again.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jefferytay.wordpress.com/451/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jefferytay.wordpress.com/451/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jefferytay.wordpress.com/451/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jefferytay.wordpress.com/451/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jefferytay.wordpress.com/451/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jefferytay.wordpress.com/451/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jefferytay.wordpress.com/451/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jefferytay.wordpress.com/451/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jefferytay.wordpress.com/451/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jefferytay.wordpress.com/451/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jefferytay.wordpress.com/451/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jefferytay.wordpress.com/451/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jefferytay.wordpress.com/451/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jefferytay.wordpress.com/451/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jefferytay.wordpress.com&#038;blog=8893556&#038;post=451&#038;subd=jefferytay&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jefferytay.wordpress.com/2012/04/12/system-centre-2012-unified-installer-fix-for-the-winrm-settings-are-not-configured-correctly/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/27d3f15ba9242eae1078607670d81806?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kwanann</media:title>
		</media:content>

		<media:content url="http://jefferytay.files.wordpress.com/2012/04/image_thumb2.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Getting ASP.NET MVC 3 to work with ASP.NET Website project</title>
		<link>http://jefferytay.wordpress.com/2012/04/10/getting-asp-net-mvc-3-to-work-with-asp-net-website-project/</link>
		<comments>http://jefferytay.wordpress.com/2012/04/10/getting-asp-net-mvc-3-to-work-with-asp-net-website-project/#comments</comments>
		<pubDate>Tue, 10 Apr 2012 01:05:47 +0000</pubDate>
		<dc:creator>kwanann</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[MVC]]></category>

		<guid isPermaLink="false">https://jefferytay.wordpress.com/?p=447</guid>
		<description><![CDATA[There are numerous blog posts on how to get MVC to work with ASP.NET Web Applications. However there are still scenarios where developers are using normal ASP.NET website projects rather than Web Application projects. Below are the steps to enable MVC 3 with an asp.net website project 1. Install ASP.NET MVC 3 2. Modify web.config [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jefferytay.wordpress.com&#038;blog=8893556&#038;post=447&#038;subd=jefferytay&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>There are numerous blog posts on how to get MVC to work with ASP.NET Web Applications. However there are still scenarios where developers are using normal ASP.NET website projects rather than Web Application projects.</p>
<p>Below are the steps to enable MVC 3 with an asp.net website project</p>
<p><strong>1. Install ASP.NET MVC 3 </strong></p>
<p><strong>2. Modify web.config </strong>    </p>
<p>Open up <strong>web.config</strong> in Visual Studio and add the following lines inside the &lt;compilation&gt;&lt;assemblies&gt; section     </p>
<blockquote><p>&lt;add assembly=&quot;System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot; /&gt;      <br />&lt;add assembly=&quot;System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot; /&gt;       <br />&lt;add assembly=&quot;System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot; /&gt;       </p>
</blockquote>
<p> <strong></strong>
<p><strong>3. Modify global.asax</strong>     </p>
<p>Next you will need to add in the code for MVC triggers inside <strong>global.asax</strong> (create one if it does not exist)     </p>
<p>Add the following lines after &lt;%@ Application Language=&quot;C#&quot; %&gt;     </p>
<blockquote><p>&lt;%@ Import Namespace=&quot;System.Web.Mvc&quot; %&gt;      <br />&lt;%@ Import Namespace=&quot;System.Web.Routing&quot; %&gt;</p>
</blockquote>
<p>Add the following after &lt;script runat=&quot;server&quot;&gt;     </p>
<blockquote><p>public void RegisterGlobalFilters(GlobalFilterCollection filters)      <br />{       <br />filters.Add(new HandleErrorAttribute());       <br />}       </p>
<p>public static void RegisterRoutes(RouteCollection routes)       <br />{       <br />routes.IgnoreRoute(&quot;{resource}.axd/{*pathInfo}&quot;); </p>
<p>routes.MapRoute(&quot;Home&quot;,      <br />&quot;home/{action}/{id}&quot;,       <br />new { controller = &quot;Home&quot;, action = &quot;Index&quot;, id = UrlParameter.Optional });}       </p>
</blockquote>
<p>add the following inside application_start    </p>
<blockquote><p>RegisterGlobalFilters(GlobalFilters.Filters);      <br />RegisterRoutes(RouteTable.Routes); </p>
</blockquote>
<p>At this point, your global.asax should look like     <br /><a href="http://jefferytay.files.wordpress.com/2012/04/image.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image" border="0" alt="image" src="http://jefferytay.files.wordpress.com/2012/04/image_thumb.png?w=600&h=436" width="600" height="436" /></a></p>
<p><strong>4. Creating the controller</strong></p>
<p>Because this is a website project, compilation is at runtime, so you will have to create your controllers inside the App_Code folder rather than the normal Controller folder in the main site</p>
<p><em>Note that your controller class needs to end with the <strong>Controller</strong> keyword. In the example, with a controller = “Home”, the classname for the controller needs to be HomeController</em></p>
<p>To add your first controller, right click on the App_Code folder and create a new class with the file name as HomeController.cs</p>
<p>Paste the following code into the HomeController.cs (replace everything)</p>
<blockquote><p>using System;     <br />using System.Collections.Generic;      <br />using System.Linq;      <br />using System.Web;      <br />using System.Web.Mvc;</p>
<p>public partial class HomeController : Controller     <br />{      <br />&#160;&#160;&#160; protected override void Execute(System.Web.Routing.RequestContext requestContext)      <br />&#160;&#160;&#160; {      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; base.Execute(requestContext);      <br />&#160;&#160;&#160; }</p>
<p>&#160;&#160;&#160; public ActionResult Index()     <br />&#160;&#160;&#160; {      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; var r = new ContentResult();      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; r.Content = &quot;Hello World&quot;;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; return r;      <br />&#160;&#160;&#160; }      <br />}</p>
</blockquote>
<p>&#160;</p>
<p><strong>5. Test the site</strong></p>
<p>Now that you have generated the routing and created the controller, browse to localhost/home. You should see “Hello World”   </p>
<p><a href="http://jefferytay.files.wordpress.com/2012/04/image1.png"><img style="background-image:none;border-bottom:0;border-left:0;padding-left:0;padding-right:0;display:inline;border-top:0;border-right:0;padding-top:0;" title="image" border="0" alt="image" src="http://jefferytay.files.wordpress.com/2012/04/image_thumb1.png?w=566&h=149" width="566" height="149" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jefferytay.wordpress.com/447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jefferytay.wordpress.com/447/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jefferytay.wordpress.com/447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jefferytay.wordpress.com/447/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jefferytay.wordpress.com/447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jefferytay.wordpress.com/447/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jefferytay.wordpress.com/447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jefferytay.wordpress.com/447/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jefferytay.wordpress.com/447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jefferytay.wordpress.com/447/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jefferytay.wordpress.com/447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jefferytay.wordpress.com/447/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jefferytay.wordpress.com/447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jefferytay.wordpress.com/447/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jefferytay.wordpress.com&#038;blog=8893556&#038;post=447&#038;subd=jefferytay&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jefferytay.wordpress.com/2012/04/10/getting-asp-net-mvc-3-to-work-with-asp-net-website-project/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/27d3f15ba9242eae1078607670d81806?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kwanann</media:title>
		</media:content>

		<media:content url="http://jefferytay.files.wordpress.com/2012/04/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://jefferytay.files.wordpress.com/2012/04/image_thumb1.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Latest jQuery</title>
		<link>http://jefferytay.wordpress.com/2012/03/16/latest-jquery/</link>
		<comments>http://jefferytay.wordpress.com/2012/03/16/latest-jquery/#comments</comments>
		<pubDate>Fri, 16 Mar 2012 08:29:07 +0000</pubDate>
		<dc:creator>kwanann</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[ASP.NET]]></category>

		<guid isPermaLink="false">https://jefferytay.wordpress.com/?p=441</guid>
		<description><![CDATA[For those that always wants to use the latest jQuery, here’s the link http://code.jquery.com/jquery-latest.min.js<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jefferytay.wordpress.com&#038;blog=8893556&#038;post=441&#038;subd=jefferytay&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>For those that always wants to use the latest jQuery, here’s the link </p>
<p><a href="http://code.jquery.com/jquery-latest.min.js">http://code.jquery.com/jquery-latest.min.js</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jefferytay.wordpress.com/441/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jefferytay.wordpress.com/441/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jefferytay.wordpress.com/441/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jefferytay.wordpress.com/441/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jefferytay.wordpress.com/441/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jefferytay.wordpress.com/441/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jefferytay.wordpress.com/441/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jefferytay.wordpress.com/441/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jefferytay.wordpress.com/441/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jefferytay.wordpress.com/441/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jefferytay.wordpress.com/441/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jefferytay.wordpress.com/441/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jefferytay.wordpress.com/441/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jefferytay.wordpress.com/441/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jefferytay.wordpress.com&#038;blog=8893556&#038;post=441&#038;subd=jefferytay&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jefferytay.wordpress.com/2012/03/16/latest-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/27d3f15ba9242eae1078607670d81806?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kwanann</media:title>
		</media:content>
	</item>
		<item>
		<title>Effects of MS11-100 on asp.net websites</title>
		<link>http://jefferytay.wordpress.com/2012/03/16/effects-of-ms11-100-on-asp-net-websites/</link>
		<comments>http://jefferytay.wordpress.com/2012/03/16/effects-of-ms11-100-on-asp-net-websites/#comments</comments>
		<pubDate>Fri, 16 Mar 2012 01:35:27 +0000</pubDate>
		<dc:creator>kwanann</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[IIS]]></category>

		<guid isPermaLink="false">https://jefferytay.wordpress.com/?p=437</guid>
		<description><![CDATA[On 29 Dec 2011, Microsoft released a security bulletin MS11-100 which attempts to resolve hash collisions vulnerabilities found in asp.net. &#160; However if you have form pages with &#62; 1000 elements, then you will encounter the following error (for asp.net) System.Web.HttpException (0&#215;80004005): The URL-encoded form data is not valid. &#8212;&#62; System.InvalidOperationException: Operation is not valid [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jefferytay.wordpress.com&#038;blog=8893556&#038;post=437&#038;subd=jefferytay&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>On 29 Dec 2011, Microsoft released a security bulletin <a href="http://technet.microsoft.com/en-us/security/bulletin/ms11-100" target="_blank">MS11-100</a> which attempts to resolve hash collisions vulnerabilities found in asp.net.</p>
<p>&#160;</p>
<p>However if you have form pages with &gt; 1000 elements, then you will encounter the following error (for asp.net)</p>
<blockquote><p>System.Web.HttpException (0&#215;80004005): The URL-encoded form data is not valid. &#8212;&gt; System.InvalidOperationException: Operation is not valid due to the current state of the object.     <br />at System.Web.HttpValueCollection.ThrowIfMaxHttpCollectionKeysExceeded()      <br />at System.Web.HttpValueCollection.FillFromEncodedBytes(Byte[] bytes, Encoding encoding)      <br />at System.Web.HttpRequest.FillInFormCollection()      <br />at System.Web.HttpRequest.FillInFormCollection()      <br />at System.Web.HttpRequest.get_Form()      <br />at System.Web.HttpRequest.get_HasForm()      <br />at System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull)      <br />at System.Web.UI.Page.DeterminePostBackMode()      <br />at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)</p>
</blockquote>
<p>What is happening is that asp.net is now checking your Form posted data and if it exceeds a certain threshold it will throw the exception above.</p>
<p>&#160;</p>
<p>To workaround this, what you can do is to put the following item inside appsettings</p>
<pre>&lt;add key=&quot;aspnet:MaxHttpCollectionKeys&quot; value=&quot;10000&quot; /&gt;</pre>
<p>&#160;</p>
<p>By default this value is 1000, but you are free to either limit or give it a larger value</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jefferytay.wordpress.com/437/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jefferytay.wordpress.com/437/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jefferytay.wordpress.com/437/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jefferytay.wordpress.com/437/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jefferytay.wordpress.com/437/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jefferytay.wordpress.com/437/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jefferytay.wordpress.com/437/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jefferytay.wordpress.com/437/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jefferytay.wordpress.com/437/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jefferytay.wordpress.com/437/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jefferytay.wordpress.com/437/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jefferytay.wordpress.com/437/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jefferytay.wordpress.com/437/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jefferytay.wordpress.com/437/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jefferytay.wordpress.com&#038;blog=8893556&#038;post=437&#038;subd=jefferytay&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jefferytay.wordpress.com/2012/03/16/effects-of-ms11-100-on-asp-net-websites/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/27d3f15ba9242eae1078607670d81806?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kwanann</media:title>
		</media:content>
	</item>
		<item>
		<title>ASP.NET 3.x and above: creating dynamic, or anonymous types</title>
		<link>http://jefferytay.wordpress.com/2012/03/02/asp-net-3-x-and-above-creating-dynamic-or-anonymous-types/</link>
		<comments>http://jefferytay.wordpress.com/2012/03/02/asp-net-3-x-and-above-creating-dynamic-or-anonymous-types/#comments</comments>
		<pubDate>Thu, 01 Mar 2012 20:04:13 +0000</pubDate>
		<dc:creator>kwanann</dc:creator>
				<category><![CDATA[ASP.NET]]></category>

		<guid isPermaLink="false">https://jefferytay.wordpress.com/?p=430</guid>
		<description><![CDATA[A relatively unknown feature in available since .NET 3.0 is the ability to create dynamic or more correctly anonymous types . These are typically used in LINQ select scenarios from p in db.Users select new (p.Name, p.Email} This basically creates an anonymous type with Name and Email properties. With all the new advancements in web [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jefferytay.wordpress.com&#038;blog=8893556&#038;post=430&#038;subd=jefferytay&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A relatively unknown feature in available since .NET 3.0 is the ability to create dynamic or more correctly anonymous types .</p>
<p>These are typically used in LINQ select scenarios </p>
<blockquote><p><font>from p in db.Users</font></p>
<p><font>select new (p.Name, p.Email}</font></p>
</blockquote>
<p>This basically creates an anonymous type with Name and Email properties.</p>
<p>With all the new advancements in web technologies, there is this increasing need to have the ability to create objects on the fly so as to pass to web api or to send data across different systems.</p>
<p>Creating an anonymous object in code is pretty simple, below is an example of how you create one</p>
<blockquote><p><font>var obj = new {ID=1, Name=”Jeffery”, <a href="mailto:Email=&rdquo;a@a.com">Email=”a@a.com</a>”};</font></p>
</blockquote>
<p>This basically creates a new object on the fly with the following 3 properties</p>
<ol>
<li>ID</li>
<li>Name</li>
<li>Email</li>
</ol>
<ol>For more reading, look at the following links:</ol>
<p><a title="http://msdn.microsoft.com/en-us/library/bb308966.aspx#csharp3.0overview_topic15" href="http://msdn.microsoft.com/en-us/library/bb308966.aspx#csharp3.0overview_topic15">http://msdn.microsoft.com/en-us/library/bb308966.aspx#csharp3.0overview_topic15</a></p>
<p><a title="http://msdn.microsoft.com/en-us/library/bb397696.aspx" href="http://msdn.microsoft.com/en-us/library/bb397696.aspx">http://msdn.microsoft.com/en-us/library/bb397696.aspx</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jefferytay.wordpress.com/430/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jefferytay.wordpress.com/430/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jefferytay.wordpress.com/430/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jefferytay.wordpress.com/430/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jefferytay.wordpress.com/430/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jefferytay.wordpress.com/430/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jefferytay.wordpress.com/430/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jefferytay.wordpress.com/430/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jefferytay.wordpress.com/430/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jefferytay.wordpress.com/430/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jefferytay.wordpress.com/430/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jefferytay.wordpress.com/430/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jefferytay.wordpress.com/430/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jefferytay.wordpress.com/430/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jefferytay.wordpress.com&#038;blog=8893556&#038;post=430&#038;subd=jefferytay&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jefferytay.wordpress.com/2012/03/02/asp-net-3-x-and-above-creating-dynamic-or-anonymous-types/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/27d3f15ba9242eae1078607670d81806?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kwanann</media:title>
		</media:content>
	</item>
		<item>
		<title>SignalR&#8211;Configuring timeout for connections</title>
		<link>http://jefferytay.wordpress.com/2012/03/02/signalrconfiguring-timeout-for-connections/</link>
		<comments>http://jefferytay.wordpress.com/2012/03/02/signalrconfiguring-timeout-for-connections/#comments</comments>
		<pubDate>Thu, 01 Mar 2012 18:19:42 +0000</pubDate>
		<dc:creator>kwanann</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[asp.net jquery]]></category>

		<guid isPermaLink="false">https://jefferytay.wordpress.com/?p=426</guid>
		<description><![CDATA[Based on the SignalR wiki, in order to make SignalR work with Azure or load balancers, you will need to tune it such that the polling timeout is lesser than the default polling time of 110 seconds. To do this, the wiki at https://github.com/SignalR/SignalR/wiki/Configuring-SignalR tells you to do the following ASP.NET Example (Global.asax) var config [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jefferytay.wordpress.com&#038;blog=8893556&#038;post=426&#038;subd=jefferytay&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Based on the SignalR wiki, in order to make SignalR work with Azure or load balancers, you will need to tune it such that the polling timeout is lesser than the default polling time of 110 seconds. </p>
<p>To do this, the wiki at <a title="https://github.com/SignalR/SignalR/wiki/Configuring-SignalR" href="https://github.com/SignalR/SignalR/wiki/Configuring-SignalR">https://github.com/SignalR/SignalR/wiki/Configuring-SignalR</a> tells you to do the following</p>
<blockquote><p><strong>ASP.NET Example (Global.asax)</strong></p>
<pre><code> var config = AspNetHost.DependencyResolver.Resolve&lt;IConfigurationManager&gt;(); 
 config.ReconnectionTimeout = TimeSpan.FromSeconds(25);</code></pre>
<p>&#160;</p>
</blockquote>
<p>However if you were to just copy and paste that, you will find that visual studio reports the following 2 errors and wurlies on your code</p>
<blockquote>
<p>The name &#8216;AspNetHost&#8217; does not exist in the current context</p>
</blockquote>
<p>and</p>
<blockquote>
<p>The type or namespace name &#8216;IConfigurationManager&#8217; could not be found (are you missing a using directive or an assembly reference?)</p>
</blockquote>
<p>&#160;</p>
<p><a href="http://jefferytay.files.wordpress.com/2012/03/image.png"><img style="background-image:none;border-bottom:0;border-left:0;padding-left:0;padding-right:0;display:inline;border-top:0;border-right:0;padding-top:0;" title="image" border="0" alt="image" src="http://jefferytay.files.wordpress.com/2012/03/image_thumb.png?w=577&h=47" width="577" height="47" /></a></p>
<p>&#160;</p>
<p>Actually what happens is that the wiki actually forgot to mention that you will actually need to import a few namespaces to global.asax. </p>
<p>They are</p>
<ol>
<li>SignalR.Configuration – Fixes the IConfigurationManager</li>
<li>SignalR.Hosting.AspNet – Fixes AspNetHost</li>
<li>SignalR.Infrastructure – This is where the Resolve extension reside</li>
</ol>
<ol></ol>
<ol>So after adding all these, your global.asax will look like</ol>
<ol>
<blockquote style="margin-right:0;">
<p>&lt;%@ Application Language=&quot;C#&quot; %&gt;<br />
      <br />&lt;%@ Import Namespace=&quot;SignalR.Configuration&quot; %&gt;</p>
<p>&lt;%@ Import Namespace=&quot;SignalR.Hosting.AspNet&quot; %&gt;</p>
<p>&lt;%@ Import Namespace=&quot;SignalR.Infrastructure&quot; %&gt;</p>
<p>&lt;script runat=&quot;server&quot;&gt;</p>
<p>&#160;&#160;&#160; void Application_Start(object sender, EventArgs e) </p>
<p>&#160;&#160;&#160; {&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; // Code that runs on application startup</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; var config = AspNetHost.DependencyResolver.Resolve&lt;IConfigurationManager&gt;();</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; config.ReconnectionTimeout = TimeSpan.FromSeconds(25);</p>
<p>&#160;&#160;&#160; }</p>
<p>&lt;/script&gt;</p>
<p></p>
</blockquote>
</ol>
<p>Enjoy!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jefferytay.wordpress.com/426/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jefferytay.wordpress.com/426/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jefferytay.wordpress.com/426/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jefferytay.wordpress.com/426/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jefferytay.wordpress.com/426/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jefferytay.wordpress.com/426/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jefferytay.wordpress.com/426/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jefferytay.wordpress.com/426/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jefferytay.wordpress.com/426/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jefferytay.wordpress.com/426/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jefferytay.wordpress.com/426/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jefferytay.wordpress.com/426/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jefferytay.wordpress.com/426/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jefferytay.wordpress.com/426/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jefferytay.wordpress.com&#038;blog=8893556&#038;post=426&#038;subd=jefferytay&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jefferytay.wordpress.com/2012/03/02/signalrconfiguring-timeout-for-connections/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/27d3f15ba9242eae1078607670d81806?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kwanann</media:title>
		</media:content>

		<media:content url="http://jefferytay.files.wordpress.com/2012/03/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
	</channel>
</rss>
