<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" 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/"><channel><title>Simon Mourier's WebLog : .Net</title><link>http://blogs.msdn.com/smourier/archive/tags/.Net/default.aspx</link><description>Tags: .Net</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Introducing SkedView: how to view BizTalk orchestrations without Visual Studio installed!</title><link>http://blogs.msdn.com/smourier/archive/2004/10/20/244799.aspx</link><pubDate>Wed, 20 Oct 2004 07:48:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:244799</guid><dc:creator>simonm@microsoft.com</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/smourier/comments/244799.aspx</comments><wfw:commentRss>http://blogs.msdn.com/smourier/commentrss.aspx?PostID=244799</wfw:commentRss><description>&lt;p&gt;This is a very lightweight .net 1.1 winform application that graphically displays a BizTalk Server 2004 orchestration from an assembly in a given path or in the Global Assembly Cache (GAC) just like in Health and Activity Tracking (HAT) or Visual Studio.Net, but *without* Visual Studio installed. It is especially useful in production server environment for example to quickly check currently deployed orchestrations. It needs BizTalk server 2004 (but not Visual Studio) to be installed of course.&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;br /&gt;&lt;img src="http://www.codefluent.com/smourier/skedview.jpg" /&gt; &lt;/p&gt; &lt;p&gt;Binaries and source code package is available &lt;a href="http://www.codefluent.com/smourier/skedview.htm"&gt;here&lt;/a&gt; or &lt;a href="http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=56b36c8a-08e1-421a-a4bb-0ae609971951"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;It uses undocumented BizTalk winform controls, so it may not work in the future. Use at your own risks! I am also preparing a version that does not need BizTalk assemblies at all. If you are interested, please drop me a note, I would be happy to know about that.&lt;/p&gt; &lt;p&gt;PS: Oh, by the way, make sure you stop by the cool "BizTalk 2004 Administration Management Tool" written by Paul Somers available &lt;a href="http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=2E461C07-7953-40A7-A7CE-639AE7BB9BEF"&gt;here&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=244799" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/smourier/archive/tags/.Net/default.aspx">.Net</category><category domain="http://blogs.msdn.com/smourier/archive/tags/BizTalk/default.aspx">BizTalk</category></item><item><title>Introducing Visual SourceSafe Web Explorer and Web Service</title><link>http://blogs.msdn.com/smourier/archive/2004/07/22/191473.aspx</link><pubDate>Fri, 23 Jul 2004 03:20:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:191473</guid><dc:creator>simonm@microsoft.com</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/smourier/comments/191473.aspx</comments><wfw:commentRss>http://blogs.msdn.com/smourier/commentrss.aspx?PostID=191473</wfw:commentRss><description>&lt;p&gt;My good friend Omid has already written one available here &lt;A href="http://blogs.msdn.com/obayani/archive/2003/06/11/8549.aspx"&gt;http://blogs.msdn.com/obayani/archive/2003/06/11/8549.aspx&lt;/a&gt;, but it has some limitations and especially in terms of performance. If you want to index your SourceSafe database using SharePoint Portal Server 2003 for example (or any other valid web crawler), it may not work very well.&lt;/p&gt; &lt;p&gt;Here are the basic features of this one:&lt;/p&gt; &lt;p&gt;* based on ASP.Net IHttpHandler technology. Every file, project or version is accessible using a unique Url.&lt;br /&gt;* get file or project information (including length and last write time)&lt;br /&gt;* get file's history (versions)&lt;br /&gt;* get file's content (as well as item's old versions content)&lt;br /&gt;* a Web Service is also provided to get the same item or project information, history and content using SOAP&lt;/p&gt; &lt;p&gt;And here are the specific features:&lt;/p&gt; &lt;p&gt;* the web site running the handler can run as NT AUTHORITY\NETWORK_SERVICE (the default for W3WP.exe ASP.Net host process on Windows Server 2003), there is not need for a "real" account&lt;br /&gt;* no write access to the VSS database needed&lt;br /&gt;* no VSS account needed&lt;br /&gt;* no working folder needed&lt;br /&gt;* supports of client Browser's cache to minimize network usage&lt;/p&gt; &lt;p&gt;There is still no support for any write operations (checkout, checkin, ...) and nothing planned for this in the future. And there is not the cool .cs coloration feature either (Omid's one does it). Of course, the VSS client (6.0d please) needs to be installed on the IIS Server. The handler has been tested on Windows Server 2003 only.&lt;/p&gt; &lt;p&gt;If you use SharePoint Portal Server 2003 and you want to index your VSS database, you will need to tell the SPS search engine how to index .cs file (or .vb) for example. This is very simple. Just copy the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SPSSearch\ContentIndexCommon\Filters\Extension\.txt to a new registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SPSSearch\ContentIndexCommon\Filters\Extension\.cs (for .cs file). This way, .cs files will be indexed as plain text file, which is in general fine. If anyone is aware of a specific .cs IFilter that would skip C# keywords, please post a link here!&lt;/p&gt; &lt;p&gt;This is what a .reg file to register the .cs extension would contain:&lt;/p&gt; &lt;p&gt;&lt;font face="Courier New"&gt;Windows Registry Editor Version 5.00&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Courier New"&gt;[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SPSSearch\ContentIndexCommon\Filters\Extension\.cs]&lt;br /&gt;@=hex(7):7b,00,41,00,33,00,37,00,33,00,45,00,35,00,44,00,39,00,2d,00,37,00,41,\&lt;br /&gt;&amp;nbsp; 00,38,00,37,00,2d,00,31,00,31,00,44,00,33,00,2d,00,42,00,31,00,43,00,31,00,\&lt;br /&gt;&amp;nbsp; 2d,00,30,00,30,00,43,00,30,00,34,00,46,00,36,00,38,00,31,00,35,00,35,00,43,\&lt;br /&gt;&amp;nbsp; 00,7d,00,00,00,00,00,00,00&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;br /&gt;The Visual SourceSafe Web Explorer (and associated Web Service) is downloadable here &lt;a href="http://www.codefluent.com/smourier/vsswe.htm"&gt;http://www.codefluent.com/smourier/vsswe.htm&lt;/a&gt;. Just run the .exe or the .msi file, read the Readme.Rtf, and post a comment here if you are happy with it. Huh... do not post if it does not work :-)&lt;/p&gt; &lt;p&gt;PS: Oh, by the way, make sure you stop by the Visual SourceSafe team blog here &lt;A href="http://blogs.msdn.com/checkitout/"&gt;http://blogs.msdn.com/checkitout/&lt;/a&gt; where you will find VSS PowerToys.&lt;br /&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=191473" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/smourier/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://blogs.msdn.com/smourier/archive/tags/.Net/default.aspx">.Net</category></item><item><title>.NET Html Agility Pack: How to use malformed HTML just like it was well-formed XML...</title><link>http://blogs.msdn.com/smourier/archive/2003/06/04/8265.aspx</link><pubDate>Wed, 04 Jun 2003 22:53:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8265</guid><dc:creator>simonm@microsoft.com</dc:creator><slash:comments>95</slash:comments><comments>http://blogs.msdn.com/smourier/comments/8265.aspx</comments><wfw:commentRss>http://blogs.msdn.com/smourier/commentrss.aspx?PostID=8265</wfw:commentRss><description>&lt;FONT face=Arial size=2&gt;&lt;FONT face=Arial size=2&gt;&lt;FONT style="BACKGROUND-COLOR: #ffffff" color=#ff0000&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;&lt;FONT style="BACKGROUND-COLOR: #ffffff" color=#ff0000&gt;!! Update 06/08/18 !! Html Agility Pack has a new home on CodePlex! Available &lt;A href="http://www.codeplex.com/Wiki/View.aspx?ProjectName=htmlagilitypack"&gt;here&lt;/A&gt;. CodePlex is great :)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;&lt;FONT style="BACKGROUND-COLOR: #ffffff" color=#000000&gt;!! Update 05/05/05 !! Visual Studio 2005 Beta2 version is available &lt;/FONT&gt;&lt;A href="http://www.codefluent.com/smourier/download/htmlagilitypack20.zip"&gt;&lt;FONT style="BACKGROUND-COLOR: #ffffff" color=#000000&gt;here&lt;/FONT&gt;&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;&lt;FONT style="BACKGROUND-COLOR: #ffffff"&gt;&lt;FONT color=#000000&gt;!! Update 05/23/05 !! This blog will be discontinued. A new blog were comments will be available has been created &lt;/FONT&gt;&lt;A href="http://smourier.blogspot.com/"&gt;&lt;FONT color=#000000&gt;here&lt;/FONT&gt;&lt;/A&gt;&lt;FONT color=#000000&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT face=Arial size=2&gt;Here is an agile HTML parser that builds a read/write DOM and supports plain XPATH or XSLT. It is an assembly that allows you to parse "out of the web" HTML files. The parser is very tolerant with "real world" malformed HTML. The object model is very similar to what proposes System.Xml, but for HTML documents (or streams).&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;Sample applications:&lt;BR&gt;* Page fixing or generation. You can fix a page the way you want, modify the DOM, add nodes, copy nodes, you name it.&lt;BR&gt;* Web scanners. You can easily get to img/src or a/hrefs with a bunch XPATH queries.&lt;BR&gt;* Web scrapers. You can easily scrap any existing web page into an RSS feed for example, with just an XSLT file serving as the binding. An example of this is provided.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;There is no dependency on anything else than .Net's XPATH implementation. There is no dependency on Internet Explorer's dll or tidy or anything like that. There is also no adherence to XHTML or XML, although you can actually produce XML using the tool.&lt;/FONT&gt;&lt;/P&gt;&lt;FONT face=Arial size=2&gt;
&lt;P&gt;For example, here is how you would fix all hrefs in an HTML file: &lt;/P&gt;&lt;PRE&gt;HtmlDocument doc = new HtmlDocument();&lt;/PRE&gt;&lt;PRE&gt;doc.Load("file.htm");&lt;/PRE&gt;&lt;PRE&gt;foreach(HtmlNode link in doc.DocumentElement.SelectNodes("//a[@href"])&lt;/PRE&gt;&lt;PRE&gt;{&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;HtmlAttribute att = link["href"];&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;att.Value = FixLink(att);&lt;/PRE&gt;&lt;PRE&gt;}&lt;/PRE&gt;&lt;PRE&gt;doc.Save("file.htm"); &lt;/PRE&gt;&lt;/FONT&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;You can download it &lt;A href="http://www.codefluent.com/smourier/download/htmlagilitypack.zip"&gt;here&lt;/A&gt; (link updated 12/12/04), full code source and doc included!&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8265" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/smourier/archive/tags/.Net/default.aspx">.Net</category></item><item><title>Introducing TraceServer: distributes your standard .Net traces on your network.</title><link>http://blogs.msdn.com/smourier/archive/2003/05/29/7750.aspx</link><pubDate>Fri, 30 May 2003 03:24:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7750</guid><dc:creator>simonm@microsoft.com</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/smourier/comments/7750.aspx</comments><wfw:commentRss>http://blogs.msdn.com/smourier/commentrss.aspx?PostID=7750</wfw:commentRss><description>&lt;p&gt;&lt;font face="Arial"&gt;I have just finished a tool called TraceServer (what a terrific name) that allows you to use distributes all you standard .Net Traces for new or existing applications to any remote machines listening for it. The trace distribution includes code source and stack frame information as well.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Arial"&gt;You can have multiple servers collecting standard .Net&amp;nbsp;traces for one machine, and multiple clients connected to any number of these servers, receiving their traces.&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Arial"&gt;People like me who &lt;a href="http://dotnetweblogs.com/smourier/posts/7160.aspx"&gt;hate debugging&lt;/a&gt; do need that sort of stuff!&lt;br /&gt;The source and a small doc is available &lt;a href="http://www.codefluent.com/smourier/trace_server.htm"&gt;here&lt;/a&gt;. &lt;/font&gt;&lt;font face="Arial"&gt;&lt;br /&gt;&lt;/p&gt;&lt;/font&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7750" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/smourier/archive/tags/.Net/default.aspx">.Net</category></item><item><title>TaskSwitch.exe like: PreviewWindow(...);</title><link>http://blogs.msdn.com/smourier/archive/2003/05/22/7433.aspx</link><pubDate>Fri, 23 May 2003 06:10:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7433</guid><dc:creator>simonm@microsoft.com</dc:creator><slash:comments>8</slash:comments><comments>http://blogs.msdn.com/smourier/comments/7433.aspx</comments><wfw:commentRss>http://blogs.msdn.com/smourier/commentrss.aspx?PostID=7433</wfw:commentRss><description>&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Ever wanted to known how the Windows XP powertoy TaskSwitch.exe (available here &lt;/FONT&gt;&lt;A href="http://www.microsoft.com/windowsxp/pro/downloads/powertoys.asp"&gt;&lt;FONT face=Verdana size=2&gt;http://www.microsoft.com/windowsxp/pro/downloads/powertoys.asp&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;) does the window preview trick? It uses a new to Windows XP and Windows .Net server API called PrintWindow. Perf is not that great though...&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;The following C# code does the same. I have not copied the full interop P/Invoke code, if you're interested, drop me a note.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;public static void PreviewWindow(&lt;BR&gt;&amp;nbsp;IntPtr previewWindowHandle,&lt;BR&gt;&amp;nbsp;int destinationX,&lt;BR&gt;&amp;nbsp;int destinationY,&lt;BR&gt;&amp;nbsp;int destinationWidth,&lt;BR&gt;&amp;nbsp;int destinationHeight,&lt;BR&gt;&amp;nbsp;IntPtr targetDeviceContext)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;// Take a snapshot of the window hwnd, stored in the memory device context hdcMem&lt;BR&gt;&amp;nbsp;IntPtr hdc = GetWindowDC(previewWindowHandle);&lt;BR&gt;&amp;nbsp;if (hdc != IntPtr.Zero)&lt;BR&gt;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;IntPtr hdcMem = CreateCompatibleDC(hdc);&lt;BR&gt;&amp;nbsp;&amp;nbsp;if (hdcMem != IntPtr.Zero)&lt;BR&gt;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;// get target window size&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;RECT rc;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;GetWindowRect(previewWindowHandle, out rc);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;IntPtr hbitmap = CreateCompatibleBitmap(&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;hdc,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;rc.right - rc.left,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;rc.bottom - rc.top);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (hbitmap != IntPtr.Zero)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SelectObject(hdcMem, hbitmap);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Do the magic&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PrintWindow(previewWindowHandle, hdcMem, 0);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Copy bits&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;StretchBlt(&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;targetDeviceContext,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;destinationX,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;destinationY,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;destinationWidth,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;destinationHeight,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;hdcMem,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;rc.right - rc.left,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;rc.bottom - rc.top,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SRCCOPY);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;DeleteObject(hbitmap);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;DeleteObject(hdcMem);&lt;BR&gt;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;ReleaseDC(previewWindowHandle, hdc);&lt;BR&gt;&amp;nbsp;}&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;// this is how you can use it in Winform code (beware the perf and add some error checks!)&lt;BR&gt;&lt;FONT face="Courier New"&gt;protected override void OnPaint(PaintEventArgs pe) &lt;BR&gt;{&lt;BR&gt;&amp;nbsp;Graphics g = pe.Graphics;&lt;BR&gt;&amp;nbsp;IntPtr hdc = g.GetHdc();&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;// previewhandle is a choosen window in the client desktop&lt;BR&gt;&amp;nbsp;Native.Preview(_previewHandle, 0, 0,&amp;nbsp; ClientSize.Width, ClientSize.Height, hdc);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;// cleanup&lt;BR&gt;&amp;nbsp;g.ReleaseHdc(hdc);&lt;BR&gt;}&lt;BR&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7433" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/smourier/archive/tags/.Net/default.aspx">.Net</category></item><item><title>IHttpHandler sample: a .ZIP File handler (again)</title><link>http://blogs.msdn.com/smourier/archive/2003/05/16/7125.aspx</link><pubDate>Fri, 16 May 2003 23:57:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7125</guid><dc:creator>simonm@microsoft.com</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/smourier/comments/7125.aspx</comments><wfw:commentRss>http://blogs.msdn.com/smourier/commentrss.aspx?PostID=7125</wfw:commentRss><description>&lt;p&gt;Duh ... The previous post on this subject has simply disappeared (I should say I was testing w.bloggar...). Here is what was said.&lt;/p&gt; &lt;p&gt;This tool (provided with source) is an IHttpHandler sample that, once installed on an Internet Information Server, allows client browsers to browse .Zip files seamlessly. &lt;/p&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;Directories in the ZIP file are shown (by default - this setting can be switched off) the same way that IIS shows "real" directories. If the users browses any file in the .Zip archive file, the file will be downloaded naturally (with proper handling of Last-Modified Http headers). &lt;/p&gt; &lt;p&gt;This handler can also use a cache directory to speed things up. &lt;/p&gt; &lt;p&gt;For reading .ZIP files, it is based on the famous &lt;a href="http://www.zlib.org/"&gt;http://www.zlib.org&lt;/a&gt; accessed through P/Invoke call (it is actually a special version I have very slightly modified that does not force us to use UNSAFE C# compilation. I can provide the modified source for those who would like to have it). By the way, the code provides a full blown unzip C# interface that can be reused in non HTTP contexts. Updating and creating .ZIP file is not handled, only reading. &lt;/p&gt; &lt;p&gt;Binaries and source code are available here &lt;a href="http://www.codefluent.com/smourier/zhh.htm"&gt;http://www.codefluent.com/smourier/zhh.htm&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;Note: the links proposed for the demo are defined as .vsdisco file, this is to avoid defining a new association between ASP.Net's ISAPI filter (aspnet_isapi.dll) and .ZIP (less work for hosters).&lt;br /&gt;&lt;/p&gt; &lt;p&gt;There was a question from Don Box about the performance between zlib and the Zip classes provided with J# redist. I would hardly imagine the J# implementation being faster than the zlib I used. This zlib (32bits X86) has been specially optimized with asm code. See &lt;a href="http://www.winimage.com/zLibDll/unzip.html"&gt;http://www.winimage.com/zLibDll/unzip.html&lt;/a&gt;&amp;nbsp;for more on this.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7125" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/smourier/archive/tags/.Net/default.aspx">.Net</category></item></channel></rss>