<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US"><title type="html">Yang Li's blog</title><subtitle type="html" /><id>http://blogs.msdn.com/yaleeyangmsblog/atom.xml</id><link rel="alternate" type="text/html" href="http://blogs.msdn.com/yaleeyangmsblog/default.aspx" /><link rel="self" type="application/atom+xml" href="http://blogs.msdn.com/yaleeyangmsblog/atom.xml" /><generator uri="http://communityserver.org" version="2.1.61025.2">Community Server</generator><updated>2007-02-06T22:45:00Z</updated><entry><title>Visual Studio (VS) 2005 IDE for IronPython (Python)</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/yaleeyangmsblog/archive/2007/07/10/visual-studio-vs-2005-ide-for-ironpython-python.aspx" /><id>http://blogs.msdn.com/yaleeyangmsblog/archive/2007/07/10/visual-studio-vs-2005-ide-for-ironpython-python.aspx</id><published>2007-07-10T20:43:00Z</published><updated>2007-07-10T20:43:00Z</updated><content type="html">&lt;P class=MsoListParagraphCxSpLast style="MARGIN: 0in 0in 10pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;FONT face=Calibri size=3&gt;&lt;/P&gt;
&lt;P&gt;I think it's worth posting this blog because it's really hard for me to find IronPython IDE integrated with Visual Studio 2005 directly. The following instructions show how to build IronPython IDE for VS 2005 by using VS 2005 SDK.&lt;/P&gt;
&lt;P&gt;1. Download the latest &lt;A href="http://www.microsoft.com/downloads/details.aspx?familyid=51A5C65B-C020-4E08-8AC0-3EB9C06996F4&amp;amp;displaylang=en" mce_href="http://www.microsoft.com/downloads/details.aspx?familyid=51A5C65B-C020-4E08-8AC0-3EB9C06996F4&amp;amp;displaylang=en"&gt;Visual Studio 2005 SDK version 4.0&lt;/A&gt; and install it. (requirements: Visual Studio 2005 Standard Edition or above, and Visual Studio 2005 Service Pack 1 installed)&lt;/P&gt;
&lt;P&gt;2. Open the IronPython.sln solution in the &lt;I&gt;&amp;lt;InstallationPath&amp;gt;\&lt;/I&gt;VisualStudioIntegration\Samples\IronPythonIntegration folder.&lt;/P&gt;
&lt;P&gt;3. Press F5 to build the sample, you will see VS launched from the experimental hive. And a couple of IronPython project templates are seen from New Project dialog. Also&amp;nbsp;IDE includes Intellisense features.&lt;/P&gt;
&lt;P mce_keep="true"&gt;4. Next time, if you want to new IronPython project, just launch Visual Studio from Start-&amp;gt;All Programs-&amp;gt;Visual Studio 2005 SDK-&amp;gt;2007.02-&amp;gt;Tools-&amp;gt;Start Visual Studio 2005 under Experimental hive, because it doesn't want to affect current your stable VS 2005.&lt;/P&gt;
&lt;P&gt;You're done! Enjoy IronPython!&lt;/P&gt;&lt;/FONT&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3801522" width="1" height="1"&gt;</content><author><name>yaleeyangmsblog</name><uri>http://blogs.msdn.com/members/yaleeyangmsblog.aspx</uri></author><category term="IronPython" scheme="http://blogs.msdn.com/yaleeyangmsblog/archive/tags/IronPython/default.aspx" /></entry><entry><title>Build managed applications using Visual Studio 2005 that target .NET 1.1</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/yaleeyangmsblog/archive/2007/07/05/build-managed-applications-using-visual-studio-2005-that-target-net-1-1.aspx" /><id>http://blogs.msdn.com/yaleeyangmsblog/archive/2007/07/05/build-managed-applications-using-visual-studio-2005-that-target-net-1-1.aspx</id><published>2007-07-05T20:44:00Z</published><updated>2007-07-05T20:44:00Z</updated><content type="html">&lt;P class=MsoListParagraphCxSpFirst style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;SPAN style="FONT-FAMILY: 'Segoe UI','sans-serif'; mso-fareast-font-family: 'Segoe UI'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;We have VS2005 installed.&amp;nbsp;What if we need to provide managed app for .NET 1.1? Do we&amp;nbsp;have to install VS2003 as well? Not really, the following steps instruct us how to build .NET 1.1 managed apps under VS2005.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpFirst style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;SPAN style="FONT-FAMILY: 'Segoe UI','sans-serif'; mso-fareast-font-family: 'Segoe UI'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpFirst style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;SPAN style="FONT-FAMILY: 'Segoe UI','sans-serif'; mso-fareast-font-family: 'Segoe UI'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;1.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri size=3&gt;Make sure that .NET 1.1 SDK installed. Check if “Program Files\Microsoft.NET\SDK\v1.1” exists, otherwise, we can download one from &lt;/FONT&gt;&lt;A href="http://www.microsoft.com/downloads/details.aspx?FamilyId=9B3A2CA6-3647-4070-9F41-A333C6B9181D&amp;amp;displaylang=en"&gt;&lt;FONT face=Calibri color=#800080 size=3&gt;here&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;SPAN style="FONT-FAMILY: 'Segoe UI','sans-serif'; mso-fareast-font-family: 'Segoe UI'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;2.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri size=3&gt;Download &lt;/FONT&gt;&lt;A href="http://www.codeplex.com/MSBee/Release/ProjectReleases.aspx?ReleaseId=18"&gt;&lt;FONT face=Calibri color=#800080 size=3&gt;MSBee&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt; and install it. By default, it will locate at “Program Files\MSBuild\MSBee”.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;SPAN style="FONT-FAMILY: 'Segoe UI','sans-serif'; mso-fareast-font-family: 'Segoe UI'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;3.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri size=3&gt;Assume we already have VS2005 csproj file (also works for vbporj) and it should be back-compatible with .NET 1.1. Edit it by using any text editor tool, for example, notepad. Find the line&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;FONT face=Calibri size=3&gt;“&lt;B style="mso-bidi-font-weight: normal"&gt;&amp;lt;Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /&amp;gt;&lt;/B&gt;” and insert line&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;FONT face=Calibri size=3&gt;“&lt;B style="mso-bidi-font-weight: normal"&gt;&amp;lt;Import Project="$(MSBuildExtensionsPath)\MSBee\MSBuildExtras.Fx1_1.CSharp.targets" Condition=" '$(BuildingInsideVisualStudio)' == '' AND '$(TargetFX1_1)'=='true'" /&amp;gt;&lt;/B&gt;” after it.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;SPAN style="FONT-FAMILY: 'Segoe UI','sans-serif'; mso-fareast-font-family: 'Segoe UI'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;4.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri size=3&gt;Open Visual Studio 2005 Command Prompt (under Start-&amp;gt;All Programs-&amp;gt;Microsoft Visual Studio 2005-&amp;gt;Visual Studio Tools). Go to the directory csproj located and type command&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;FONT face=Calibri size=3&gt;“&lt;B style="mso-bidi-font-weight: normal"&gt;msbuild ourApp.csporj /t:Rebuild /p:TargetFX1_1=true&lt;/B&gt;”. From build log in console, we’ll see the project refers to .NET 1.1 SDK.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpLast style="MARGIN: 0in 0in 10pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;SPAN style="FONT-FAMILY: 'Segoe UI','sans-serif'; mso-fareast-font-family: 'Segoe UI'"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;5.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri size=3&gt;Make sure the folder “FX1_1” is created under bin directory. The managed app or assembly should be inside it. By using “&lt;B style="mso-bidi-font-weight: normal"&gt;ildasm ourTarget.dll&lt;/B&gt;”, the manifest shows version as v1.1.4322. This is exactly what we want.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpLast style="MARGIN: 0in 0in 10pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;FONT face=Calibri size=3&gt;For other detailed info of MSBee, please refer to its document as "&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Calibri','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: SimSun; mso-fareast-theme-font: minor-fareast; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin"&gt;Program Files\MSBuild\MSBee\MSBee ReadMe.doc"&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3710252" width="1" height="1"&gt;</content><author><name>yaleeyangmsblog</name><uri>http://blogs.msdn.com/members/yaleeyangmsblog.aspx</uri></author></entry><entry><title>Five ways debugging .NET Windows service</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/yaleeyangmsblog/archive/2007/05/02/three-ways-debugging-net-windows-service.aspx" /><id>http://blogs.msdn.com/yaleeyangmsblog/archive/2007/05/02/three-ways-debugging-net-windows-service.aspx</id><published>2007-05-02T02:21:00Z</published><updated>2007-05-02T02:21:00Z</updated><content type="html">&lt;FONT face=Calibri&gt;&lt;SPAN style="FONT-SIZE: 12pt; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-SIZE: 12pt; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt;Although debugging a Windows service is not so easy, especially you want to step into OnStart codes, there still exist a couple of techniques to get it done. I compiled them here in order to let Internet searchers get their work done as easy as possible.&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-SIZE: 12pt; mso-bidi-font-family: Calibri; mso-fareast-font-family: Calibri; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-theme-font: minor-latin"&gt;1.&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 12pt; mso-bidi-font-family: Arial; mso-fareast-font-family: 'Times New Roman'; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt;Sleeping reasonable time to let you attach the service process into Visual Studio.&lt;/SPAN&gt;&lt;/B&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-SIZE: 12pt; mso-bidi-font-family: Arial; mso-fareast-font-family: 'Times New Roman'; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt;Writing the first line of OnStart as “&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: black; mso-bidi-font-family: Arial; mso-fareast-font-family: 'Times New Roman'; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt;System.Threading.Thread.Sleep(25000);&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 12pt; mso-bidi-font-family: Arial; mso-fareast-font-family: 'Times New Roman'; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt;”, you’ll be able to have enough time to attach service process into Visual Studio. It’s a little annoying if you’re fast hand, because you have to wait some seconds before hitting your breakpoints. Life is short. (see &lt;A href="http://msdn.microsoft.com/msdnmag/issues/01/12/NETServ/"&gt;&lt;SPAN style="COLOR: blue"&gt;ref&lt;/SPAN&gt;&lt;/A&gt;.)&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-SIZE: 12pt; mso-bidi-font-family: Calibri; mso-fareast-font-family: Calibri; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-theme-font: minor-latin"&gt;2.&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 12pt; mso-bidi-font-family: Arial; mso-fareast-font-family: 'Times New Roman'; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt;Using conditional directive to determine running in service or normal console mode.&lt;/SPAN&gt;&lt;/B&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-SIZE: 12pt; mso-bidi-font-family: Arial; mso-fareast-font-family: 'Times New Roman'; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt;By applying #if(!DEBUG)…(1)…#else…(2)…#endif on your Main method, you’ll be able to write service codes into (1) and the&amp;nbsp;testing codes into (2). What does testing codes look like? Please see the following snippets. You can set breakpoints whichever line you want. (see &lt;A href="http://www.codeproject.com/dotnet/DebugWinServices.asp"&gt;&lt;SPAN style="COLOR: blue"&gt;ref&lt;/SPAN&gt;&lt;/A&gt;.) Michael also mentioned checking "&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: black; mso-bidi-font-family: Arial; mso-fareast-font-family: 'Times New Roman'; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt;Environment.UserInteractive&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 12pt; mso-bidi-font-family: Arial; mso-fareast-font-family: 'Times New Roman'; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt;" to distinguish it's running under service mode. (for details, see comments below from&amp;nbsp;&lt;B style="mso-bidi-font-weight: normal"&gt;Michael&lt;/B&gt;)&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: black; mso-bidi-font-family: Arial; mso-fareast-font-family: 'Times New Roman'; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt;Service1 service = new Service1();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: black; mso-bidi-font-family: Arial; mso-fareast-font-family: 'Times New Roman'; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt;service.OnStart(null);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: black; mso-bidi-font-family: Arial; mso-fareast-font-family: 'Times New Roman'; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt;Console.ReadLine();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: black; mso-bidi-font-family: Arial; mso-fareast-font-family: 'Times New Roman'; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt;service.OnStop();&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: 'Times New Roman'"&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: black; mso-bidi-font-family: Calibri; mso-fareast-font-family: Calibri; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-theme-font: minor-latin"&gt;3.&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 7pt; COLOR: black; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: black; mso-bidi-font-family: Arial; mso-fareast-font-family: 'Times New Roman'; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt;Breaking at service process runtime.&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: black; mso-bidi-font-family: Arial; mso-fareast-font-family: 'Times New Roman'; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt; (Thanks &lt;B style="mso-bidi-font-weight: normal"&gt;Paul Ballard&lt;/B&gt;'s comment)&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: black; mso-bidi-font-family: Arial; mso-fareast-font-family: 'Times New Roman'; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; In debug mode,&amp;nbsp;you can insert “&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: black; mso-bidi-font-family: Arial; mso-fareast-font-family: 'Times New Roman'; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt;System.Diagnostics.Debugger.Lauch() ;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 12pt; COLOR: black; mso-bidi-font-family: Arial; mso-fareast-font-family: 'Times New Roman'; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt;” before the codes where you'd like to be prompted debugger window. So once you start the service from SCM (Service Control Manager),&amp;nbsp;the&amp;nbsp;codes&amp;nbsp;has chance being hit. It actually reminds me that Windows API -- "DebugBreak" or even lower level -- INT 3, both of them might do the same thing in unmanaged world. (see &lt;A href="http://weblogs.asp.net/paulballard/archive/2005/07/12/419175.aspx"&gt;&lt;SPAN style="COLOR: blue"&gt;ref&lt;/SPAN&gt;&lt;/A&gt;.)&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: 'Times New Roman'"&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-SIZE: 12pt; mso-bidi-font-family: Calibri; mso-fareast-font-family: Calibri; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-theme-font: minor-latin"&gt;4.&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 12pt; mso-bidi-font-family: Arial; mso-fareast-font-family: 'Times New Roman'; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt;Using self-built switcher to specify running in service or normal console mode.&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt 0.5in; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-SIZE: 12pt; mso-bidi-font-family: Arial; mso-fareast-font-family: 'Times New Roman'; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt;Moving forward, if we add switcher in the program, which might be even convenient. For example, if we run “&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 9pt; COLOR: black; mso-bidi-font-family: Arial; mso-fareast-font-family: 'Times New Roman'; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt;Service1.exe console&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 12pt; mso-bidi-font-family: Arial; mso-fareast-font-family: 'Times New Roman'; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt;”, it will silently run as console app, otherwise it just go ahead as service. The detail implementation is quite similar to the&amp;nbsp;codes of&amp;nbsp;#2. The only difference is that whether to run testing codes is based on the&amp;nbsp;Main method's parameters&amp;nbsp;instead of using conditional directive. The benefit of the approach is even in release mode, we are able to monitor the service status if we enable kind of tracking mechanism.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-SIZE: 12pt; mso-bidi-font-family: Calibri; mso-fareast-font-family: Calibri; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-theme-font: minor-latin"&gt;5.&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 12pt; mso-bidi-font-family: Arial; mso-fareast-font-family: 'Times New Roman'; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt;Building separate assembly.&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt 0.5in; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-SIZE: 12pt; mso-bidi-font-family: Arial; mso-fareast-font-family: 'Times New Roman'; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt;Regardless any service or console context, we can simply build an assembly implementing kind of interfaces like Start, Stop, etc. We can test these methods by using unit test or any other test scenarios you want. Once it’s done, it’s basically OK for you to embed the assembly into a service project template created by Visual Studio. (for details, see comments below form &lt;B style="mso-bidi-font-weight: normal"&gt;Jack&lt;/B&gt;)&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-SIZE: 12pt; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt;The only drawback of #2, 4 and 5 is that using normal console mode, the account of service might not be able to get tested, because it’s probably not launched as the account's privilege&amp;nbsp;supposed to be, such as localsystem, networkservice, etc. For the account privilege tests, the #1 and 3 are still valid.&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;Happy compiling…&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2365386" width="1" height="1"&gt;</content><author><name>yaleeyangmsblog</name><uri>http://blogs.msdn.com/members/yaleeyangmsblog.aspx</uri></author><category term=".NET" scheme="http://blogs.msdn.com/yaleeyangmsblog/archive/tags/.NET/default.aspx" /><category term="Windows Service" scheme="http://blogs.msdn.com/yaleeyangmsblog/archive/tags/Windows+Service/default.aspx" /></entry><entry><title>Logging customized info in IIS by using AppendToLog</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/yaleeyangmsblog/archive/2007/04/26/appendtolog.aspx" /><id>http://blogs.msdn.com/yaleeyangmsblog/archive/2007/04/26/appendtolog.aspx</id><published>2007-04-26T23:30:00Z</published><updated>2007-04-26T23:30:00Z</updated><content type="html">&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;When we try to log HTTP request and response info of IIS, essentially, we'd like to&amp;nbsp;enable IIS logging as W3C extended format. Unfortunately, IIS (at least 6), doesn't allow to log some customized items such as customized HTTP headers. That's what AppendToLog comes from.&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;Actually, there are two versions of AppendToLog methods. One is IIS COM API (&lt;A href="http://msdn2.microsoft.com/en-us/library/ms524511.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/ms524511.aspx"&gt;&lt;FONT color=#800080&gt;IResponse::AppendToLog&lt;/FONT&gt;&lt;/A&gt;); another is ASP.NET (&lt;A href="http://msdn2.microsoft.com/en-us/library/ms524511.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/ms524511.aspx"&gt;&lt;FONT color=#800080&gt;Response.AppendToLog&lt;/FONT&gt;&lt;/A&gt;). Both of them will append the string to the request uri in the log entry. Once the response is done, the log entry will be flushed to IIS log file. So developers need to define specific separator to distinguish different logging items if AppendToLog is called multiple times.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"&gt;One&amp;nbsp;difference between those two is that IResponse::AppendToLog explicitly says there is 80 bytes limitation, but for Response.AppendToLog, my test proves that there is no problem for 1K.&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2291453" width="1" height="1"&gt;</content><author><name>yaleeyangmsblog</name><uri>http://blogs.msdn.com/members/yaleeyangmsblog.aspx</uri></author><category term="IIS ASP.NET" scheme="http://blogs.msdn.com/yaleeyangmsblog/archive/tags/IIS+ASP.NET/default.aspx" /></entry><entry><title>Unique Web Identification</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/yaleeyangmsblog/archive/2007/03/31/unique-web-identification.aspx" /><id>http://blogs.msdn.com/yaleeyangmsblog/archive/2007/03/31/unique-web-identification.aspx</id><published>2007-03-31T03:00:00Z</published><updated>2007-03-31T03:00:00Z</updated><content type="html">&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;From browser's point of view, what is the unique identification of web site? Nobody won't disagree that it's url in the address bar. Programmatically, you can simply get it by accessing document.location DOM object through Javascript in client side.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Thinking in-depth, it kind of plays a public key to specific page. Web page should be able to verify the signature by using that. The purpose is to prove that the page what the user is looking is exactly from the same server.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;One interesting case is if you don’t want somebody else hosts your page inside IFrame in their page, you can write a simple javascript to prevent. Actually more interesting applications regarding web identification already utilize the technique.&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1996701" width="1" height="1"&gt;</content><author><name>yaleeyangmsblog</name><uri>http://blogs.msdn.com/members/yaleeyangmsblog.aspx</uri></author></entry><entry><title>IIS7 and ASP.NET</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/yaleeyangmsblog/archive/2007/03/28/iis7-and-asp-net.aspx" /><id>http://blogs.msdn.com/yaleeyangmsblog/archive/2007/03/28/iis7-and-asp-net.aspx</id><published>2007-03-28T02:06:00Z</published><updated>2007-03-28T02:06:00Z</updated><content type="html">&lt;P&gt;IIS7 provides two modes while integrating with ASP.NET. One is classic mode as back-compatibility approach, in which ASP.NET plays a role as an ISAPI extension (aspnet_isapi.dll) -- standalone app domain. Another is integrated mode --&amp;nbsp;"enabling ASP.NET components to become full members of the IIS request processing pipeline", in which aspx, web forms and ASP.NET modules are working side by side with native C++ IIS modules in the same pipeline. That means they can take advantage of each other's different services.&lt;/P&gt;
&lt;P&gt;Reference:&lt;/P&gt;
&lt;P&gt;&lt;A class="" title="Explore The Web Server For Windows Vista And Beyond" href="http://msdn.microsoft.com/msdnmag/issues/07/03/IIS7/default.aspx" mce_href="http://msdn.microsoft.com/msdnmag/issues/07/03/IIS7/default.aspx"&gt;Explore The Web Server For Windows Vista And Beyond&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Nice figure inside the article above&lt;/P&gt;
&lt;P&gt;&lt;IMG title="Nice figure inside the article above" style="WIDTH: 792px; HEIGHT: 435px" height=435 alt="Nice figure inside the article above" src="http://msdn.microsoft.com/msdnmag/issues/07/03/IIS7/fig05_L.gif" width=792 mce_src="http://msdn.microsoft.com/msdnmag/issues/07/03/IIS7/fig05_L.gif"&gt;&lt;A class="" title="Nice figure inside the article above" href="http://msdn.microsoft.com/msdnmag/issues/07/03/IIS7/fig05_L.gif" mce_href="http://msdn.microsoft.com/msdnmag/issues/07/03/IIS7/fig05_L.gif"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;A class="" title="Taking advantage of the IIS7 Integrated Pipeline" href="http://www.iis.net/default.aspx?tabid=2&amp;amp;subtabid=25&amp;amp;i=1081&amp;amp;p=1" mce_href="http://www.iis.net/default.aspx?tabid=2&amp;amp;subtabid=25&amp;amp;i=1081&amp;amp;p=1"&gt;Taking advantage of the IIS7 Integrated Pipeline&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1968948" width="1" height="1"&gt;</content><author><name>yaleeyangmsblog</name><uri>http://blogs.msdn.com/members/yaleeyangmsblog.aspx</uri></author><category term="IIS ASP.NET" scheme="http://blogs.msdn.com/yaleeyangmsblog/archive/tags/IIS+ASP.NET/default.aspx" /></entry><entry><title>Dive into “PreAuthenticate”</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/yaleeyangmsblog/archive/2007/02/06/dive-into-preauthenticate.aspx" /><id>http://blogs.msdn.com/yaleeyangmsblog/archive/2007/02/06/dive-into-preauthenticate.aspx</id><published>2007-02-07T02:28:00Z</published><updated>2007-02-07T02:28:00Z</updated><content type="html">&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Based on the definition of “PreAuthenticate” of System.Net in MSDN, &lt;A href="http://msdn2.microsoft.com/en-gb/library/system.net.httpwebrequest.preauthenticate.aspx"&gt;http://msdn2.microsoft.com/en-gb/library/system.net.httpwebrequest.preauthenticate.aspx&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 3.75pt; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'"&gt;“After a client request to a specific Uri is successfully authenticated, if &lt;B&gt;PreAuthenticate&lt;/B&gt; is &lt;B&gt;true&lt;/B&gt; and credentials are supplied, the &lt;B&gt;WWW-authenticate&lt;/B&gt; header is sent with each request to that &lt;B&gt;Uri&lt;/B&gt;; otherwise, the request uses standard authentication procedures. &lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 7.5pt 0in 3.75pt; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'"&gt;With the exception of the first request, the &lt;/SPAN&gt;&lt;A href="ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.WinFX4VS.1033/cpref14/html/P_System_Net_WebRequest_PreAuthenticate.htm"&gt;&lt;SPAN style="FONT-SIZE: 8.5pt; COLOR: blue; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-size: 11.0pt"&gt;PreAuthenticate&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'"&gt; property indicates whether to send authentication information with subsequent requests to the specific &lt;B&gt;Uri&lt;/B&gt; without waiting to be challenged by the server.”&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 7.5pt 0in 3.75pt; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;The example is shown as below:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 3.75pt; LINE-HEIGHT: normal"&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'"&gt;PreAuthenticate&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'"&gt; is &lt;B&gt;false&lt;/B&gt; : &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraph style="MARGIN: 7.5pt 0in 3.75pt 0.5in; TEXT-INDENT: -0.25in; LINE-HEIGHT: normal; mso-list: l0 level1 lfo1; mso-add-space: auto"&gt;&lt;SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: Verdana; mso-fareast-font-family: Verdana"&gt;&lt;SPAN style="mso-list: Ignore"&gt;1.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'"&gt;Client: GET someUrl &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 7.5pt 0in 3.75pt; TEXT-INDENT: 0.5in; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'"&gt;Server: 401 WWW-Authenticate Basic &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 7.5pt 0in 3.75pt; TEXT-INDENT: 0.5in; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'"&gt;Client: GET with Authorization headers &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 7.5pt 0in 3.75pt; TEXT-INDENT: 0.5in; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'"&gt;Server: 200 OK &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraph style="MARGIN: 7.5pt 0in 3.75pt 0.5in; TEXT-INDENT: -0.25in; LINE-HEIGHT: normal; mso-list: l0 level1 lfo1; mso-add-space: auto"&gt;&lt;SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: Verdana; mso-fareast-font-family: Verdana"&gt;&lt;SPAN style="mso-list: Ignore"&gt;2.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'"&gt;Client: GET someUrl &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 7.5pt 0in 3.75pt; TEXT-INDENT: 0.5in; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'"&gt;Server: 401 WWW-Authenticate Basic &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 7.5pt 0in 3.75pt; TEXT-INDENT: 0.5in; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'"&gt;Client: GET with Authorization headers &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 7.5pt 0in 3.75pt; TEXT-INDENT: 0.5in; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'"&gt;Server: 200 OK &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 7.5pt 0in 3.75pt; LINE-HEIGHT: normal"&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'"&gt;PreAuthenticate&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'"&gt; is &lt;B&gt;true&lt;/B&gt; : &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraph style="MARGIN: 7.5pt 0in 3.75pt 0.5in; TEXT-INDENT: -0.25in; LINE-HEIGHT: normal; mso-list: l1 level1 lfo2; mso-add-space: auto"&gt;&lt;SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: Verdana; mso-fareast-font-family: Verdana"&gt;&lt;SPAN style="mso-list: Ignore"&gt;1.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'"&gt;Client: GET someUrl &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 7.5pt 0in 3.75pt; TEXT-INDENT: 0.5in; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'"&gt;Server: 401 WWW-Authenticate Basic &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 7.5pt 0in 3.75pt; TEXT-INDENT: 0.5in; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'"&gt;Client: GET with Authorization headers &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraph style="MARGIN: 7.5pt 0in 3.75pt 0.5in; TEXT-INDENT: -0.25in; LINE-HEIGHT: normal; mso-list: l1 level1 lfo2; mso-add-space: auto"&gt;&lt;SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: Verdana; mso-fareast-font-family: Verdana"&gt;&lt;SPAN style="mso-list: Ignore"&gt;2.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'"&gt;Server: 200 OK &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 7.5pt 0in 3.75pt; TEXT-INDENT: 0.5in; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'"&gt;Client: GET someUrl with Authorization headers &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 7.5pt 0in 3.75pt; TEXT-INDENT: 0.5in; LINE-HEIGHT: normal"&gt;&lt;SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;So, if the authentication scheme supports pre-authenticate, for instance, see RFC 2617 – Digest Access Authentication, we will save (n – 1) round trips. We cannot simply avoid the first one because the initial nonce should be sent from server side.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;The secret behind the curtain is “Nc” in HTTP AuthData. “For subsequent requests, “Nc” maintained by client must be greater than the last value it used and nonce of server got from the first HTTP 401 response, will be reused.&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1614698" width="1" height="1"&gt;</content><author><name>yaleeyangmsblog</name><uri>http://blogs.msdn.com/members/yaleeyangmsblog.aspx</uri></author><category term="Authenticate" scheme="http://blogs.msdn.com/yaleeyangmsblog/archive/tags/Authenticate/default.aspx" /><category term=".NET" scheme="http://blogs.msdn.com/yaleeyangmsblog/archive/tags/.NET/default.aspx" /></entry><entry><title>Microsoft Anti-Cross Site Scripting Library V1.5</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/yaleeyangmsblog/archive/2007/02/06/microsoft-anti-cross-site-scripting-library-v1-5.aspx" /><id>http://blogs.msdn.com/yaleeyangmsblog/archive/2007/02/06/microsoft-anti-cross-site-scripting-library-v1-5.aspx</id><published>2007-02-07T01:45:00Z</published><updated>2007-02-07T01:45:00Z</updated><content type="html">&lt;P&gt;Download library from &lt;A href="http://www.microsoft.com/downloads/thankyou.aspx?familyId=EFB9C819-53FF-4F82-BFAF-E11625130C25&amp;amp;displayLang=en"&gt;http://www.microsoft.com/downloads/thankyou.aspx?familyId=EFB9C819-53FF-4F82-BFAF-E11625130C25&amp;amp;displayLang=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;The libary uses "the principle of inclusions technique where a set of valid characters are first defined and anything outside that set is automatically encoded."&amp;nbsp;Seven main encoding methods cover 7 normal web encoding cases: HTML, HTML attributes, Javascript, URLs, VB Script, XML and XML attributes.&lt;/P&gt;
&lt;P&gt;
&lt;TABLE class=MsoNormalTable style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; WIDTH: 479.6pt; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse; mso-border-top-alt: solid #CCCCCC .5pt; mso-border-left-alt: solid #CCCCCC .5pt; mso-padding-alt: 2.6pt 2.6pt 2.6pt 2.6pt" cellSpacing=0 cellPadding=0 width=639 border=1 class="MsoNormalTable"&gt;
&lt;TBODY&gt;
&lt;TR style="HEIGHT: 9.15pt; mso-yfti-irow: 0; mso-yfti-firstrow: yes"&gt;
&lt;TD class="" style="BORDER-RIGHT: #cccccc 1pt solid; PADDING-RIGHT: 2.6pt; BORDER-TOP: #cccccc 1pt solid; PADDING-LEFT: 2.6pt; BACKGROUND: #eeeeee; PADDING-BOTTOM: 2.6pt; BORDER-LEFT: #cccccc 1pt solid; WIDTH: 19.72%; PADDING-TOP: 2.6pt; BORDER-BOTTOM: #cccccc 1pt solid; HEIGHT: 9.15pt; mso-border-alt: solid #CCCCCC .5pt" vAlign=top width="19%"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 7pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'"&gt;Encoding Method&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: 'Verdana','sans-serif'"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT: #cccccc 1pt solid; PADDING-RIGHT: 2.6pt; BORDER-TOP: #cccccc 1pt solid; PADDING-LEFT: 2.6pt; BACKGROUND: #eeeeee; PADDING-BOTTOM: 2.6pt; BORDER-LEFT: #d4d0c8; WIDTH: 45.92%; PADDING-TOP: 2.6pt; BORDER-BOTTOM: #cccccc 1pt solid; HEIGHT: 9.15pt; mso-border-left-alt: inset #ECE9D8 .75pt; mso-border-alt: solid #CCCCCC .5pt" vAlign=top width="45%"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 7pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'"&gt;Should be Used if …&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: 'Verdana','sans-serif'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT: #cccccc 1pt solid; PADDING-RIGHT: 2.6pt; BORDER-TOP: #cccccc 1pt solid; PADDING-LEFT: 2.6pt; BACKGROUND: #eeeeee; PADDING-BOTTOM: 2.6pt; BORDER-LEFT: #d4d0c8; WIDTH: 34.38%; PADDING-TOP: 2.6pt; BORDER-BOTTOM: #cccccc 1pt solid; HEIGHT: 9.15pt; mso-border-left-alt: inset #ECE9D8 .75pt; mso-border-alt: solid #CCCCCC .5pt" vAlign=top width="34%"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 7pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'"&gt;Example / Pattern&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="HEIGHT: 18.35pt; mso-yfti-irow: 1"&gt;
&lt;TD class="" style="BORDER-RIGHT: #cccccc 1pt solid; PADDING-RIGHT: 2.6pt; BORDER-TOP: #d4d0c8; PADDING-LEFT: 2.6pt; PADDING-BOTTOM: 2.6pt; BORDER-LEFT: #cccccc 1pt solid; WIDTH: 19.72%; PADDING-TOP: 2.6pt; BORDER-BOTTOM: #cccccc 1pt solid; HEIGHT: 18.35pt; BACKGROUND-COLOR: transparent; mso-border-top-alt: inset #ECE9D8 .75pt; mso-border-alt: solid #CCCCCC .5pt" vAlign=top width="19%"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: 'Verdana','sans-serif'"&gt;HtmlEncode&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT: #cccccc 1pt solid; PADDING-RIGHT: 2.6pt; BORDER-TOP: #d4d0c8; PADDING-LEFT: 2.6pt; PADDING-BOTTOM: 2.6pt; BORDER-LEFT: #d4d0c8; WIDTH: 45.92%; PADDING-TOP: 2.6pt; BORDER-BOTTOM: #cccccc 1pt solid; HEIGHT: 18.35pt; BACKGROUND-COLOR: transparent; mso-border-top-alt: inset #ECE9D8 .75pt; mso-border-left-alt: inset #ECE9D8 .75pt; mso-border-bottom-alt: solid #CCCCCC .5pt; mso-border-right-alt: solid #CCCCCC .5pt" vAlign=top width="45%"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: 'Verdana','sans-serif'"&gt;Un-trusted input is used in HTML output, except when assigning to an HTML attribute.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: 'Verdana','sans-serif'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT: #cccccc 1pt solid; PADDING-RIGHT: 2.6pt; BORDER-TOP: #d4d0c8; PADDING-LEFT: 2.6pt; PADDING-BOTTOM: 2.6pt; BORDER-LEFT: #d4d0c8; WIDTH: 34.38%; PADDING-TOP: 2.6pt; BORDER-BOTTOM: #cccccc 1pt solid; HEIGHT: 18.35pt; BACKGROUND-COLOR: transparent; mso-border-top-alt: inset #ECE9D8 .75pt; mso-border-left-alt: inset #ECE9D8 .75pt; mso-border-bottom-alt: solid #CCCCCC .5pt; mso-border-right-alt: solid #CCCCCC .5pt" vAlign=top width="34%"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: 'Courier New'"&gt;&amp;lt;a href=”http://www.contoso.com”&amp;gt;Click Here &lt;B style="mso-bidi-font-weight: normal"&gt;[Un-trusted input]&amp;lt;/&lt;/B&gt;a&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="HEIGHT: 26.95pt; mso-yfti-irow: 2"&gt;
&lt;TD class="" style="BORDER-RIGHT: #cccccc 1pt solid; PADDING-RIGHT: 2.6pt; BORDER-TOP: #d4d0c8; PADDING-LEFT: 2.6pt; PADDING-BOTTOM: 2.6pt; BORDER-LEFT: #cccccc 1pt solid; WIDTH: 19.72%; PADDING-TOP: 2.6pt; BORDER-BOTTOM: #cccccc 1pt solid; HEIGHT: 26.95pt; BACKGROUND-COLOR: transparent; mso-border-top-alt: inset #ECE9D8 .75pt; mso-border-alt: solid #CCCCCC .5pt" vAlign=top width="19%"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: 'Verdana','sans-serif'"&gt;HtmlAttributeEncode&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT: #cccccc 1pt solid; PADDING-RIGHT: 2.6pt; BORDER-TOP: #d4d0c8; PADDING-LEFT: 2.6pt; PADDING-BOTTOM: 2.6pt; BORDER-LEFT: #d4d0c8; WIDTH: 45.92%; PADDING-TOP: 2.6pt; BORDER-BOTTOM: #cccccc 1pt solid; HEIGHT: 26.95pt; BACKGROUND-COLOR: transparent; mso-border-top-alt: inset #ECE9D8 .75pt; mso-border-left-alt: inset #ECE9D8 .75pt; mso-border-bottom-alt: solid #CCCCCC .5pt; mso-border-right-alt: solid #CCCCCC .5pt" vAlign=top width="45%"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: 'Verdana','sans-serif'"&gt;Un-trusted input is used as an HTML attribute&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: 'Verdana','sans-serif'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT: #cccccc 1pt solid; PADDING-RIGHT: 2.6pt; BORDER-TOP: #d4d0c8; PADDING-LEFT: 2.6pt; PADDING-BOTTOM: 2.6pt; BORDER-LEFT: #d4d0c8; WIDTH: 34.38%; PADDING-TOP: 2.6pt; BORDER-BOTTOM: #cccccc 1pt solid; HEIGHT: 26.95pt; BACKGROUND-COLOR: transparent; mso-border-top-alt: inset #ECE9D8 .75pt; mso-border-left-alt: inset #ECE9D8 .75pt; mso-border-bottom-alt: solid #CCCCCC .5pt; mso-border-right-alt: solid #CCCCCC .5pt" vAlign=top width="34%"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: 'Courier New'"&gt;&amp;lt;hr noshade size=&lt;B style="mso-bidi-font-weight: normal"&gt;[Un-trusted input]&lt;/B&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="HEIGHT: 9.7pt; mso-yfti-irow: 3"&gt;
&lt;TD class="" style="BORDER-RIGHT: #cccccc 1pt solid; PADDING-RIGHT: 2.6pt; BORDER-TOP: #d4d0c8; PADDING-LEFT: 2.6pt; PADDING-BOTTOM: 2.6pt; BORDER-LEFT: #cccccc 1pt solid; WIDTH: 19.72%; PADDING-TOP: 2.6pt; BORDER-BOTTOM: #ece9d8 1pt inset; HEIGHT: 9.7pt; BACKGROUND-COLOR: transparent; mso-border-top-alt: inset #ECE9D8 .75pt; mso-border-left-alt: solid #CCCCCC .5pt; mso-border-bottom-alt: inset #ECE9D8 .75pt; mso-border-right-alt: solid #CCCCCC .5pt" vAlign=top width="19%"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: 'Verdana','sans-serif'"&gt;JavaScriptEncode&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT: #cccccc 1pt solid; PADDING-RIGHT: 2.6pt; BORDER-TOP: #d4d0c8; PADDING-LEFT: 2.6pt; PADDING-BOTTOM: 2.6pt; BORDER-LEFT: #d4d0c8; WIDTH: 45.92%; PADDING-TOP: 2.6pt; BORDER-BOTTOM: #ece9d8 1pt inset; HEIGHT: 9.7pt; BACKGROUND-COLOR: transparent; mso-border-top-alt: inset #ECE9D8 .75pt; mso-border-left-alt: inset #ECE9D8 .75pt; mso-border-alt: inset #ECE9D8 .75pt; mso-border-right-alt: solid #CCCCCC .5pt" vAlign=top width="45%"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: 'Verdana','sans-serif'"&gt;Un-trusted input is used within a JavaScript context&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT: #cccccc 1pt solid; PADDING-RIGHT: 2.6pt; BORDER-TOP: #d4d0c8; PADDING-LEFT: 2.6pt; PADDING-BOTTOM: 2.6pt; BORDER-LEFT: #d4d0c8; WIDTH: 34.38%; PADDING-TOP: 2.6pt; BORDER-BOTTOM: #ece9d8 1pt inset; HEIGHT: 9.7pt; BACKGROUND-COLOR: transparent; mso-border-top-alt: inset #ECE9D8 .75pt; mso-border-left-alt: inset #ECE9D8 .75pt; mso-border-alt: inset #ECE9D8 .75pt; mso-border-right-alt: solid #CCCCCC .5pt" vAlign=top width="34%"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: 'Courier New'"&gt;&amp;lt;script type=”text/javascript”&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: 'Courier New'"&gt;…&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: 'Courier New'"&gt;[Un-trusted input]&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: 'Courier New'"&gt;…&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: 'Courier New'"&gt;&amp;lt;/script&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: 'Courier New'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="HEIGHT: 9.7pt; mso-yfti-irow: 4"&gt;
&lt;TD class="" style="BORDER-RIGHT: #cccccc 1pt solid; PADDING-RIGHT: 2.6pt; BORDER-TOP: #d4d0c8; PADDING-LEFT: 2.6pt; PADDING-BOTTOM: 2.6pt; BORDER-LEFT: #cccccc 1pt solid; WIDTH: 19.72%; PADDING-TOP: 2.6pt; BORDER-BOTTOM: #ece9d8 1pt inset; HEIGHT: 9.7pt; BACKGROUND-COLOR: transparent; mso-border-top-alt: inset #ECE9D8 .75pt; mso-border-left-alt: solid #CCCCCC .5pt; mso-border-bottom-alt: inset #ECE9D8 .75pt; mso-border-right-alt: solid #CCCCCC .5pt" vAlign=top width="19%"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: 'Verdana','sans-serif'"&gt;UrlEncode&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT: #cccccc 1pt solid; PADDING-RIGHT: 2.6pt; BORDER-TOP: #d4d0c8; PADDING-LEFT: 2.6pt; PADDING-BOTTOM: 2.6pt; BORDER-LEFT: #d4d0c8; WIDTH: 45.92%; PADDING-TOP: 2.6pt; BORDER-BOTTOM: #ece9d8 1pt inset; HEIGHT: 9.7pt; BACKGROUND-COLOR: transparent; mso-border-top-alt: inset #ECE9D8 .75pt; mso-border-left-alt: inset #ECE9D8 .75pt; mso-border-alt: inset #ECE9D8 .75pt; mso-border-right-alt: solid #CCCCCC .5pt" vAlign=top width="45%"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: 'Courier New'; mso-no-proof: yes"&gt;Un-trusted input is used in a URL (such as a value in a querystring)&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: 'Verdana','sans-serif'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT: #cccccc 1pt solid; PADDING-RIGHT: 2.6pt; BORDER-TOP: #d4d0c8; PADDING-LEFT: 2.6pt; PADDING-BOTTOM: 2.6pt; BORDER-LEFT: #d4d0c8; WIDTH: 34.38%; PADDING-TOP: 2.6pt; BORDER-BOTTOM: #ece9d8 1pt inset; HEIGHT: 9.7pt; BACKGROUND-COLOR: transparent; mso-border-top-alt: inset #ECE9D8 .75pt; mso-border-left-alt: inset #ECE9D8 .75pt; mso-border-alt: inset #ECE9D8 .75pt; mso-border-right-alt: solid #CCCCCC .5pt" vAlign=top width="34%"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&amp;lt;a href=”http://search.msn.com/results.aspx?q=&lt;B style="mso-bidi-font-weight: normal"&gt;[Un-trusted-input]”&lt;/B&gt;&amp;gt;Click Here!&amp;lt;/a&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="HEIGHT: 9.15pt; mso-yfti-irow: 5"&gt;
&lt;TD class="" style="BORDER-RIGHT: #cccccc 1pt solid; PADDING-RIGHT: 2.6pt; BORDER-TOP: #d4d0c8; PADDING-LEFT: 2.6pt; PADDING-BOTTOM: 2.6pt; BORDER-LEFT: #cccccc 1pt solid; WIDTH: 19.72%; PADDING-TOP: 2.6pt; BORDER-BOTTOM: #ece9d8 1pt inset; HEIGHT: 9.15pt; BACKGROUND-COLOR: transparent; mso-border-top-alt: inset #ECE9D8 .75pt; mso-border-left-alt: solid #CCCCCC .5pt; mso-border-bottom-alt: inset #ECE9D8 .75pt; mso-border-right-alt: solid #CCCCCC .5pt" vAlign=top width="19%"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: 'Verdana','sans-serif'"&gt;VisualBasicScriptEncode&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT: #cccccc 1pt solid; PADDING-RIGHT: 2.6pt; BORDER-TOP: #d4d0c8; PADDING-LEFT: 2.6pt; PADDING-BOTTOM: 2.6pt; BORDER-LEFT: #d4d0c8; WIDTH: 45.92%; PADDING-TOP: 2.6pt; BORDER-BOTTOM: #ece9d8 1pt inset; HEIGHT: 9.15pt; BACKGROUND-COLOR: transparent; mso-border-top-alt: inset #ECE9D8 .75pt; mso-border-left-alt: inset #ECE9D8 .75pt; mso-border-alt: inset #ECE9D8 .75pt; mso-border-right-alt: solid #CCCCCC .5pt" vAlign=top width="45%"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: 'Verdana','sans-serif'"&gt;Un-trusted input is used within a Visual Basic Script context&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT: #cccccc 1pt solid; PADDING-RIGHT: 2.6pt; BORDER-TOP: #d4d0c8; PADDING-LEFT: 2.6pt; PADDING-BOTTOM: 2.6pt; BORDER-LEFT: #d4d0c8; WIDTH: 34.38%; PADDING-TOP: 2.6pt; BORDER-BOTTOM: #ece9d8 1pt inset; HEIGHT: 9.15pt; BACKGROUND-COLOR: transparent; mso-border-top-alt: inset #ECE9D8 .75pt; mso-border-left-alt: inset #ECE9D8 .75pt; mso-border-alt: inset #ECE9D8 .75pt; mso-border-right-alt: solid #CCCCCC .5pt" vAlign=top width="34%"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: 'Courier New'"&gt;&amp;lt;script type=”text/vbscript” language=”vbscript”&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: 'Courier New'"&gt;…&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: 'Courier New'"&gt;[Un-trusted input]&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: 'Courier New'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: 'Courier New'"&gt;…&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: 'Courier New'"&gt;&amp;lt;/script&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: 'Courier New'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="HEIGHT: 9.7pt; mso-yfti-irow: 6"&gt;
&lt;TD class="" style="BORDER-RIGHT: #cccccc 1pt solid; PADDING-RIGHT: 2.6pt; BORDER-TOP: #d4d0c8; PADDING-LEFT: 2.6pt; PADDING-BOTTOM: 2.6pt; BORDER-LEFT: #cccccc 1pt solid; WIDTH: 19.72%; PADDING-TOP: 2.6pt; BORDER-BOTTOM: #ece9d8 1pt inset; HEIGHT: 9.7pt; BACKGROUND-COLOR: transparent; mso-border-top-alt: inset #ECE9D8 .75pt; mso-border-left-alt: solid #CCCCCC .5pt; mso-border-bottom-alt: inset #ECE9D8 .75pt; mso-border-right-alt: solid #CCCCCC .5pt" vAlign=top width="19%"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: 'Verdana','sans-serif'"&gt;XmlEncode&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT: #cccccc 1pt solid; PADDING-RIGHT: 2.6pt; BORDER-TOP: #d4d0c8; PADDING-LEFT: 2.6pt; PADDING-BOTTOM: 2.6pt; BORDER-LEFT: #d4d0c8; WIDTH: 45.92%; PADDING-TOP: 2.6pt; BORDER-BOTTOM: #ece9d8 1pt inset; HEIGHT: 9.7pt; BACKGROUND-COLOR: transparent; mso-border-top-alt: inset #ECE9D8 .75pt; mso-border-left-alt: inset #ECE9D8 .75pt; mso-border-alt: inset #ECE9D8 .75pt; mso-border-right-alt: solid #CCCCCC .5pt" vAlign=top width="45%"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: 'Verdana','sans-serif'"&gt;Un-trusted input is used in XML output, except when assigning to a XML attribute.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT: #cccccc 1pt solid; PADDING-RIGHT: 2.6pt; BORDER-TOP: #d4d0c8; PADDING-LEFT: 2.6pt; PADDING-BOTTOM: 2.6pt; BORDER-LEFT: #d4d0c8; WIDTH: 34.38%; PADDING-TOP: 2.6pt; BORDER-BOTTOM: #ece9d8 1pt inset; HEIGHT: 9.7pt; BACKGROUND-COLOR: transparent; mso-border-top-alt: inset #ECE9D8 .75pt; mso-border-left-alt: inset #ECE9D8 .75pt; mso-border-alt: inset #ECE9D8 .75pt; mso-border-right-alt: solid #CCCCCC .5pt" vAlign=top width="34%"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: 'Courier New'"&gt;&amp;lt;xml_tag&amp;gt;&lt;B style="mso-bidi-font-weight: normal"&gt;[Un-trusted input]&lt;/B&gt;&amp;lt;/xml_tag&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="HEIGHT: 9.7pt; mso-yfti-irow: 7; mso-yfti-lastrow: yes"&gt;
&lt;TD class="" style="BORDER-RIGHT: #cccccc 1pt solid; PADDING-RIGHT: 2.6pt; BORDER-TOP: #d4d0c8; PADDING-LEFT: 2.6pt; PADDING-BOTTOM: 2.6pt; BORDER-LEFT: #cccccc 1pt solid; WIDTH: 19.72%; PADDING-TOP: 2.6pt; BORDER-BOTTOM: #cccccc 1pt solid; HEIGHT: 9.7pt; BACKGROUND-COLOR: transparent; mso-border-top-alt: inset #ECE9D8 .75pt; mso-border-alt: solid #CCCCCC .5pt" vAlign=top width="19%"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: 'Verdana','sans-serif'"&gt;XmlAttributeEncode&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT: #cccccc 1pt solid; PADDING-RIGHT: 2.6pt; BORDER-TOP: #d4d0c8; PADDING-LEFT: 2.6pt; PADDING-BOTTOM: 2.6pt; BORDER-LEFT: #d4d0c8; WIDTH: 45.92%; PADDING-TOP: 2.6pt; BORDER-BOTTOM: #cccccc 1pt solid; HEIGHT: 9.7pt; BACKGROUND-COLOR: transparent; mso-border-top-alt: inset #ECE9D8 .75pt; mso-border-left-alt: inset #ECE9D8 .75pt; mso-border-bottom-alt: solid #CCCCCC .5pt; mso-border-right-alt: solid #CCCCCC .5pt" vAlign=top width="45%"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: 'Verdana','sans-serif'"&gt;Un-trusted input is used as a XML attribute&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" style="BORDER-RIGHT: #cccccc 1pt solid; PADDING-RIGHT: 2.6pt; BORDER-TOP: #d4d0c8; PADDING-LEFT: 2.6pt; PADDING-BOTTOM: 2.6pt; BORDER-LEFT: #d4d0c8; WIDTH: 34.38%; PADDING-TOP: 2.6pt; BORDER-BOTTOM: #cccccc 1pt solid; HEIGHT: 9.7pt; BACKGROUND-COLOR: transparent; mso-border-top-alt: inset #ECE9D8 .75pt; mso-border-left-alt: inset #ECE9D8 .75pt; mso-border-bottom-alt: solid #CCCCCC .5pt; mso-border-right-alt: solid #CCCCCC .5pt" vAlign=top width="34%"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: 'Courier New'"&gt;&amp;lt;xml_tag attribute=&lt;B style="mso-bidi-font-weight: normal"&gt;[Un-trusted input]&lt;/B&gt;&amp;gt;Some Text&amp;lt;/xml_tag&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: 'Courier New'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/P&gt;
&lt;P&gt;Note that &lt;SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: 'Verdana','sans-serif'"&gt;UrlEncode&lt;/SPAN&gt;&amp;nbsp;is only for encoding component of url instead of the whole url. If the whole url passed as one parameter, it should be validated using regular expressions as&lt;/P&gt;
&lt;P&gt;
&lt;TABLE class=MsoNormalTable style="WIDTH: 480.75pt; mso-cellspacing: 1.5pt" cellPadding=0 width=641 border=0 class="MsoNormalTable"&gt;
&lt;TBODY&gt;
&lt;TR style="HEIGHT: 9.5pt; mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes"&gt;
&lt;TD class="" style="BORDER-RIGHT: #d4d0c8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #d4d0c8; PADDING-LEFT: 0.75pt; BACKGROUND: #eeeeee; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #d4d0c8; WIDTH: 477.75pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #d4d0c8; HEIGHT: 9.5pt" width=637&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN lang=PT-BR style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-ansi-language: PT-BR"&gt;^(ht|f)tp(s?)\:\/\/[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*(:(0-9)*)*(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+=&amp;amp;amp;%\$#_]*)?$&lt;/SPAN&gt;&lt;SPAN lang=PT-BR style="FONT-SIZE: 8pt; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-language: PT-BR"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/P&gt;
&lt;P&gt;References:&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-ansi-language: EN-US; mso-bidi-language: AR-SA"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-ansi-language: EN-US; mso-bidi-language: AR-SA"&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 3pt 45.35pt; TEXT-INDENT: -17pt; LINE-HEIGHT: 110%; mso-list: l0 level1 lfo2; tab-stops: list 45.35pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: gray; LINE-HEIGHT: 110%; FONT-FAMILY: 'Wingdings 2'; mso-bidi-font-family: 'Wingdings 2'; mso-fareast-font-family: 'Wingdings 2'; mso-bidi-font-size: 8.0pt"&gt;&lt;SPAN style="mso-list: Ignore"&gt;¾&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-AU style="FONT-SIZE: 8pt; LINE-HEIGHT: 110%; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-language: EN-AU"&gt;Document: Microsoft Anti-Cross Site Scripting Library V1.5 - User Guide (after installation library)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 3pt 45.35pt; TEXT-INDENT: -17pt; LINE-HEIGHT: 110%; mso-list: l0 level1 lfo2; tab-stops: list 45.35pt"&gt;&lt;SPAN lang=EN-AU style="FONT-SIZE: 8pt; LINE-HEIGHT: 110%; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-language: EN-AU"&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: gray; LINE-HEIGHT: 110%; FONT-FAMILY: 'Wingdings 2'; mso-bidi-font-family: 'Wingdings 2'; mso-fareast-font-family: 'Wingdings 2'; mso-bidi-font-size: 8.0pt"&gt;&lt;SPAN style="mso-list: Ignore"&gt;¾&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; LINE-HEIGHT: 110%; FONT-FAMILY: 'Verdana','sans-serif'"&gt;Forum of ASP.NET XSS attack:&amp;nbsp;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-ansi-language: EN-US; mso-bidi-language: AR-SA"&gt;&lt;A title=blocked::http://forums.asp.net/1107/ShowForum.aspx href="http://forums.asp.net/1107/ShowForum.aspx"&gt;&lt;FONT color=#800080&gt;http://forums.asp.net/1107/ShowForum.aspx&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-ansi-language: EN-US; mso-bidi-language: AR-SA"&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 3pt 45.35pt; TEXT-INDENT: -17pt; LINE-HEIGHT: 110%; mso-list: l0 level1 lfo2; tab-stops: list 45.35pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: gray; LINE-HEIGHT: 110%; FONT-FAMILY: 'Wingdings 2'; mso-bidi-font-family: 'Wingdings 2'; mso-fareast-font-family: 'Wingdings 2'; mso-bidi-font-size: 8.0pt"&gt;&lt;SPAN style="mso-list: Ignore"&gt;¾&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang=EN-AU style="FONT-SIZE: 8pt; LINE-HEIGHT: 110%; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-language: EN-AU"&gt;How To: Prevent Cross-Site Scripting in ASP.NET, &lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag2/html/PAGHT000004.asp"&gt;&lt;FONT face="Times New Roman"&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag2/html/PAGHT000004.asp&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; LINE-HEIGHT: 110%; FONT-FAMILY: 'Tahoma','sans-serif'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 3pt 45.35pt; TEXT-INDENT: -17pt; LINE-HEIGHT: 110%; mso-list: l0 level1 lfo2; tab-stops: list 45.35pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: gray; LINE-HEIGHT: 110%; FONT-FAMILY: 'Wingdings 2'; mso-bidi-font-family: 'Wingdings 2'; mso-fareast-font-family: 'Wingdings 2'; mso-bidi-font-size: 8.0pt"&gt;&lt;SPAN style="mso-list: Ignore"&gt;¾&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; LINE-HEIGHT: 110%; FONT-FAMILY: 'Verdana','sans-serif'"&gt;How To: Protect From Injection Attacks in ASP.NET, &lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag2/html/PAGHT000003.asp"&gt;&lt;FONT face="Times New Roman"&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag2/html/PAGHT000003.asp&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; LINE-HEIGHT: 110%; FONT-FAMILY: 'Tahoma','sans-serif'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 3pt 45.35pt; TEXT-INDENT: -17pt; LINE-HEIGHT: 110%; mso-list: l0 level1 lfo2; tab-stops: list 45.35pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: gray; LINE-HEIGHT: 110%; FONT-FAMILY: 'Wingdings 2'; mso-bidi-font-family: 'Wingdings 2'; mso-fareast-font-family: 'Wingdings 2'; mso-bidi-font-size: 8.0pt"&gt;&lt;SPAN style="mso-list: Ignore"&gt;¾&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; LINE-HEIGHT: 110%; FONT-FAMILY: 'Verdana','sans-serif'"&gt;Design Guidelines for Secure Web Applications, &lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/thcmch04.asp"&gt;&lt;FONT face="Times New Roman"&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/thcmch04.asp&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; LINE-HEIGHT: 110%; FONT-FAMILY: 'Tahoma','sans-serif'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 3pt 45.35pt; TEXT-INDENT: -17pt; LINE-HEIGHT: 110%; mso-list: l0 level1 lfo2; tab-stops: list 45.35pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: gray; LINE-HEIGHT: 110%; FONT-FAMILY: 'Wingdings 2'; mso-bidi-font-family: 'Wingdings 2'; mso-fareast-font-family: 'Wingdings 2'; mso-bidi-font-size: 8.0pt"&gt;&lt;SPAN style="mso-list: Ignore"&gt;¾&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; LINE-HEIGHT: 110%; FONT-FAMILY: 'Verdana','sans-serif'"&gt;How To: Use Regular Expressions to Constrain Input in ASP.NET, &lt;A href="http://msdn.microsoft.com/library/en-us/dnpag2/html/PAGHT000001.asp"&gt;&lt;FONT face="Times New Roman"&gt;http://msdn.microsoft.com/library/en-us/dnpag2/html/PAGHT000001.asp&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; LINE-HEIGHT: 110%; FONT-FAMILY: 'Tahoma','sans-serif'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1614653" width="1" height="1"&gt;</content><author><name>yaleeyangmsblog</name><uri>http://blogs.msdn.com/members/yaleeyangmsblog.aspx</uri></author><category term="XSS" scheme="http://blogs.msdn.com/yaleeyangmsblog/archive/tags/XSS/default.aspx" /><category term="ASP.NET" scheme="http://blogs.msdn.com/yaleeyangmsblog/archive/tags/ASP.NET/default.aspx" /></entry></feed>