<?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>We2you&#039;s Blog</title>
	<atom:link href="http://we2you.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://we2you.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Thu, 05 Aug 2010 21:39:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='we2you.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>We2you&#039;s Blog</title>
		<link>http://we2you.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://we2you.wordpress.com/osd.xml" title="We2you&#039;s Blog" />
	<atom:link rel='hub' href='http://we2you.wordpress.com/?pushpress=hub'/>
		<item>
		<title>JavaScript Session Timeout Warning</title>
		<link>http://we2you.wordpress.com/2010/08/05/javascript-session-timeout-warning/</link>
		<comments>http://we2you.wordpress.com/2010/08/05/javascript-session-timeout-warning/#comments</comments>
		<pubDate>Thu, 05 Aug 2010 21:39:41 +0000</pubDate>
		<dc:creator>we2you</dc:creator>
				<category><![CDATA[Browser Issues]]></category>
		<category><![CDATA[Session Timeout Popup]]></category>

		<guid isPermaLink="false">http://we2you.wordpress.com/?p=40</guid>
		<description><![CDATA[//*********************************** // Global variables var SECONDS = 60000; var WarningMins = 1; //In Minutes var TimeOutMins = 2; //In Minutes var ThresholdMils = SECONDS * WarningMins; var WarningTimer = null; var LOGINPAGE = "Login.aspx"; var TimeOutWindow = null; var Content = ""; var StartMils = Date.parse(new Date().toLocaleString()); var TimeOutMils = StartMils + (SECONDS * TimeOutMins); [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=we2you.wordpress.com&amp;blog=11530207&amp;post=40&amp;subd=we2you&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><font size="0.3"><br />
<code><br />
//***********************************<br />
// Global variables<br />
var SECONDS			= 60000;<br />
var WarningMins		= 1; //In Minutes<br />
var TimeOutMins		= 2; //In Minutes<br />
var ThresholdMils 	= SECONDS * WarningMins;<br />
var WarningTimer	= null;<br />
var LOGINPAGE		= "Login.aspx";<br />
var TimeOutWindow	= null;<br />
var Content			= "";</p>
<p>var StartMils 		= Date.parse(new Date().toLocaleString());<br />
var TimeOutMils 	= StartMils + (SECONDS * TimeOutMins);<br />
//***********************************</p>
<p>function BuildContent()<br />
{<br />
	Content	= '&lt;body bgcolor="#ffffff" onLoad="self.focus"&gt;&lt;font face="arial,helvetica" size="2"&gt;';<br />
	Content += 'Due to inactivity, you are about to be logged out. ';<br />
	Content += 'If you wish to stay logged in, click "Yes" below.';<br />
	Content += 'If you select "No" or do not respond to this screen,<br />
	Content += 'you will automatically be logged out for security reasons.';<br />
	Content += '&lt;p&gt;&lt;div align="center"&gt;&lt;a ';<br />
	Content += 'href="javascript:opener.ResetTimer();top.parent.opener.focus();self.close();"&gt;Yes&lt;/a&gt;';<br />
	Content += '&lt;/div&gt;&lt;/p&gt;&lt;/font&gt;&lt;/body&gt;&lt;/html&gt;';<br />
}</p>
<p>function CountDown()<br />
{<br />
	clearTimeout(WarningTimer);</p>
<p>	var w = 400;<br />
	var h = 200;</p>
<p>	if (document.all || document.layers)<br />
	{<br />
		w = screen.availWidth;<br />
		h = screen.availHeight;<br />
	}</p>
<p>	var popW 	= 400;<br />
	var popH 	= 200;<br />
	var leftPos = (w - popW) / 2;<br />
	var topPos  = (h - popH) / 2;</p>
<p>	if (TimeOutWindow &amp;&amp; !TimeOutWindow.closed)<br />
		TimeOutWindow.close();</p>
<p>	var params = 'menubar=0,toolbar=0,status=0,scrollbars=0,resizable=0,width=';<br />
	params += popW + ',height='+ popH + ',top=' + topPos + ',left=' + leftPos;</p>
<p>	TimeOutWindow = window.open('','TimeOut',params);<br />
	TimeOutWindow.document.writeln('&lt;html&gt;&lt;head&gt;&lt;title&gt;TimeOut&lt;/title&gt;&lt;/head&gt;&lt;body bgcolor=white onLoad="self.focus()"&gt;'+Content+'&lt;/body&gt;&lt;/html&gt;');<br />
	TimeOutWindow.document.close();</p>
<p>	WarningTimer	= setTimeout('CountDown()', ThresholdMils);<br />
}</p>
<p>function ValidateSession()<br />
{<br />
	//******************************************<br />
	//Call AJAX Function to Check Session Check<br />
	//******************************************<br />
	return true;<br />
}</p>
<p>function ResetTimer()<br />
{<br />
	window.focus();<br />
	setTimeout(top.window.focus, 1000);<br />
	alert("Your Session will be extended!!!");</p>
<p>	clearTimeout(WarningTimer);</p>
<p>	var SessionCheck = ValidateSession();</p>
<p>	if (SessionCheck)<br />
	{<br />
		StartMils		= Date.parse(new Date().toLocaleString());<br />
		TimeOutMils		= StartMils + (SECONDS * TimeOutMins);<br />
		WarningTimer	= setTimeout('CountDown()', ThresholdMils);<br />
		TimeOutWindow	= null;<br />
	}<br />
	else<br />
	{<br />
		//****************<br />
		//Logout the User<br />
		//****************<br />
	}<br />
}</p>
<p>var CurrentWindowUrl = window.location.href;</p>
<p>//******************************<br />
//IF THE PAGE IS NOT LOGIN PAGE<br />
//******************************<br />
if (CurrentWindowUrl.indexOf(LOGINPAGE) == -1)<br />
{<br />
	BuildContent();<br />
	WarningTimer = setTimeout('CountDown()', ThresholdMils);<br />
}</p>
<p></code><br />
</font></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/we2you.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/we2you.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/we2you.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/we2you.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/we2you.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/we2you.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/we2you.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/we2you.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/we2you.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/we2you.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/we2you.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/we2you.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/we2you.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/we2you.wordpress.com/40/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=we2you.wordpress.com&amp;blog=11530207&amp;post=40&amp;subd=we2you&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://we2you.wordpress.com/2010/08/05/javascript-session-timeout-warning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cec3571ae7a2e84d3e371532a58d6002?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">we2you</media:title>
		</media:content>
	</item>
		<item>
		<title>XmlSerializer Memory Leak</title>
		<link>http://we2you.wordpress.com/2010/02/19/xmlserializer-memory-leak/</link>
		<comments>http://we2you.wordpress.com/2010/02/19/xmlserializer-memory-leak/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 14:59:23 +0000</pubDate>
		<dc:creator>we2you</dc:creator>
				<category><![CDATA[.NET Framework]]></category>

		<guid isPermaLink="false">http://we2you.wordpress.com/?p=30</guid>
		<description><![CDATA[XML serialization is the process of converting an object&#8217;s public properties and fields to a serial format (in this case, XML) for storage or transport. Deserialization re-creates the object in its original state from the XML output. You can think of serialization as a way of saving the state of an object into a stream [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=we2you.wordpress.com&amp;blog=11530207&amp;post=30&amp;subd=we2you&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>XML serialization is the process of converting an object&#8217;s public properties and fields to a serial format (in this case, XML) for storage or transport. Deserialization re-creates the object in its original state from the XML output. You can think of serialization as a way of saving the state of an object into a stream or buffer. For example, ASP.NET uses the XmlSerializer class to encode XML Web service messages.</p>
<p>Some of the Overloaded XmlSerializer constructors internally calls XmlSerializer.GenerateTempAssembly to generate the temporary assembly every time the constructor is called. The bad part is it does not reuse the existing created assembly, rather it creates the new temporary assembly for every call, which in turn increases the memory foot print.</p>
<p>One of the solutions is to cache the reference and reuse the assembly using the below code:</p>
<p>public class XmlSerializerCache{<br />
	private static object SyncRoot = new object();<br />
	private static Dictionary Serializers = new Dictionary();<br />
	public static XmlSerializer GetSerializer(Type type, Type[] types)<br />
	{<br />
		StringBuilder keyBuilder = new StringBuilder(60);<br />
		keyBuilder.Append(type.FullName);<br />
		if (null != types &amp;&amp; types.Length &gt; 0)<br />
		{<br />
			foreach (Type t in types)<br />
				keyBuilder.Append(&#8220;#&#8221;).Append(t.FullName);<br />
		}<br />
		string key = keyBuilder.ToString();<br />
		XmlSerializer serializer = null;<br />
		if (false == Serializers.TryGetValue(key, out serializer))<br />
		{<br />
			lock (SyncRoot)<br />
			{<br />
				if (false == Serializers.TryGetValue(key, out serializer))<br />
				{<br />
					serializer = new XmlSerializer(type, types);<br />
					Serializers.Add(key, serializer);<br />
				}<br />
			}<br />
		}<br />
		return serializer as XmlSerializer;<br />
	}<br />
}</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/we2you.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/we2you.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/we2you.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/we2you.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/we2you.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/we2you.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/we2you.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/we2you.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/we2you.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/we2you.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/we2you.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/we2you.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/we2you.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/we2you.wordpress.com/30/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=we2you.wordpress.com&amp;blog=11530207&amp;post=30&amp;subd=we2you&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://we2you.wordpress.com/2010/02/19/xmlserializer-memory-leak/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cec3571ae7a2e84d3e371532a58d6002?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">we2you</media:title>
		</media:content>
	</item>
		<item>
		<title>.NET Web Security</title>
		<link>http://we2you.wordpress.com/2010/02/14/net-web-security/</link>
		<comments>http://we2you.wordpress.com/2010/02/14/net-web-security/#comments</comments>
		<pubDate>Sun, 14 Feb 2010 17:49:54 +0000</pubDate>
		<dc:creator>we2you</dc:creator>
				<category><![CDATA[.NET Framework]]></category>
		<category><![CDATA[.NET Web Security]]></category>

		<guid isPermaLink="false">http://we2you.wordpress.com/?p=25</guid>
		<description><![CDATA[1. Session Cleanup Create a new Session before Login Page is presented to avoid Session hijacking. Please refer to http://support.microsoft.com/kb/899918 Session.Abandon(); Response.Cookies.Add(new HttpCookie(“ASP.NET_SessionId”, “”)); 2. Web.Config Changes Make the following changes to web.config to secure external facing web app. - Instead of &#60;forms cookieless=&#8221;UseUri&#8221;&#62; , use &#60;forms cookieless=&#8221;UseCookies&#8221;&#62; - Instead of &#60;forms requireSSL=&#8221;false&#8221;&#62;, use &#60;forms [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=we2you.wordpress.com&amp;blog=11530207&amp;post=25&amp;subd=we2you&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>1.	Session Cleanup<br />
Create a new Session before Login Page is presented to avoid Session hijacking.<br />
Please refer to <a href="http://support.microsoft.com/kb/899918">http://support.microsoft.com/kb/899918</a><br />
Session.Abandon();<br />
Response.Cookies.Add(new HttpCookie(“ASP.NET_SessionId”, “”));</p>
<p>2.	Web.Config Changes<br />
Make the following changes to web.config to secure external facing web app.<br />
-	Instead of &lt;forms cookieless=&#8221;UseUri&#8221;&gt; , use &lt;forms cookieless=&#8221;UseCookies&#8221;&gt;</p>
<p>-	Instead of &lt;forms requireSSL=&#8221;false&#8221;&gt;, use &lt;forms requireSSL=&#8221;true&#8221;&gt;</p>
<p>-	Use &lt;httpCookies httpOnlyCookies=&#8221;true&#8221;&gt; is a useful measure against Cross-Site Script attacks. (works only on IE 6 &amp; above, FireFox 3 &amp; above, Chrome, in future other browser would embrace)</p>
<p>-	Instead of &lt;customErrors mode=&#8221;Off&#8221;&gt;, Use &lt;customErrors mode=&#8221;RemoteOnly&#8221;&gt;</p>
<p>-	Use &lt;trace enabled=&#8221;false&#8221; localOnly=&#8221;true&#8221;&gt;</p>
<p>-	Use &lt;compilation debug=&#8221;false&#8221;&gt;</p>
<p>-	&lt;pages&gt; validateRequest should be set to “true” which is default.</p>
<p>3.	Expire Pages<br />
Add the following changes to all the pages which need to be expired.</p>
<p>Cache-Control : no-cache, max-age=0, s-maxage=0,must-revalidate,proxy-revalidate,no-store,private<br />
Pragma           : no-cache<br />
Expires            : -1</p>
<p>4.	Cookie Cleanup during Logout<br />
Add the following changes to all the pages which need to be expired.</p>
<p>5.	Request.MapPath<br />
If we use MapPath to map a supplied virtual path to a physical path on the server, use the overloaded Request.MapPath method that accepts a bool parameter so that we can prevent cross-application mapping. This means that a user cannot successfully supply a path that contains &#8220;..&#8221; to traverse outside of application&#8217;s virtual directory hierarchy.</p>
<p>6.	Avoid Persistence Cookies<br />
Use Session cookies to store information instead of using persistence cookies. This will avoid information stored in the user’s computer.</p>
<p>7.	SSL (HTTPS) for all Form Logins<br />
Make sure Login Pages are served using SSL Session instead of serving over HTTP.</p>
<p>8.	Enforce Strong Passwords<br />
Ensure that passwords are complex enough to prevent users guessing other users&#8217; passwords and to prevent successful dictionary attacks against user credential store.</p>
<p>9.	Do Not Reveal Exception Details to the Client<br />
When exceptions occur, return concise error messages to the client and log specific details on the server. Do not reveal internal system or application details, such as stack traces, SQL statement fragments, and table or database names to the client. Ensure that this type of information is not allowed to propagate to the end user or beyond current trust boundary. A malicious user could use system-level diagnostic information to learn about application and probe for weaknesses to exploit in future attacks.</p>
<p>Configure a Custom Error Page to display all Application/System related Errors.</p>
<p>10.	View State<br />
-	Avoid Storing Sensitive Data in View State<br />
-	Using SSL protects ViewState between Server and Browser, but it does not stop it being viewed and modified on the user’s computer<br />
-	Use the following setting to encrypt View State</p>
<p>And</p>
<p>When validation was set to 3DES, ViewState was encrypted before being rendered in the page.</p>
<p>11.	Configure the MachineKey to Use the Same Keys on All Servers in a Web Farm<br />
Configuration files on each server share hashing and encryption keys. These are used by ASP.NET to protect ViewState and forms authentication tickets. Manually generated, common keys are required because we cannot guarantee which server will handle successive requests.</p>
<p>12.	Set the Correct Character Encoding<br />
To successfully restrict valid data for Web pages, we should limit the ways in which the input data can be represented. This prevents malicious users from using canonicalization and multi-byte escape sequences to trick input validation routines.</p>
<p>13.	Use the innerText Property Instead of innerHTML<br />
Wherever we use innerHTML property to build a page and if the HTML is based on potentially untrusted input, we must use HtmlEncode to make it safe. To avoid having to remember to do this, use innerText instead. The innerText property renders content safe and ensures that scripts are not executed.</p>
<p>14.	Block All “403” Forbidden Errors<br />
Instead of displaying 403 forbidden errors to the end user, always display Custom Error page to the user. 403 forbidden errors expose the web server directory structure to the user.</p>
<p>15.	Consider Using Page.ViewStateUserKey to Counter One-Click Attacks<br />
Consider using Page.ViewStateUserKey to counter one-click attacks. If you authenticate your callers and use ViewState, set the Page.ViewStateUserKey property in the Page_Init event handler to prevent one-click attacks. </p>
<p>void Page_Init (object sender, EventArgs e) {<br />
  if (Session["ViewStateUserKey"] == null)<br />
    Session["ViewStateUserKey"] = new Guid().ToString();<br />
  this.Page.ViewStateUserKey = Session["ViewStateUserKey"].ToString();<br />
}</p>
<p>The server has no way of knowing that the ViewState originated from the attacker. ViewState validation and HMACs do not counter this attack because the ViewState is valid and the page is executed under the security context of the user. </p>
<p>By setting the ViewStateUserKey property, when the attacker browses to a page to create the ViewState, the property is initialized to his or her name. When the legitimate user submits the page to the server, it is initialized with the attacker&#8217;s name. As a result, the ViewState HMAC check fails and an exception is generated.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/we2you.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/we2you.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/we2you.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/we2you.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/we2you.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/we2you.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/we2you.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/we2you.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/we2you.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/we2you.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/we2you.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/we2you.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/we2you.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/we2you.wordpress.com/25/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=we2you.wordpress.com&amp;blog=11530207&amp;post=25&amp;subd=we2you&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://we2you.wordpress.com/2010/02/14/net-web-security/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cec3571ae7a2e84d3e371532a58d6002?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">we2you</media:title>
		</media:content>
	</item>
		<item>
		<title>XslCompiledTransform memory leak</title>
		<link>http://we2you.wordpress.com/2010/02/14/xslcompiledtransform-memory-leak/</link>
		<comments>http://we2you.wordpress.com/2010/02/14/xslcompiledtransform-memory-leak/#comments</comments>
		<pubDate>Sun, 14 Feb 2010 17:15:26 +0000</pubDate>
		<dc:creator>we2you</dc:creator>
				<category><![CDATA[.NET Framework]]></category>

		<guid isPermaLink="false">http://we2you.wordpress.com/?p=21</guid>
		<description><![CDATA[The XslCompiledTransform class is an XSLT processor that supports the XSLT 1.0 syntax. It is a new implementation and includes performance gains when compared to the obsolete XslTransform class. The structure of the XslCompiledTransform class is very similar to the XslTransform class. The Load method loads and compiles the style sheet, while the Transform method [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=we2you.wordpress.com&amp;blog=11530207&amp;post=21&amp;subd=we2you&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The XslCompiledTransform class is an XSLT processor that supports the XSLT 1.0 syntax. It is a new implementation and includes performance gains when compared to the obsolete XslTransform class. The structure of the XslCompiledTransform class is very similar to the XslTransform class. The Load method loads and compiles the style sheet, while the Transform method executes the XSLT transform.</p>
<p>1. This class has 2 overloaded constructor with enableDebug parameter is set to true as default. Setting this to true enables you to debug the style sheet with the Microsoft Visual Studio Debugger. Please use the overloaded constructor with enableDebug value to false.</p>
<p>// Instantiate XSL Compiled Transformer<br />
XslCompiledTransform xct = new XslCompiledTransform(false);</p>
<p>2. The XslCompiledTransform uses the CodeDom to compile the scripts<br />
within the xsl file into .NET assembly and load them into the current<br />
AppDomain. The Application memory space keeps growing up if we compile more XSL Files which have scripts. It is hard to release the resources loaded in your AppDomain, thus increases the Application Heap.</p>
<p> The possible solutions are: a) using extension objects<br />
instead of msxsl:script blocks; b) recycling the AppDomain from time to time.</p>
<p>public class XslCompiledTransformCache<br />
{<br />
	private static readonly object _syncRoot = new object();<br />
	private static Dictionary _transformers = new Dictionary();</p>
<p>	public static XslCompiledTransform GetXslTransform(string xslFilePath)<br />
	{<br />
	    XslCompiledTransform transformer = null;<br />
	    if (false == _transformers.TryGetValue(xslFilePath, out transformer))<br />
	    {<br />
		lock (_syncRoot)<br />
		{<br />
		    if (false == _transformers.TryGetValue(xslFilePath, out transformer))<br />
		    {<br />
			transformer = new XslCompiledTransform(false);<br />
			transformer.Load(xslFilePath);<br />
			_transformers.Add(xslFilePath, transformer);<br />
		    }<br />
		}<br />
	    }<br />
	    return transformer;<br />
	}<br />
}</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/we2you.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/we2you.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/we2you.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/we2you.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/we2you.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/we2you.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/we2you.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/we2you.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/we2you.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/we2you.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/we2you.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/we2you.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/we2you.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/we2you.wordpress.com/21/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=we2you.wordpress.com&amp;blog=11530207&amp;post=21&amp;subd=we2you&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://we2you.wordpress.com/2010/02/14/xslcompiledtransform-memory-leak/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cec3571ae7a2e84d3e371532a58d6002?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">we2you</media:title>
		</media:content>
	</item>
		<item>
		<title>Search Results Redirected to Unrelated sites</title>
		<link>http://we2you.wordpress.com/2010/02/14/18/</link>
		<comments>http://we2you.wordpress.com/2010/02/14/18/#comments</comments>
		<pubDate>Sun, 14 Feb 2010 16:58:04 +0000</pubDate>
		<dc:creator>we2you</dc:creator>
				<category><![CDATA[Browser Issues]]></category>

		<guid isPermaLink="false">http://we2you.wordpress.com/?p=18</guid>
		<description><![CDATA[1. Open the Browser and check your proxy settings to make sure it has not been changed by the Trojans. Internet Properties &#62; Connections &#62; LAN Settings &#62; Proxy server 2. Download ComboFix.Exe from http://www.techsupportforum.com/sectools/sUBs/ComboFix.exe or http://download.bleepingcomputer.com/sUBs/ComboFix.exe 3. Follow the prompts. When finished, it shall produce a log for you. Note: Do not open any [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=we2you.wordpress.com&amp;blog=11530207&amp;post=18&amp;subd=we2you&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>1. Open the Browser and check your proxy settings to make sure it has not been changed by the Trojans.<br />
	Internet Properties &gt; Connections &gt; LAN Settings &gt; Proxy server</p>
<p>2. Download ComboFix.Exe from<br />
	<a href="http://www.techsupportforum.com/sectools/sUBs/ComboFix.exe">http://www.techsupportforum.com/sectools/sUBs/ComboFix.exe</a> or<br />
	<a href="http://download.bleepingcomputer.com/sUBs/ComboFix.exe">http://download.bleepingcomputer.com/sUBs/ComboFix.exe</a></p>
<p>3. Follow the prompts. When finished, it shall produce a log for you.<br />
    Note: Do not open any other program and let the software run now. That may cause ComboFix to stall. </p>
<p>4. Download FixIEDef from <a href="http://downloads.malwareteks.com/FixIEDef.exe">http://downloads.malwareteks.com/FixIEDef.exe</a></p>
<p>5. Download Malwarebytes&#8217; Anti-Malware from <a href="http://www.malwarebytes.org/mbam.php">http://www.malwarebytes.org/mbam.php</a>, Install and run select &#8220;Perform Quick Scan&#8221;, then click Scan. </p>
<p>6. Download Avast! Free AntiVirus, Install and do Quick Scan.</p>
<p>Hope this helps!!!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/we2you.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/we2you.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/we2you.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/we2you.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/we2you.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/we2you.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/we2you.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/we2you.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/we2you.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/we2you.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/we2you.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/we2you.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/we2you.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/we2you.wordpress.com/18/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=we2you.wordpress.com&amp;blog=11530207&amp;post=18&amp;subd=we2you&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://we2you.wordpress.com/2010/02/14/18/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cec3571ae7a2e84d3e371532a58d6002?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">we2you</media:title>
		</media:content>
	</item>
		<item>
		<title>MemoryStream GetBuffer Vs ToArray</title>
		<link>http://we2you.wordpress.com/2010/02/14/memorystream-getbuffer-vs-toarray/</link>
		<comments>http://we2you.wordpress.com/2010/02/14/memorystream-getbuffer-vs-toarray/#comments</comments>
		<pubDate>Sun, 14 Feb 2010 16:43:32 +0000</pubDate>
		<dc:creator>we2you</dc:creator>
				<category><![CDATA[.NET Framework]]></category>

		<guid isPermaLink="false">http://we2you.wordpress.com/?p=13</guid>
		<description><![CDATA[If you need to read the data from MemoryStream, always use ToArray() method instead of GetBuffer() method. string Output = Encoding.UTF8.GetString(mstream.ToArray()); MemoryStream.GetBuffer() method returns the entire allocated buffer (even the unused buffer) and with &#8221; padding for the unused buffer space. Enjoy!!!<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=we2you.wordpress.com&amp;blog=11530207&amp;post=13&amp;subd=we2you&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you need to read the data from MemoryStream, always use ToArray() method instead of GetBuffer() method.</p>
<p>string Output = Encoding.UTF8.GetString(mstream.ToArray());</p>
<p>MemoryStream.GetBuffer() method returns the entire allocated buffer (even the unused buffer) and with &#8221; padding for the unused buffer space.</p>
<p>Enjoy!!!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/we2you.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/we2you.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/we2you.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/we2you.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/we2you.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/we2you.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/we2you.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/we2you.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/we2you.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/we2you.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/we2you.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/we2you.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/we2you.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/we2you.wordpress.com/13/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=we2you.wordpress.com&amp;blog=11530207&amp;post=13&amp;subd=we2you&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://we2you.wordpress.com/2010/02/14/memorystream-getbuffer-vs-toarray/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cec3571ae7a2e84d3e371532a58d6002?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">we2you</media:title>
		</media:content>
	</item>
		<item>
		<title>Memory DMP</title>
		<link>http://we2you.wordpress.com/2010/02/14/memory-dmp/</link>
		<comments>http://we2you.wordpress.com/2010/02/14/memory-dmp/#comments</comments>
		<pubDate>Sun, 14 Feb 2010 16:39:28 +0000</pubDate>
		<dc:creator>we2you</dc:creator>
				<category><![CDATA[XP Issues]]></category>

		<guid isPermaLink="false">http://we2you.wordpress.com/?p=11</guid>
		<description><![CDATA[You might have noticed a huge memory.dmp file under c:\windows directory. (Only) If you need to reclaim the space, - go to Control Panel/System/Advanced tab/Startup and Recovery settings, - Under System Failure, - Change the write debugging to a Mini-Dump (64K) - Click OK You are done and it will be the new default after [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=we2you.wordpress.com&amp;blog=11530207&amp;post=11&amp;subd=we2you&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>You might have noticed a huge memory.dmp file under c:\windows directory. </p>
<p>(Only) If you need to reclaim the space,<br />
- go to Control Panel/System/Advanced tab/Startup and Recovery<br />
settings,<br />
- Under System Failure,<br />
- Change the write debugging to a Mini-Dump (64K)<br />
- Click OK</p>
<p>You are done and it will be the new default after reboot. </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/we2you.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/we2you.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/we2you.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/we2you.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/we2you.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/we2you.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/we2you.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/we2you.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/we2you.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/we2you.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/we2you.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/we2you.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/we2you.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/we2you.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=we2you.wordpress.com&amp;blog=11530207&amp;post=11&amp;subd=we2you&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://we2you.wordpress.com/2010/02/14/memory-dmp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cec3571ae7a2e84d3e371532a58d6002?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">we2you</media:title>
		</media:content>
	</item>
		<item>
		<title>Firefox &amp; Auto Form Submit</title>
		<link>http://we2you.wordpress.com/2010/01/19/firefox-auto-form-submit/</link>
		<comments>http://we2you.wordpress.com/2010/01/19/firefox-auto-form-submit/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 17:06:57 +0000</pubDate>
		<dc:creator>we2you</dc:creator>
				<category><![CDATA[Browser Issues]]></category>
		<category><![CDATA[Firefox Form Submit]]></category>

		<guid isPermaLink="false">http://we2you.wordpress.com/?p=4</guid>
		<description><![CDATA[Here is the sample code which can be used to submit form automatically&#8230; &#60;html&#62; &#60;head&#62;&#60;/head&#62; &#60;body&#62; &#60;form name=&#8221;myForm&#8221; id=&#8221;myForm&#8221; method=&#8221;post&#8221; action=&#8221;http://www.google.com&#8221;/&#62; &#60;script type=&#8221;text/javascript&#8221;&#62; //&#60;![CDATA[ this.myForm.submit(); //]]&#62; &#60;/script&#62; &#60;/body&#62; &#60;/html&#62; Common Mistakes: Make Sure no form element with &#8220;submit&#8221; name. submit function is case sensitive. Make sure body and form tags are properly closed. Hope this Helps!!! <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=we2you.wordpress.com&amp;blog=11530207&amp;post=4&amp;subd=we2you&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here is the sample code which can be used to submit form automatically&#8230;</p>
<blockquote><p><em>&lt;html&gt;<br />
&lt;head&gt;&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;form name=&#8221;myForm&#8221; id=&#8221;myForm&#8221; method=&#8221;post&#8221; action=&#8221;</em><a href="http://www.google.com&quot;/"><em>http://www.google.com&#8221;/</em></a><em>&gt;<br />
&lt;script type=&#8221;text/javascript&#8221;&gt;<br />
//&lt;![CDATA[<br />
this.myForm.submit();<br />
//]]&gt;<br />
&lt;/script&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</em></p></blockquote>
<p>Common Mistakes:</p>
<ol>
<li>Make Sure no form element with &#8220;submit&#8221; name.</li>
<li>submit function is case sensitive.</li>
<li>Make sure body and form tags are properly closed.</li>
</ol>
<p>Hope this Helps!!! </p>
<p><a href="http://we2you.wordpress.com/"></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/we2you.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/we2you.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/we2you.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/we2you.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/we2you.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/we2you.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/we2you.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/we2you.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/we2you.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/we2you.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/we2you.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/we2you.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/we2you.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/we2you.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=we2you.wordpress.com&amp;blog=11530207&amp;post=4&amp;subd=we2you&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://we2you.wordpress.com/2010/01/19/firefox-auto-form-submit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cec3571ae7a2e84d3e371532a58d6002?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">we2you</media:title>
		</media:content>
	</item>
	</channel>
</rss>
