﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>博客园-Component Port</title><link>http://www.cnblogs.com/winkingzhang/</link><description>Life would treat you as you treat them!</description><language>zh-cn</language><lastBuildDate>Thu, 28 Aug 2008 00:49:22 GMT</lastBuildDate><pubDate>Thu, 28 Aug 2008 00:49:22 GMT</pubDate><ttl>60</ttl><item><title>Application Request Routing and the IIS 7.0 Web Management Service</title><link>http://www.cnblogs.com/winkingzhang/archive/2008/08/22/1274332.html</link><dc:creator>winkingzhang</dc:creator><author>winkingzhang</author><pubDate>Fri, 22 Aug 2008 11:01:00 GMT</pubDate><guid>http://www.cnblogs.com/winkingzhang/archive/2008/08/22/1274332.html</guid><wfw:comment>http://www.cnblogs.com/winkingzhang/comments/1274332.html</wfw:comment><comments>http://www.cnblogs.com/winkingzhang/archive/2008/08/22/1274332.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnblogs.com/winkingzhang/comments/commentRss/1274332.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/winkingzhang/services/trackbacks/1274332.html</trackback:ping><description><![CDATA[<p>Yesterday I was having a conversation with <a href="http://forums.iis.net/user/Profile.aspx?UserID=659033" target="_blank" mce_href="http://forums.iis.net/user/Profile.aspx?UserID=659033">Anil Ruia</a> who happens to be the <a href="http://blogs.iis.net/bills/archive/2008/07/09/new-iis7-releases-url-rewrite-application-routing-and-load-balancing-and-powershell-cmd-lets.aspx" target="_blank" mce_href="http://blogs.iis.net/bills/archive/2008/07/09/new-iis7-releases-url-rewrite-application-routing-and-load-balancing-and-powershell-cmd-lets.aspx">ARR</a> (Application Request Routing) developer and based on customer feedback we discussed the idea of using ARR in the context of Remote Management in IIS which solves a question that several people asked me before and thought it would be fun to try it out. </p>
<p>Basically the question that I got asked was "<strong>Can I have a single entry-point exposed for Remote Management?</strong>", or in other words "<strong>Can I provide users with remote administration giving them a single server name like management.myhostingcompany.com, instead of having to give them the specific machine name where their site lives?</strong>". So far the answer to these questions was "not easily", however with the use of ARR and URL Rewriter we will see how easy it is to achieve this.</p>
<p><em>The only thing you need for this to work is install the new URL Rewrite and ARR Module both available here </em><a title="http://blogs.iis.net/bills/archive/2008/07/09/new-iis7-releases-url-rewrite-application-routing-and-load-balancing-and-powershell-cmd-lets.aspx" href="http://blogs.iis.net/bills/archive/2008/07/09/new-iis7-releases-url-rewrite-application-routing-and-load-balancing-and-powershell-cmd-lets.aspx" mce_href="http://blogs.iis.net/bills/archive/2008/07/09/new-iis7-releases-url-rewrite-application-routing-and-load-balancing-and-powershell-cmd-lets.aspx"><em>http://blogs.iis.net/bills/archive/2008/07/09/new-iis7-releases-url-rewrite-application-routing-and-load-balancing-and-powershell-cmd-lets.aspx</em></a>.</p>
<h2>Background</h2>
<p>The Web Management Service (WMSvc) is the service that enables remote administration for IIS 7.0 Manager, providing an HTTPS end-point that exposes functionality similar to Web Services to manage the Web Server (IIS) remotely. This service uses HTTPS for its communication and exposes several configuration options that support giving access to Non-Windows Users (What we call IIS Manager Users), provide a list of IP Restrictions, support only local connections and many more that can be managed using the Management Service feature inside IIS Manager. </p>
<p>To enable remote administration typically you need to: 1) Configure a valid Certificate for SSL, 2) Allow Remote Connections and 3) Start the WMSvc Service, all of which can be performed in IIS Manager. Once you have successfully enabled the remote service you should be able to go to a different machine and be able to connect remotely.</p>
<p><strong>Note: </strong>If you are using Windows Vista, Windows XP, or Windows 2003 to connect to a Windows Server 2008 you need to download and install the client to do this: <a title="http://www.iis.net/downloads/default.aspx?tabid=34&amp;g=6&amp;i=1626" href="http://www.iis.net/downloads/default.aspx?tabid=34&amp;g=6&amp;i=1626" mce_href="http://www.iis.net/downloads/default.aspx?tabid=34&amp;g=6&amp;i=1626">http://www.iis.net/downloads/default.aspx?tabid=34&amp;g=6&amp;i=1626</a></p>
<p>However, one of the drawbacks is that in order to be able to connect to a Web Site, the end-user needs to know the machine name, as well as the name of the Web Site they will be connecting to, which sometimes it would be better to be dynamic. The following image shows the information required to enter when connecting to a Web Site. Note that if connecting to an application you will also need to enter the name of the application.</p>
<p><a href="http://www.carlosag.net/images/d4eab6fb59ea_89B2/ConnectingToSite.jpg" mce_href="http://www.carlosag.net/images/d4eab6fb59ea_89B2/ConnectingToSite.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="318" alt="ConnectingToSite" src="http://www.carlosag.net/images/d4eab6fb59ea_89B2/ConnectingToSite_thumb.jpg" width="441" border="0" mce_src="http://www.carlosag.net/images/d4eab6fb59ea_89B2/ConnectingToSite_thumb.jpg" /></a> </p>
<p>However, this can potentially reduce the flexibility for deployment options, since now your customers have specific knowledge of the physical machine and will limit the flexibility of moving the site to different machines or even changing the name of the site where it is being hosted.</p>
<h2><strong>ARR and URL Rewrite to the rescue.</strong></h2>
<p>ARR has several very interesting capabilities that are really useful for this scenario. First, we can configure it to act as a proxy and basically forward the requests to another server where they actually get processed. This is the simplest configuration option and what it allows you is to have something similar to the next image:</p>
<p><a href="http://www.carlosag.net/images/d4eab6fb59ea_89B2/WMSvcRouting.jpg" mce_href="http://www.carlosag.net/images/d4eab6fb59ea_89B2/WMSvcRouting.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="285" alt="WMSvcRouting" src="http://www.carlosag.net/images/d4eab6fb59ea_89B2/WMSvcRouting_thumb.jpg" width="445" border="0" mce_src="http://www.carlosag.net/images/d4eab6fb59ea_89B2/WMSvcRouting_thumb.jpg" /></a> </p>
<p>To set up this configuration where a front-end management server forwards the IIS Remote Management requests to another server running WMSVC you have to:</p>
<ol>
    <li>Install <a href="http://blogs.iis.net/bills/archive/2008/07/09/new-iis7-releases-url-rewrite-application-routing-and-load-balancing-and-powershell-cmd-lets.aspx" target="_blank" mce_href="http://blogs.iis.net/bills/archive/2008/07/09/new-iis7-releases-url-rewrite-application-routing-and-load-balancing-and-powershell-cmd-lets.aspx">ARR and URL Rewrite</a> in the Server that is intended to be used as the front-end for management requests. Lets call this <strong>ServerA</strong>.</li>
    <li>Create a new Web Site.
    <ol>
        <li>Navigate to IIS Manager-&gt;Site</li>
        <li>Click Add Web Site.</li>
        <li>In the dialog set: Site name:ManagementSite, Binding: https, port: 8172 and choose a valid SSL certificate, specify a phisical path. Click OK </li>
    </ol>
    </li>
    <li>Configure URL Rewrite to Route requests to the IIS Management Service running in the other computer.
    <ol>
        <li>Navigate to IIS Manager-&gt;Sites-&gt;Management Site-&gt;URL Rewrite Module</li>
        <li>Click Add Rule</li>
        <li>Set: Name: RouteWMSvc, Pattern:.*, Rewrite URL:https://<em>&lt;RemoteServer&gt;</em>:8172/{R:0}, Stop Processing rules: Checked.</li>
        <li>This should generate a web.config with similar content (note that my backend, ie the RemoteServer in my case is carlosag2-iis below):
        <p><font color="#0000ff">&lt;</font><font color="#800000">configuration</font><font color="#0000ff">&gt;</font><font color="#000000"> <br />
        &nbsp;&nbsp;&nbsp; </font><font color="#0000ff">&lt;</font><font color="#800000">system.webServer</font><font color="#0000ff">&gt;</font><font color="#000000"> <br />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font><font color="#0000ff">&lt;</font><font color="#800000">rewrite</font><font color="#0000ff">&gt;</font><font color="#000000"> <br />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font><font color="#0000ff">&lt;</font><font color="#800000">rules</font><font color="#0000ff">&gt;</font><font color="#000000"> <br />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font><font color="#0000ff">&lt;</font><font color="#800000">rule</font><font color="#ff0000"> name</font><font color="#0000ff">="RouteWMSvc"</font><font color="#ff0000">&nbsp;</font><font color="#ff0000">stopProcessing</font><font color="#0000ff">="true"&gt;</font><font color="#000000"> <br />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font><font color="#0000ff">&lt;</font><font color="#800000">match</font><font color="#ff0000"> url</font><font color="#0000ff">=".*"</font><font color="#ff0000">&nbsp;</font><font color="#0000ff">/&gt; <br />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</font><font color="#800000">action</font><font color="#ff0000"> type</font><font color="#0000ff">="Rewrite"</font><font color="#ff0000"> url</font><font color="#0000ff">="https://<em>carlosag2-iis:8172</em>/{R:0}"</font><font color="#ff0000">&nbsp;</font><font color="#0000ff">/&gt; <br />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/</font><font color="#800000">rule</font><font color="#0000ff">&gt;</font><font color="#000000"> <br />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font><font color="#0000ff">&lt;/</font><font color="#800000">rules</font><font color="#0000ff">&gt;</font><font color="#000000"> <br />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font><font color="#0000ff">&lt;/</font><font color="#800000">rewrite</font><font color="#0000ff">&gt;</font><font color="#000000"> <br />
        &nbsp;&nbsp;&nbsp; </font><font color="#0000ff">&lt;/</font><font color="#800000">system.webServer</font><font color="#0000ff">&gt;</font><font color="#000000"> <br />
        </font><font color="#0000ff">&lt;/</font><font color="#800000">configuration</font><font color="#0000ff">&gt;</font><font color="#000000"></font> </p>
        </li>
    </ol>
    </li>
    <li>Now you can run IIS Manager in any client machine, specify the <strong>ServerA</strong> as the machine name and specify any web site in the remote <strong>RemoteServer</strong>, the result will be that all requests will be forwarded to the WMSvc running in the remote server. </li>
</ol>
<p>Now, that is interesting and the scenario it allows you to do is potentially have WMSvc IP Request Filtering in the <strong>RemoteServer</strong> and only allow calls from the Management Server where you can do further configuration. Note that this also means that you can have a single public SSL Certificate in the management server and use privately issued certificates (or potentially even self-signed certificates in the remoteserver since you can control installing the certificate into the management server). It also means that the customers no longer use the physical name of the RemoteServer machine but instead connect to the Management Server allowing you to completely move them to another machine and not have to update your clients.</p>
<p><strong></strong></p>
<p><strong>Troubleshooting:</strong> If you are having troubles testing this, the best thing to do is <a href="http://learn.iis.net/page.aspx/266/troubleshooting-failed-requests-using-tracing-in-iis7/" target="_blank" mce_href="http://learn.iis.net/page.aspx/266/troubleshooting-failed-requests-using-tracing-in-iis7/">enable Failed Request Tracing</a> in the ManagementSite, which will tell you exactly what is going on. For example you will get entries like:</p>
<p><strong>Warning: </strong>ModuleName="ApplicationRequestRouting", Notification="EXECUTE_REQUEST_HANDLER", HttpStatus="<strong>502</strong>", HttpReason="Bad Gateway", HttpSubStatus="3", ErrorCode="<strong>2147954575</strong>", ConfigExceptionInfo=""</p>
<p>If you lookup the ErrorCode, it is actually: <strong>ERROR_WINHTTP_SECURE_FAILURE, </strong>this means that you have most likely issues with the certificate. In my case, just to test this what I did is generate a self-signed certificate in the RemoteServer with the name of the machine (carlosag2-iis) and then I installed that certificate using the MMC certificates snap-in in the management server into the Trusted Root Certification Authority. <strong>Disclaimer Warning!! this is something you should only do for testing purposes or if you know what you are doing.</strong></p>
<h2>More Advanced Stuff... Dynamically choosing the machine</h2>
<p>Now, trying to push the capabilities of this I decided to solve another requests that we've heard which is closely related "<strong>Can I have a single management server and dynamically route the requests to the machine where a particular site lives?"</strong></p>
<p>The following picture represents this, where the Management Server dynamically resolves the server that it should talk to using the URL Rewrite Maps functionality.</p>
<p><a href="http://www.carlosag.net/images/d4eab6fb59ea_89B2/WMSvcRoutingMultiple.jpg" mce_href="http://www.carlosag.net/images/d4eab6fb59ea_89B2/WMSvcRoutingMultiple.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="317" alt="WMSvcRoutingMultiple" src="http://www.carlosag.net/images/d4eab6fb59ea_89B2/WMSvcRoutingMultiple_thumb.jpg" width="453" border="0" mce_src="http://www.carlosag.net/images/d4eab6fb59ea_89B2/WMSvcRoutingMultiple_thumb.jpg" /></a> </p>
<p>Turns out this is really simple using URL Rewrite, basically you can write a Rewrite Rule that matches the Site name that is included as part of the Query String and use the Rewrite Maps support for figuring out the machine where this site lives. The following shows such a rule:</p>
<div class="code"><font color="#0000ff">&lt;</font><font color="#800000">?xml</font><font color="#ff0000"> version</font><font color="#0000ff">="1.0"</font><font color="#ff0000"> encoding</font><font color="#0000ff">="UTF-8"?&gt;</font><font color="#000000"> <br />
</font><font color="#0000ff">&lt;</font><font color="#800000">configuration</font><font color="#0000ff">&gt;</font><font color="#000000"> <br />
&nbsp; </font><font color="#0000ff">&lt;</font><font color="#800000">system.webServer</font><font color="#0000ff">&gt;</font><font color="#000000"> <br />
&nbsp;&nbsp;&nbsp; </font><font color="#0000ff">&lt;</font><font color="#800000">rewrite</font><font color="#0000ff">&gt;</font><font color="#000000"> <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font><font color="#0000ff">&lt;</font><font color="#800000">rules</font><font color="#0000ff">&gt;</font><font color="#000000"> <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font><font color="#0000ff">&lt;</font><font color="#800000">rule</font><font color="#ff0000"> name</font><font color="#0000ff">="RouteWMSvc"</font><font color="#ff0000"> stopProcessing</font><font color="#0000ff">="true"&gt;</font><font color="#000000"> <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font><font color="#0000ff">&lt;</font><font color="#800000">match</font><font color="#ff0000"> url</font><font color="#0000ff">=".*"</font><font color="#ff0000">&nbsp;</font><font color="#0000ff">/&gt; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</font><font color="#800000">conditions</font><font color="#0000ff">&gt;</font><font color="#000000"> <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font><font color="#0000ff">&lt;</font><font color="#800000">add</font><font color="#ff0000"> input</font><font color="#0000ff">="{QUERY_STRING}"</font><font color="#ff0000"> pattern</font><font color="#0000ff">="Site=([^&amp;amp;]+)"</font><font color="#ff0000">&nbsp;</font><font color="#0000ff">/&gt; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/</font><font color="#800000">conditions</font><font color="#0000ff">&gt;</font><font color="#000000"> <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font><font color="#0000ff">&lt;</font><font color="#800000">action</font><font color="#ff0000"> type</font><font color="#0000ff">="Rewrite"</font><font color="#ff0000"> url</font><font color="#0000ff">="https://{ServersTable:{C:1}}:8172/{R:0}"</font><font color="#ff0000"> appendQueryString</font><font color="#0000ff">="true"</font><font color="#ff0000">&nbsp;</font><font color="#0000ff">/&gt; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/</font><font color="#800000">rule</font><font color="#0000ff">&gt;</font><font color="#000000"> <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font><font color="#0000ff">&lt;/</font><font color="#800000">rules</font><font color="#0000ff">&gt;</font><font color="#000000"> <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font><font color="#0000ff">&lt;</font><font color="#800000">rewriteMaps</font><font color="#0000ff">&gt;</font><font color="#000000"> <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font><font color="#0000ff">&lt;</font><font color="#800000">rewriteMap</font><font color="#ff0000"> name</font><font color="#0000ff">="ServersTable"&gt;</font><font color="#000000"> <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font><font color="#0000ff">&lt;</font><font color="#800000">add</font><font color="#ff0000"> key</font><font color="#0000ff">="CarlosAgWebSite"</font><font color="#ff0000"> value</font><font color="#0000ff">="carlosag2-iis"</font><font color="#ff0000">&nbsp;</font><font color="#0000ff">/&gt; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</font><font color="#800000">add</font><font color="#ff0000"> key</font><font color="#0000ff">="SomeOtherUserSite"</font><font color="#ff0000"> value</font><font color="#0000ff">="carlosag1-iis"</font><font color="#ff0000">&nbsp;</font><font color="#0000ff">/&gt; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</font><font color="#800000">add</font><font color="#ff0000"> key</font><font color="#0000ff">="SomeOtherUserSite2"</font><font color="#ff0000"> value</font><font color="#0000ff">="carlosag3-iis"</font><font color="#ff0000">&nbsp;</font><font color="#0000ff">/&gt; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/</font><font color="#800000">rewriteMap</font><font color="#0000ff">&gt;</font><font color="#000000"> <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font><font color="#0000ff">&lt;/</font><font color="#800000">rewriteMaps</font><font color="#0000ff">&gt;</font><font color="#000000"> <br />
&nbsp;&nbsp;&nbsp; </font><font color="#0000ff">&lt;/</font><font color="#800000">rewrite</font><font color="#0000ff">&gt;</font><font color="#000000"> <br />
&nbsp; </font><font color="#0000ff">&lt;/</font><font color="#800000">system.webServer</font><font color="#0000ff">&gt;</font><font color="#000000"> <br />
</font><font color="#0000ff">&lt;/</font><font color="#800000">configuration</font><font color="#0000ff">&gt;</font><font color="#000000"></font> </div>
<p>Basically, URL Rewrite matches every request and uses the condition entry to parse the Query String and find the Site name within it. With it, it and using the Map <strong>ServersTable</strong> to resolve the machine name based on the Site name it rewrites the request to the machine where its currently located. This makes it basically route "<a href="https://localhost:8172/Service.axd?...&amp;Site=CarlosAgWebSite" mce_href="https://localhost:8172/Service.axd?...&amp;Site=CarlosAgWebSite"  ?="?">https://localhost:8172/Service.axd?...&amp;Site=CarlosAgWebSite</a> into <a href="https://carlosag2-iis:8172/Service.axd?...&amp;Site=CarlosAgWebSite" mce_href="https://carlosag2-iis:8172/Service.axd?...&amp;Site=CarlosAgWebSite">https://carlosag2-iis:8172/Service.axd?...&amp;Site=CarlosAgWebSite</a>. The end result is that can dynamically at any time just update this table and make ARR route the requests to the right machine giving you complete flexibility on the deployment of sites.</p>
<p>One thing to note is that URL Rewrite is one of the ways you can make the ARR scenario work, however, you could also write your own module that uses any dynamic behavior such as going to a database or a provisioning system or anything else and rewrite the URL programmatically in a way that ARR will understand it and do the routing automatically.</p>
<p>Also, worth to mention that ARR has way more features than just this, making it possible to load-balance requests and many more interesting stuff that I will try to get back in a future post.</p>
<p>With all this you can imagine several benefits, such as single public end-point for remote management of multiple servers, only one valid certificate is needed facing public machines, you can relocate sites at your own will since customers will never really know the real machine name where their site lives, you can use a similar technique to rewrite even the Site Name and give them some friendly name such as their user name or whatever.</p>
<p><strong>Acknowledgements</strong>: I want to thank Anil Ruia and <a class="" href="http://blogs.msdn.com/danielvl" mce_href="http://blogs.msdn.com/danielvl">Daniel Vasquez Lopez</a> who helped figuring out a few issues during this blog and <a class="" title="Ruslan Yakushev" href="http://ruslany.net/" mce_href="http://ruslany.net/">Ruslan Yakushev</a> and <a class="" href="http://blogs.iis.net/wonyoo" mce_href="http://blogs.iis.net/wonyoo">Won Yoo</a> for reviewing its technical accuracy.</p>
<img src ="http://www.cnblogs.com/winkingzhang/aggbug/1274332.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/41924/" target="_blank">[新闻]中国软件协会：SAP羞辱国产软件是不正当竞争</a>]]></description></item><item><title>ASP.NET Application Life Cycle</title><link>http://www.cnblogs.com/winkingzhang/archive/2008/05/28/1209224.html</link><dc:creator>winkingzhang</dc:creator><author>winkingzhang</author><pubDate>Wed, 28 May 2008 06:45:00 GMT</pubDate><guid>http://www.cnblogs.com/winkingzhang/archive/2008/05/28/1209224.html</guid><wfw:comment>http://www.cnblogs.com/winkingzhang/comments/1209224.html</wfw:comment><comments>http://www.cnblogs.com/winkingzhang/archive/2008/05/28/1209224.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnblogs.com/winkingzhang/comments/commentRss/1209224.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/winkingzhang/services/trackbacks/1209224.html</trackback:ping><description><![CDATA[摘要: Have you ever wondered about all the stages that an ASP.NET request goes through?  Ever wonder why it is such a performance hit to have a wildcard mapping to map all extensions on your web server to ASP.NET?  This information corresponds to IIS 5.0 and 6.0. &nbsp;&nbsp;<a href='http://www.cnblogs.com/winkingzhang/archive/2008/05/28/1209224.html'>阅读全文</a><img src ="http://www.cnblogs.com/winkingzhang/aggbug/1209224.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/41923/" target="_blank">[新闻]福布斯：Facebook网站十大最火爆游戏</a>]]></description></item><item><title>CAS and Native Code</title><link>http://www.cnblogs.com/winkingzhang/archive/2008/05/22/1094536.html</link><dc:creator>winkingzhang</dc:creator><author>winkingzhang</author><pubDate>Thu, 22 May 2008 02:54:00 GMT</pubDate><guid>http://www.cnblogs.com/winkingzhang/archive/2008/05/22/1094536.html</guid><wfw:comment>http://www.cnblogs.com/winkingzhang/comments/1094536.html</wfw:comment><comments>http://www.cnblogs.com/winkingzhang/archive/2008/05/22/1094536.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnblogs.com/winkingzhang/comments/commentRss/1094536.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/winkingzhang/services/trackbacks/1094536.html</trackback:ping><description><![CDATA[摘要: CAS is complicated enough to understand when all of the moving parts are written in managed code (and therefore have all the associated managed meta-information like grant sets, etc).  However, once native code comes into play things can get even more confusing.  Let's take a look at how CAS works when there's native code on the call stack.&nbsp;&nbsp;<a href='http://www.cnblogs.com/winkingzhang/archive/2008/05/22/1094536.html'>阅读全文</a><img src ="http://www.cnblogs.com/winkingzhang/aggbug/1094536.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/41922/" target="_blank">[新闻]谷歌允许用户评论搜索结果调整顺序</a>]]></description></item><item><title>WPF 3.5 SP1 feature: IEditableCollectionView</title><link>http://www.cnblogs.com/winkingzhang/archive/2008/05/22/1204581.html</link><dc:creator>winkingzhang</dc:creator><author>winkingzhang</author><pubDate>Thu, 22 May 2008 02:38:00 GMT</pubDate><guid>http://www.cnblogs.com/winkingzhang/archive/2008/05/22/1204581.html</guid><wfw:comment>http://www.cnblogs.com/winkingzhang/comments/1204581.html</wfw:comment><comments>http://www.cnblogs.com/winkingzhang/archive/2008/05/22/1204581.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnblogs.com/winkingzhang/comments/commentRss/1204581.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/winkingzhang/services/trackbacks/1204581.html</trackback:ping><description><![CDATA[摘要: IEditableCollectionView is a new collection view that you can use to supports adding and removing new items, as well as editing items in a transactional way.  It is implemented by ListCollectionView (the default view for ObservableCollection) and BindingListCollectionView (the default view for DataTable).  I will go through an example to further describe it and summarize afterwards. &nbsp;&nbsp;<a href='http://www.cnblogs.com/winkingzhang/archive/2008/05/22/1204581.html'>阅读全文</a><img src ="http://www.cnblogs.com/winkingzhang/aggbug/1204581.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/41922/" target="_blank">[新闻]谷歌允许用户评论搜索结果调整顺序</a>]]></description></item><item><title>Storing text in the clipboard using Silverlight 2</title><link>http://www.cnblogs.com/winkingzhang/archive/2008/05/22/1204577.html</link><dc:creator>winkingzhang</dc:creator><author>winkingzhang</author><pubDate>Thu, 22 May 2008 02:32:00 GMT</pubDate><guid>http://www.cnblogs.com/winkingzhang/archive/2008/05/22/1204577.html</guid><wfw:comment>http://www.cnblogs.com/winkingzhang/comments/1204577.html</wfw:comment><comments>http://www.cnblogs.com/winkingzhang/archive/2008/05/22/1204577.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnblogs.com/winkingzhang/comments/commentRss/1204577.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/winkingzhang/services/trackbacks/1204577.html</trackback:ping><description><![CDATA[摘要: To provide users the ability to copy permalinks or store other useful information in the clipboard, there aren’t many options for web developers today.  There’s no APIs inside JavaScript to access the clipboard.  Here’s a solution that will at least enable this from your Silverlight 2 app for most of your users.&nbsp;&nbsp;<a href='http://www.cnblogs.com/winkingzhang/archive/2008/05/22/1204577.html'>阅读全文</a><img src ="http://www.cnblogs.com/winkingzhang/aggbug/1204577.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/41922/" target="_blank">[新闻]谷歌允许用户评论搜索结果调整顺序</a>]]></description></item><item><title>枚举的多语言显示(2)——使用Attribute</title><link>http://www.cnblogs.com/winkingzhang/archive/2008/03/26/1123075.html</link><dc:creator>winkingzhang</dc:creator><author>winkingzhang</author><pubDate>Wed, 26 Mar 2008 06:37:00 GMT</pubDate><guid>http://www.cnblogs.com/winkingzhang/archive/2008/03/26/1123075.html</guid><wfw:comment>http://www.cnblogs.com/winkingzhang/comments/1123075.html</wfw:comment><comments>http://www.cnblogs.com/winkingzhang/archive/2008/03/26/1123075.html#Feedback</comments><slash:comments>5</slash:comments><wfw:commentRss>http://www.cnblogs.com/winkingzhang/comments/commentRss/1123075.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/winkingzhang/services/trackbacks/1123075.html</trackback:ping><description><![CDATA[摘要: 还是jhh0111昨天关于枚举的双语显示问题的帖子的问题，有不少人跟贴询问使用Attribute的实现，于是刚才乘午间休息实现了一个，这里share一下。&nbsp;&nbsp;<a href='http://www.cnblogs.com/winkingzhang/archive/2008/03/26/1123075.html'>阅读全文</a><img src ="http://www.cnblogs.com/winkingzhang/aggbug/1123075.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/41921/" target="_blank">[新闻]Internet 另一超级漏洞被公布</a>]]></description></item><item><title>枚举的多语言显示</title><link>http://www.cnblogs.com/winkingzhang/archive/2008/03/25/1121315.html</link><dc:creator>winkingzhang</dc:creator><author>winkingzhang</author><pubDate>Tue, 25 Mar 2008 06:52:00 GMT</pubDate><guid>http://www.cnblogs.com/winkingzhang/archive/2008/03/25/1121315.html</guid><wfw:comment>http://www.cnblogs.com/winkingzhang/comments/1121315.html</wfw:comment><comments>http://www.cnblogs.com/winkingzhang/archive/2008/03/25/1121315.html#Feedback</comments><slash:comments>16</slash:comments><wfw:commentRss>http://www.cnblogs.com/winkingzhang/comments/commentRss/1121315.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/winkingzhang/services/trackbacks/1121315.html</trackback:ping><description><![CDATA[摘要: 早上看到jhh0111昨天关于枚举的双语显示问题的帖子，中午想了想，其实这就是一个Globalization的问题，虽然jhh0111的方案可以工作，但是扩展性不强——当枚举数量很大时可用性很低；另外，如果绑定到其他控件（比如Grid控件）也会有一些问题。<br>这里给出一个通用的解决方案，虽然复杂了一些，但是可用性和扩张性均有大大提高。&nbsp;&nbsp;<a href='http://www.cnblogs.com/winkingzhang/archive/2008/03/25/1121315.html'>阅读全文</a><img src ="http://www.cnblogs.com/winkingzhang/aggbug/1121315.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/41920/" target="_blank">[新闻]3 个独特的未来搜索引擎</a>]]></description></item><item><title>如何配置支持Silverlight的Web服务器</title><link>http://www.cnblogs.com/winkingzhang/archive/2008/03/19/1113512.html</link><dc:creator>winkingzhang</dc:creator><author>winkingzhang</author><pubDate>Wed, 19 Mar 2008 09:22:00 GMT</pubDate><guid>http://www.cnblogs.com/winkingzhang/archive/2008/03/19/1113512.html</guid><wfw:comment>http://www.cnblogs.com/winkingzhang/comments/1113512.html</wfw:comment><comments>http://www.cnblogs.com/winkingzhang/archive/2008/03/19/1113512.html#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://www.cnblogs.com/winkingzhang/comments/commentRss/1113512.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/winkingzhang/services/trackbacks/1113512.html</trackback:ping><description><![CDATA[摘要: 部署Silverlight到Web服务器是一个相当容易的过程，尽管有时候会有一些错觉——譬如，认为Silverlight需要部署在基于微软的Web服务器（IIS）上，事实上， Silverlight不强制一定部署在基于微软的Web服务器上，Apache也可以像IIS一样，轻松愉快的支持Silverlight运行。&nbsp;&nbsp;<a href='http://www.cnblogs.com/winkingzhang/archive/2008/03/19/1113512.html'>阅读全文</a><img src ="http://www.cnblogs.com/winkingzhang/aggbug/1113512.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/41919/" target="_blank">[新闻]诺基亚新机N85 N79发布</a>]]></description></item><item><title>如何在保留装箱对象的前提下修改值</title><link>http://www.cnblogs.com/winkingzhang/archive/2008/02/27/1083732.html</link><dc:creator>winkingzhang</dc:creator><author>winkingzhang</author><pubDate>Wed, 27 Feb 2008 06:53:00 GMT</pubDate><guid>http://www.cnblogs.com/winkingzhang/archive/2008/02/27/1083732.html</guid><wfw:comment>http://www.cnblogs.com/winkingzhang/comments/1083732.html</wfw:comment><comments>http://www.cnblogs.com/winkingzhang/archive/2008/02/27/1083732.html#Feedback</comments><slash:comments>9</slash:comments><wfw:commentRss>http://www.cnblogs.com/winkingzhang/comments/commentRss/1083732.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/winkingzhang/services/trackbacks/1083732.html</trackback:ping><description><![CDATA[摘要: 前两天给别人解答装箱问题时，有人问如何在保留装箱对象的前提下修改值？回头想了想，趁今天一会闲暇实现了出来，牵出来溜溜。<br><br>场景：<br>object obj = 100;<br>Console.WriteLine("original object value: " + obj.ToString()); // when debug, make obj's ID: 1#<br>//TODO: modify obj value here (to 1000, for example), but preserve obj object<br>Console.WriteLine("modified object value: " + obj.ToString()); // make sure obj's ID: 1#<br>分析：<br>显然这里直接obj = 1000是不行的，那样之后得到的是对1000装箱的对象，而不是对100的装箱对象了，那么如何修改呢？ &nbsp;&nbsp;<a href='http://www.cnblogs.com/winkingzhang/archive/2008/02/27/1083732.html'>阅读全文</a><img src ="http://www.cnblogs.com/winkingzhang/aggbug/1083732.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/41918/" target="_blank">[新闻]数据库市场:微软和甲骨文快速进步 威胁IBM</a>]]></description></item><item><title>[安装部署]如何让用户自己选择是否在桌面创建快捷方式</title><link>http://www.cnblogs.com/winkingzhang/archive/2008/02/22/1078015.html</link><dc:creator>winkingzhang</dc:creator><author>winkingzhang</author><pubDate>Fri, 22 Feb 2008 09:46:00 GMT</pubDate><guid>http://www.cnblogs.com/winkingzhang/archive/2008/02/22/1078015.html</guid><wfw:comment>http://www.cnblogs.com/winkingzhang/comments/1078015.html</wfw:comment><comments>http://www.cnblogs.com/winkingzhang/archive/2008/02/22/1078015.html#Feedback</comments><slash:comments>4</slash:comments><wfw:commentRss>http://www.cnblogs.com/winkingzhang/comments/commentRss/1078015.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/winkingzhang/services/trackbacks/1078015.html</trackback:ping><description><![CDATA[摘要: 经常有人提问，说如何让Visual Studio自带的安装项目支持让用户自己选择是否在桌面创建快捷方式，以前我的回答是编写VC++ Custom Wizard（VC自定义向导），配合安装项目来实现这个Feature。但是实现复杂，我不推荐这么做，最好去说服客户，让他们放弃这个想法。现在，经过仔细阅读MSDN关于安装项目的说明，我找到了一个简单的实现方法。&nbsp;&nbsp;<a href='http://www.cnblogs.com/winkingzhang/archive/2008/02/22/1078015.html'>阅读全文</a><img src ="http://www.cnblogs.com/winkingzhang/aggbug/1078015.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/41917/" target="_blank">[新闻]深度分析：全球千亿美元市值IT企业7月榜单点评</a>]]></description></item></channel></rss>