<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-32385168</id><updated>2011-07-08T08:42:19.487+03:00</updated><category term='Microsoft Cloud Azure HTTP firewall squid'/><category term='TFS lock check out remove unlock workspace command line tools'/><category term='Word clean HTML converting'/><category term='dynamic c# expando'/><category term='Transport security WCF HTTPS SSL certificate problem not working vista windows 7 self-hosted service'/><category term='WCF service Vista ServiceChannel Service Channel Faulted sate permissions elevation UAC'/><category term='logging jounal'/><category term='cloud azure crawler google amazon'/><category term='WSH InputBox JavasCRIPT'/><category term='sins offshore outsourcing software development problems'/><category term='PM project manager community conference luxoft Kiev 2009 July 25'/><category term='distributed load testing Visual Studio Team System 2008 Test Load Agent'/><category term='Russia Putin Hitler Munich'/><category term='Azure Cloud Microsoft'/><category term='sql server 2008 setup error restart computer failed'/><category term='.NET Framework C# FileInfo DirectoryInfo long path problem'/><category term='SQL 2008 setup error performance counters'/><category term='C# args command line arguments path file .NET'/><category term='ASP.NET application does not work: 0x80070021. This configuration section cannot be used at this path'/><title type='text'>Developer Diary</title><subtitle type='html'>All about the software development. Mainly C#/.NET/SQL.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://olturua.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://olturua.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Alexander Turevskiy</name><uri>http://www.blogger.com/profile/15606865852762925694</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>25</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-32385168.post-7305946091624192105</id><published>2011-03-01T16:52:00.001+02:00</published><updated>2011-03-01T16:54:10.967+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET application does not work: 0x80070021. This configuration section cannot be used at this path'/><title type='text'>ASP.NET application does not work: 0x80070021. This configuration section cannot be used at this path</title><content type='html'>&lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-outline-level:2;background:white"&gt;After reinstalling the Windows, Suite ASP.NET application does not work: &lt;b&gt;&lt;span style="font-size:8.5pt;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;;mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;"&gt;0x80070021&lt;/span&gt;&lt;/b&gt;.&lt;b&gt;&lt;span style="font-size:8.5pt; font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;; mso-bidi-font-family:&amp;quot;Times New Roman&amp;quot;"&gt; This configuration section cannot be used at this path&lt;/span&gt;&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-outline-level:2;background:white"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-outline-level:2;background:white"&gt;Unexpectedly help comes from Microsoft Knowledge Base:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-outline-level:2;background:white"&gt;&lt;a href="http://support.microsoft.com/kb/942055/"&gt;http://support.microsoft.com/kb/942055/&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-outline-level:2;background:white"&gt;See case #9&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-outline-level:2;background:white"&gt;&lt;a href="http://learn.iis.net/page.aspx/145/how-to-use-locking-in-iis-70-configuration"&gt;http://learn.iis.net/page.aspx/145/how-to-use-locking-in-iis-70-configuration&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-outline-level:2;background:white"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-outline-level:2;background:white"&gt;Editing the %windir%\system32\inetsrv\config\applicationHost.config helped.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-outline-level:2;background:white"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-outline-level:2;background:white"&gt;Error message:&lt;b&gt;&lt;span style="font-size:14.5pt;font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;mso-bidi-font-family:&amp;quot;Times New Roman&amp;quot;;color:#CC0000"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-outline-level:2;background:white"&gt;&lt;b&gt;&lt;span style="font-size:14.5pt; font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;; mso-bidi-font-family:&amp;quot;Times New Roman&amp;quot;;color:#CC0000"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-outline-level:2;background:white"&gt;&lt;b&gt;&lt;span style="font-size:8.0pt; font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;; mso-bidi-font-family:&amp;quot;Times New Roman&amp;quot;;color:#CC0000"&gt;HTTP Error 500.19 - Internal Server Error&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top:7.5pt;margin-right:0in;margin-bottom:0in; margin-left:0in;margin-bottom:.0001pt;line-height:normal;mso-outline-level: 3;background:white"&gt;&lt;b&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;;mso-bidi-font-family:&amp;quot;Times New Roman&amp;quot;; color:#CC0000"&gt;The requested page cannot be accessed because the related configuration data for the page is invalid.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;background:white"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;;mso-bidi-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;Detailed Error Information &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100.0%;mso-cellspacing:0in;mso-yfti-tbllook:1184;mso-padding-alt:  0in 0in 0in 0in"&gt;  &lt;tbody&gt;&lt;tr style="mso-yfti-irow:0;mso-yfti-firstrow:yes"&gt;   &lt;td width="30%" valign="top" style="width:30.0%;background:#EBEBEB;padding:   2.25pt 12.25pt 2.25pt 0in"&gt;   &lt;p class="MsoNormal" align="right" style="margin-top:3.0pt;margin-right:0in;   margin-bottom:3.0pt;margin-left:0in;text-align:right;line-height:normal"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-fareast-font-family:   &amp;quot;Times New Roman&amp;quot;;mso-bidi-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;Module&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td valign="top" style="background:#EBEBEB;padding:2.25pt 0in 2.25pt 0in"&gt;   &lt;p class="MsoNormal" style="margin-top:3.0pt;margin-right:0in;margin-bottom:   3.0pt;margin-left:0in;line-height:normal"&gt;&lt;b&gt;&lt;span style="font-size:8.0pt;   font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;;   mso-bidi-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;AnonymousAuthenticationModule&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="mso-yfti-irow:1"&gt;   &lt;td width="30%" valign="top" style="width:30.0%;padding:2.25pt 12.25pt 2.25pt 0in"&gt;   &lt;p class="MsoNormal" align="right" style="margin-top:3.0pt;margin-right:0in;   margin-bottom:3.0pt;margin-left:0in;text-align:right;line-height:normal"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-fareast-font-family:   &amp;quot;Times New Roman&amp;quot;;mso-bidi-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;Notification&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td valign="top" style="padding:2.25pt 0in 2.25pt 0in"&gt;   &lt;p class="MsoNormal" style="margin-top:3.0pt;margin-right:0in;margin-bottom:   3.0pt;margin-left:0in;line-height:normal"&gt;&lt;b&gt;&lt;span style="font-size:8.0pt;   font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;;   mso-bidi-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;AuthenticateRequest&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="mso-yfti-irow:2"&gt;   &lt;td width="30%" valign="top" style="width:30.0%;background:#EBEBEB;padding:   2.25pt 12.25pt 2.25pt 0in"&gt;   &lt;p class="MsoNormal" align="right" style="margin-top:3.0pt;margin-right:0in;   margin-bottom:3.0pt;margin-left:0in;text-align:right;line-height:normal"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-fareast-font-family:   &amp;quot;Times New Roman&amp;quot;;mso-bidi-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;Handler&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td valign="top" style="background:#EBEBEB;padding:2.25pt 0in 2.25pt 0in"&gt;   &lt;p class="MsoNormal" style="margin-top:3.0pt;margin-right:0in;margin-bottom:   3.0pt;margin-left:0in;line-height:normal"&gt;&lt;b&gt;&lt;span style="font-size:8.0pt;   font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;;   mso-bidi-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;PageHandlerFactory-ISAPI-2.0-64&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="mso-yfti-irow:3"&gt;   &lt;td width="30%" valign="top" style="width:30.0%;padding:2.25pt 12.25pt 2.25pt 0in"&gt;   &lt;p class="MsoNormal" align="right" style="margin-top:3.0pt;margin-right:0in;   margin-bottom:3.0pt;margin-left:0in;text-align:right;line-height:normal"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-fareast-font-family:   &amp;quot;Times New Roman&amp;quot;;mso-bidi-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;Error Code&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td valign="top" style="padding:2.25pt 0in 2.25pt 0in"&gt;   &lt;p class="MsoNormal" style="margin-top:3.0pt;margin-right:0in;margin-bottom:   3.0pt;margin-left:0in;line-height:normal"&gt;&lt;b&gt;&lt;span style="font-size:8.0pt;   font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;;   mso-bidi-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;0x80070021&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="mso-yfti-irow:4"&gt;   &lt;td width="30%" valign="top" style="width:30.0%;background:#EBEBEB;padding:   2.25pt 12.25pt 2.25pt 0in"&gt;   &lt;p class="MsoNormal" align="right" style="margin-top:3.0pt;margin-right:0in;   margin-bottom:3.0pt;margin-left:0in;text-align:right;line-height:normal"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-fareast-font-family:   &amp;quot;Times New Roman&amp;quot;;mso-bidi-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;Config Error&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td valign="top" style="background:#EBEBEB;padding:2.25pt 0in 2.25pt 0in"&gt;   &lt;p class="MsoNormal" style="margin-top:3.0pt;margin-right:0in;margin-bottom:   3.0pt;margin-left:0in;line-height:normal"&gt;&lt;b&gt;&lt;span style="font-size:8.0pt;   font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;;   mso-bidi-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;This configuration section cannot be   used at this path. This happens when the section is locked at a parent level.   Locking is either by default (overrideModeDefault="Deny"), or set   explicitly by a location tag with overrideMode="Deny" or the legacy   allowOverride="false". &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="mso-yfti-irow:5;mso-yfti-lastrow:yes"&gt;   &lt;td width="30%" valign="top" style="width:30.0%;padding:2.25pt 12.25pt 2.25pt 0in"&gt;   &lt;p class="MsoNormal" align="right" style="margin-top:3.0pt;margin-right:0in;   margin-bottom:3.0pt;margin-left:0in;text-align:right;line-height:normal"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-fareast-font-family:   &amp;quot;Times New Roman&amp;quot;;mso-bidi-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;Config File&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td valign="top" style="padding:2.25pt 0in 2.25pt 0in"&gt;   &lt;p class="MsoNormal" style="margin-top:3.0pt;margin-right:0in;margin-bottom:   3.0pt;margin-left:0in;line-height:normal"&gt;&lt;b&gt;&lt;span style="font-size:8.0pt;   font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;;   mso-bidi-font-family:&amp;quot;Times New Roman&amp;quot;"&gt;\\?\C:\Dev\531Patch00\Root\Web\Logon\web.config&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32385168-7305946091624192105?l=olturua.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://olturua.blogspot.com/feeds/7305946091624192105/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32385168&amp;postID=7305946091624192105' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/7305946091624192105'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/7305946091624192105'/><link rel='alternate' type='text/html' href='http://olturua.blogspot.com/2011/03/aspnet-application-does-not-work.html' title='ASP.NET application does not work: 0x80070021. This configuration section cannot be used at this path'/><author><name>Alexander Turevskiy</name><uri>http://www.blogger.com/profile/15606865852762925694</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32385168.post-8374883715380429772</id><published>2011-02-18T18:11:00.001+02:00</published><updated>2011-02-18T18:12:48.820+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL 2008 setup error performance counters'/><title type='text'>SQL 2008 setup error: Rebuild the performance counters of a SQL Server 2005 or 2008 instance</title><content type='html'>It happens if you changed the language of your system using MUI.&lt;br /&gt;&lt;br /&gt;Here are&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt; the pills:&lt;br /&gt;&lt;a href="http://www.sqldev.org/sql-server-setup--upgrade/error-on-install-performance-counter-registry-hive-consistency-check--statusfailed-89399.shtml"&gt;http://www.sqldev.org/sql-server-setup--upgrade/error-on-install-performance-counter-registry-hive-consistency-check--statusfailed-89399.shtml&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32385168-8374883715380429772?l=olturua.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://olturua.blogspot.com/feeds/8374883715380429772/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32385168&amp;postID=8374883715380429772' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/8374883715380429772'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/8374883715380429772'/><link rel='alternate' type='text/html' href='http://olturua.blogspot.com/2011/02/sql-2008-setup-error-rebuild.html' title='SQL 2008 setup error: Rebuild the performance counters of a SQL Server 2005 or 2008 instance'/><author><name>Alexander Turevskiy</name><uri>http://www.blogger.com/profile/15606865852762925694</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32385168.post-5552208541713236495</id><published>2011-02-03T22:09:00.002+02:00</published><updated>2011-02-03T22:14:26.818+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='logging jounal'/><title type='text'>Importance of order</title><content type='html'>Hi.&lt;br /&gt;Just what I understand while trying to update a super-customized database came from client  to our newest version:&lt;br /&gt;There can never be too much journaling and logging!!!&lt;br /&gt;Every megabyte you spent for detailed history of your application life can save you hours of your life those you'll damn hundred times otherwise.&lt;br /&gt;Think early :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32385168-5552208541713236495?l=olturua.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://olturua.blogspot.com/feeds/5552208541713236495/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32385168&amp;postID=5552208541713236495' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/5552208541713236495'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/5552208541713236495'/><link rel='alternate' type='text/html' href='http://olturua.blogspot.com/2011/02/importance-of-order.html' title='Importance of order'/><author><name>Alexander Turevskiy</name><uri>http://www.blogger.com/profile/15606865852762925694</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32385168.post-3849209522353192887</id><published>2010-08-25T20:02:00.005+03:00</published><updated>2010-08-25T20:07:06.922+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Transport security WCF HTTPS SSL certificate problem not working vista windows 7 self-hosted service'/><title type='text'>Self-hosted WCF service with SSL certificate security</title><content type='html'>&lt;p class="MsoNormal"&gt;&lt;span style="color:#1F497D;"&gt;Spent the whole day trying to force my self-hosted service to respond.&lt;br /&gt;&lt;br /&gt;Finally what has helped is two lines below to execute (port, certhash, path and user name are up to you. Not sure about appid yet :-) ):&lt;br /&gt;&lt;br /&gt;netsh http add urlacl url=httpS://+:2202/PatientService user=DOMAIN\user&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="color:#1F497D;"&gt;netsh http add sslcert ipport=0.0.0.0:2202  certhash=ea81a9b4c330247f966d23d7e21266171f92cd47 appid={4EF5AB95-0A11-43b1-842C-51D56687CC7A}&lt;br /&gt;&lt;br /&gt;Now need to understand - WHY??&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32385168-3849209522353192887?l=olturua.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://olturua.blogspot.com/feeds/3849209522353192887/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32385168&amp;postID=3849209522353192887' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/3849209522353192887'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/3849209522353192887'/><link rel='alternate' type='text/html' href='http://olturua.blogspot.com/2010/08/self-hosted-wcf-service-with-ssl.html' title='Self-hosted WCF service with SSL certificate security'/><author><name>Alexander Turevskiy</name><uri>http://www.blogger.com/profile/15606865852762925694</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32385168.post-1463764213835230006</id><published>2010-08-02T15:20:00.002+03:00</published><updated>2010-08-02T15:20:58.702+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dynamic c# expando'/><title type='text'>Dynamics magic in C#</title><content type='html'>&lt;div&gt;Just Wow! :-)&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;a href="http://www.codeproject.com/KB/cs/dynamicincsharp.aspx"&gt;http://www.codeproject.com/KB/cs/dynamicincsharp.aspx&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32385168-1463764213835230006?l=olturua.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://olturua.blogspot.com/feeds/1463764213835230006/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32385168&amp;postID=1463764213835230006' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/1463764213835230006'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/1463764213835230006'/><link rel='alternate' type='text/html' href='http://olturua.blogspot.com/2010/08/dynamics-magic-in-c.html' title='Dynamics magic in C#'/><author><name>Alexander Turevskiy</name><uri>http://www.blogger.com/profile/15606865852762925694</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32385168.post-2707841095992244281</id><published>2010-07-08T20:18:00.001+03:00</published><updated>2010-07-08T20:18:50.158+03:00</updated><title type='text'>Trying Word 2010</title><content type='html'>&lt;span xmlns=''&gt;&lt;p&gt;See how to post directly from Word&lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32385168-2707841095992244281?l=olturua.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://olturua.blogspot.com/feeds/2707841095992244281/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32385168&amp;postID=2707841095992244281' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/2707841095992244281'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/2707841095992244281'/><link rel='alternate' type='text/html' href='http://olturua.blogspot.com/2010/07/trying-word-2010.html' title='Trying Word 2010'/><author><name>Alexander Turevskiy</name><uri>http://www.blogger.com/profile/15606865852762925694</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32385168.post-4697303865568025649</id><published>2010-04-20T19:18:00.002+03:00</published><updated>2010-04-20T19:21:54.905+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql server 2008 setup error restart computer failed'/><title type='text'>SQL Server 2008 setup: Error "Restart Computer Failed"</title><content type='html'>&lt;div&gt;When trying to install SQL Server 2008 I found that it requires me to restart computer even after I did it two times.&lt;br /&gt;It was really bad.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;However, there are kind people around!&lt;br /&gt;Especially here:&lt;/div&gt;&lt;a href="http://www.sqlcoffee.com/Troubleshooting051.htm"&gt;http://www.sqlcoffee.com/Troubleshooting051.htm&lt;/a&gt;&lt;div&gt;So the reason was in pending after-reboot file copying requested (and never performed)&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I believe this might cause some mistakes if you really have pending files, so make sure to reboot first.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32385168-4697303865568025649?l=olturua.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://olturua.blogspot.com/feeds/4697303865568025649/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32385168&amp;postID=4697303865568025649' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/4697303865568025649'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/4697303865568025649'/><link rel='alternate' type='text/html' href='http://olturua.blogspot.com/2010/04/sql-server-2008-setup-error-restart.html' title='SQL Server 2008 setup: Error &quot;Restart Computer Failed&quot;'/><author><name>Alexander Turevskiy</name><uri>http://www.blogger.com/profile/15606865852762925694</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32385168.post-9218644911725114244</id><published>2010-02-04T19:56:00.003+02:00</published><updated>2010-02-04T19:57:43.178+02:00</updated><title type='text'></title><content type='html'>Needed to script the MS SQL database including data.&lt;br /&gt;&lt;br /&gt;&lt;div&gt;Strangely :-), but Microsoft did it well:&lt;br /&gt;http://blog.sqlauthority.com/2007/11/16/sql-server-2005-generate-script-with-data-from-database-database-publishing-wizard/&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Visual Studio 2008 also have such tool built in.&lt;br /&gt;&lt;br /&gt;(However I am not sure about complex databases (like encrypted) yet...)&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32385168-9218644911725114244?l=olturua.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://olturua.blogspot.com/feeds/9218644911725114244/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32385168&amp;postID=9218644911725114244' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/9218644911725114244'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/9218644911725114244'/><link rel='alternate' type='text/html' href='http://olturua.blogspot.com/2010/02/needed-to-script-ms-sql-database.html' title=''/><author><name>Alexander Turevskiy</name><uri>http://www.blogger.com/profile/15606865852762925694</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32385168.post-508863834679573845</id><published>2010-01-22T14:06:00.002+02:00</published><updated>2010-01-22T14:08:37.431+02:00</updated><title type='text'></title><content type='html'>how can I set the authentication mode for a SQLServer from code?&lt;br /&gt;&lt;br /&gt;Change&lt;br /&gt;HKLM\Software\Microsoft\Microsoft SQL Server\&lt;instance&gt;\MSSQLServer\LoginMode&lt;br /&gt;1 = integrated only, 2-mixed&lt;br /&gt;&lt;br /&gt;For &lt;instance&gt; you will need to use MSSQL.n, where n relates to the instance you are interested in. You can find the right value by looking at HKLM\Software\Microsoft\Microsoft SQL Server\Instance Names\SQLame, and looking for the value that matches your instance name. SQL Express has an instance name of SQLEXPRESS, and the default SQL 2005 instance has a name of MSSQLSERVER. (on my box ...\Instance Names\SQL\SQLEXPRESS has a value of MSSQL.4)&lt;br /&gt;&lt;br /&gt;From here: &lt;a href="http://www.sqlservercentral.com/Forums/Topic439615-359-1.aspx"&gt;http://www.sqlservercentral.com/Forums/Topic439615-359-1.aspx&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32385168-508863834679573845?l=olturua.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://olturua.blogspot.com/feeds/508863834679573845/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32385168&amp;postID=508863834679573845' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/508863834679573845'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/508863834679573845'/><link rel='alternate' type='text/html' href='http://olturua.blogspot.com/2010/01/how-can-i-set-authentication-mode-for.html' title=''/><author><name>Alexander Turevskiy</name><uri>http://www.blogger.com/profile/15606865852762925694</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32385168.post-6496814705994149211</id><published>2010-01-21T14:30:00.000+02:00</published><updated>2010-01-21T14:31:36.242+02:00</updated><title type='text'></title><content type='html'>Good explanation of what "Company culture" really is&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.slideshare.net/reed2001/culture-1798664"&gt;http://www.slideshare.net/reed2001/culture-1798664&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32385168-6496814705994149211?l=olturua.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://olturua.blogspot.com/feeds/6496814705994149211/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32385168&amp;postID=6496814705994149211' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/6496814705994149211'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/6496814705994149211'/><link rel='alternate' type='text/html' href='http://olturua.blogspot.com/2010/01/good-explanation-of-what-company.html' title=''/><author><name>Alexander Turevskiy</name><uri>http://www.blogger.com/profile/15606865852762925694</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32385168.post-6550625847835065873</id><published>2009-07-27T13:07:00.003+03:00</published><updated>2009-07-27T13:16:16.789+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PM project manager community conference luxoft Kiev 2009 July 25'/><title type='text'>PM Labs 2009 conference by Luxoft Training Center</title><content type='html'>Hi all,&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Last Saturday (2009 July 25th&lt;span class="Apple-style-span" style="font-family: Arial; font-size: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "&gt;&lt;span class="Apple-style-span" style="font-family: Georgia; font-size: 16px; white-space: normal; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; "&gt;) I've attended a quite funny event - PM Labs 2009 held by Luxoft Training Center, this year in Kiev. There way some issues, but generally it look like a most interesting PM community event in Ukraine - thanks Luxoft.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;There was an assumption that it may be too headhunting-targeted, but it was rather an advvertisement of  training center services those are not so imposing.&lt;br /&gt;&lt;br /&gt;More info is here: &lt;a href="http://www.pm-labs.ru/news/105"&gt;http://www.pm-labs.ru/news/105&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;So let's go on!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32385168-6550625847835065873?l=olturua.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://olturua.blogspot.com/feeds/6550625847835065873/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32385168&amp;postID=6550625847835065873' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/6550625847835065873'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/6550625847835065873'/><link rel='alternate' type='text/html' href='http://olturua.blogspot.com/2009/07/pm-labs-2009-conference-by-luxoft.html' title='PM Labs 2009 conference by Luxoft Training Center'/><author><name>Alexander Turevskiy</name><uri>http://www.blogger.com/profile/15606865852762925694</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32385168.post-2215608564352044108</id><published>2009-06-25T11:53:00.003+03:00</published><updated>2009-06-25T12:05:34.729+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft Cloud Azure HTTP firewall squid'/><title type='text'>Azure Cloud over firewall: HTTP protocol incompatibility</title><content type='html'>Hello there,&lt;br /&gt;&lt;br /&gt;Just got a real problem - out corporative Squid firewall does not support HTTP 1.1 properly, and Azure data storage strictly requires it.&lt;br /&gt;As a result, accessing Azure data from local application is not possible at all.&lt;br /&gt;For example, log viewer application are useless.&lt;br /&gt;&lt;br /&gt;And of course it is really hard to kick our administrators to change it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32385168-2215608564352044108?l=olturua.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://olturua.blogspot.com/feeds/2215608564352044108/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32385168&amp;postID=2215608564352044108' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/2215608564352044108'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/2215608564352044108'/><link rel='alternate' type='text/html' href='http://olturua.blogspot.com/2009/06/azure-cloud-over-firewall-http-protocol.html' title='Azure Cloud over firewall: HTTP protocol incompatibility'/><author><name>Alexander Turevskiy</name><uri>http://www.blogger.com/profile/15606865852762925694</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32385168.post-3693611157727832234</id><published>2009-06-23T08:52:00.004+03:00</published><updated>2009-06-23T09:05:34.558+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C# args command line arguments path file .NET'/><title type='text'>Issue with parsing command lines containing path in c#</title><content type='html'>Hi!&lt;br /&gt;Another strange detail of .NET/C#:&lt;br /&gt;I needed to pass two pathes to c# command line arguments, and wasn't able to control whether they are ended with backslash or not. Really it was a C# post-build tool so arguments were passed by MsBuild. Final command line looked like following:&lt;br /&gt;"C:\My Path\My Program.exe" "C:\First Path\" "C:\Second Path\"&lt;br /&gt;However C# command-line parser treats \" as esacape sequence&lt;br /&gt;so for this sample&lt;br /&gt;args[0]=="C:\\First Path\" "&lt;br /&gt;and args[1]=="C:\Second"&lt;br /&gt;and even args[2]=="Path\"".&lt;br /&gt;Absolutely unacceptable, isn't it?&lt;br /&gt;The only way to solve it I can see is to get the whole original command line from Environment.CommandLine and have your own parser. Please remember that this value includes executable name as well that may be or may be not quoted too.&lt;br /&gt;&lt;br /&gt;Some explanation is here:&lt;br /&gt;&lt;a href="http://www.eggheadcafe.com/conversation.aspx?messageid=31268633&amp;amp;threadid=31268617"&gt;http://www.eggheadcafe.com/conversation.aspx?messageid=31268633&amp;amp;threadid=31268617&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32385168-3693611157727832234?l=olturua.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://olturua.blogspot.com/feeds/3693611157727832234/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32385168&amp;postID=3693611157727832234' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/3693611157727832234'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/3693611157727832234'/><link rel='alternate' type='text/html' href='http://olturua.blogspot.com/2009/06/issue-with-parsing-command-lines.html' title='Issue with parsing command lines containing path in c#'/><author><name>Alexander Turevskiy</name><uri>http://www.blogger.com/profile/15606865852762925694</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32385168.post-4516964589839675152</id><published>2009-06-03T08:20:00.004+03:00</published><updated>2009-06-23T09:03:55.654+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Word clean HTML converting'/><title type='text'>Converting Word document to clean HTML</title><content type='html'>Just got a request to convert our User Manual from Word 2007 to nice HTML format. As you may know Word provides really ugly formatting when exporting to HTML. There is another option named "Filtered HTML" that provides much cleaner one but still not acceptable.&lt;br /&gt;I tried different approached found from Google - exporting and cleaning by Tidy, manual replaces, even using Gmail preview function (send document to GMail account and use preview on site).&lt;br /&gt;Still looks ugly. I did not try DreamWeaver funcion for Word HTMl cleaning yet, maybe found one to try.&lt;br /&gt;If it didn't help - need to copy-paste without formatting and format manually :-(.&lt;br /&gt;&lt;br /&gt;Really Format Manual seemed to be the only possible solution - did it finally in Expression Web I had at hand. Funny tool but still missing some important features like formatting copier.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32385168-4516964589839675152?l=olturua.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://olturua.blogspot.com/feeds/4516964589839675152/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32385168&amp;postID=4516964589839675152' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/4516964589839675152'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/4516964589839675152'/><link rel='alternate' type='text/html' href='http://olturua.blogspot.com/2009/06/converting-word-document-to-clean-html.html' title='Converting Word document to clean HTML'/><author><name>Alexander Turevskiy</name><uri>http://www.blogger.com/profile/15606865852762925694</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32385168.post-8220753446398634197</id><published>2009-06-01T10:42:00.005+03:00</published><updated>2009-06-03T08:28:03.069+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WCF service Vista ServiceChannel Service Channel Faulted sate permissions elevation UAC'/><title type='text'>Troubles accessing WCF service on Vista</title><content type='html'>Got this problem seconf time so need to describe it for future.&lt;br /&gt;(Strange that there are so few comments on it found by Google.&lt;br /&gt;Do any other developers use Vista? Or they know some secret way?&lt;br /&gt;One of useful advises I met was "Get rid of Vista")&lt;br /&gt;&lt;br /&gt;So, back to the problem.&lt;br /&gt;I tried to debug by WCF service-based application on Vista&lt;br /&gt;after succesfully running it on Windows XP.&lt;br /&gt;However, it did not work.&lt;br /&gt;First idea was to restart VisualStudio with Administrator permissions that is usual.&lt;br /&gt;But it did not work again and gave smth. "is in Faulted state" error.&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Magic words are the command:&lt;br /&gt;&lt;strong&gt;&lt;em&gt;netsh http add urlacl url=&lt;/em&gt;&lt;/strong&gt;&lt;a href="http://+:9001/" rel="nofollow"&gt;&lt;strong&gt;&lt;em&gt;http://+:9001/&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;&lt;em&gt; user=DOMAIN\user&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;Replace URL and user domain/name with your data.&lt;/p&gt;&lt;p&gt;More details are here:&lt;br /&gt;&lt;a href="http://stackoverflow.com/questions/598643/hosting-a-wcf-service-in-vista"&gt;http://stackoverflow.com/questions/598643/hosting-a-wcf-service-in-vista&lt;/a&gt;&lt;br /&gt;and here&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms733768.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms733768.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;By the way, thanks a lot for all the guys from &lt;a href="http://stackoverflow.com/"&gt;http://stackoverflow.com/&lt;/a&gt;. Great job!&lt;/p&gt;(Sidenote. Why is it so complex to request permissions elevation from .NET? I got samples from Microsoft &lt;a href="http://msdn.microsoft.com/en-us/library/aa970890.aspx"&gt;here&lt;/a&gt; but it is very unconmmon anyway)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32385168-8220753446398634197?l=olturua.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://olturua.blogspot.com/feeds/8220753446398634197/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32385168&amp;postID=8220753446398634197' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/8220753446398634197'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/8220753446398634197'/><link rel='alternate' type='text/html' href='http://olturua.blogspot.com/2009/06/troubles-accessing-wcf-service-on-vista.html' title='Troubles accessing WCF service on Vista'/><author><name>Alexander Turevskiy</name><uri>http://www.blogger.com/profile/15606865852762925694</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32385168.post-7883835421376847293</id><published>2009-05-26T08:30:00.004+03:00</published><updated>2009-05-26T08:32:20.526+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cloud azure crawler google amazon'/><title type='text'></title><content type='html'>My Azure Crawler is quite working now, will publish it soon either if have time to improve or not.&lt;br /&gt;Also, going to try cloud solution from Google and maybe Amazon but it seems last one have no free option, and I haven't internet-enabled card now  (another big story)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32385168-7883835421376847293?l=olturua.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://olturua.blogspot.com/feeds/7883835421376847293/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32385168&amp;postID=7883835421376847293' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/7883835421376847293'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/7883835421376847293'/><link rel='alternate' type='text/html' href='http://olturua.blogspot.com/2009/05/my-azure-crawler-is-quite-working-now.html' title=''/><author><name>Alexander Turevskiy</name><uri>http://www.blogger.com/profile/15606865852762925694</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32385168.post-205169385785195670</id><published>2009-05-20T07:55:00.006+03:00</published><updated>2009-05-21T11:06:30.618+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Azure Cloud Microsoft'/><title type='text'>Cloud computing: Microsoft Azure</title><content type='html'>Recently I had a closer look at Microsoft implementation of cloud computing paradigm: Azure plateform. Despite of issues those are inevitable for pre-release product, it looks really promising and quite developer-friendly.&lt;br /&gt;Hope to show something runnable and presentable soon!&lt;br /&gt;&lt;br /&gt;I'll be adding my thoughts here for now, andlater structure them up&lt;br /&gt;&lt;br /&gt;0. Use StorageClient helpers from Azure SDK. It'll save you lots of effort&lt;br /&gt;&lt;br /&gt;1. When you save data in Table storage - always fill both Partition and Row key, or you'll be unable to delete records. Also remember that keys cannot contain / \ # , ?&lt;br /&gt;&lt;br /&gt;2. Select operations to Table storage are limited to 1000 records and is surely limited by 1000 charcters per text field. It brings sound limitations for your data operations. For example, it does not make sence to select all records - instead  you should have some filtering field (partition key or smth else) able to divide data to bunches below 1000 items each.&lt;br /&gt;&lt;br /&gt;3. Read focumentation or goggle for other workarounds like foreign keys simulation.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32385168-205169385785195670?l=olturua.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://olturua.blogspot.com/feeds/205169385785195670/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32385168&amp;postID=205169385785195670' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/205169385785195670'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/205169385785195670'/><link rel='alternate' type='text/html' href='http://olturua.blogspot.com/2009/05/cloud-computing-microsoft-azure.html' title='Cloud computing: Microsoft Azure'/><author><name>Alexander Turevskiy</name><uri>http://www.blogger.com/profile/15606865852762925694</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32385168.post-681422853270668246</id><published>2009-05-20T07:43:00.004+03:00</published><updated>2009-05-20T08:01:16.140+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='distributed load testing Visual Studio Team System 2008 Test Load Agent'/><title type='text'>Visual Studio Team System 2008 Test Load Agent troubles</title><content type='html'>Recently we had an idea to test one of sites being developed from multiple client locations - so have a distributed test.&lt;br /&gt;Since I am usually oriented at Microsoft product and moreover I remember old Web Application Stress Tools from Microsoft thst was really good for that time, I believed there should be something for distribute testing in Visual Studio 2008 Team Suite Edition.&lt;br /&gt;Sounds logically? Not for Microsoft!&lt;br /&gt;VSTE does not support distributed testing.&lt;br /&gt;If you really want it so much - you should install separate product: Visual Studio Team System 2008 Test Load Agent&lt;br /&gt;Pricing? Well.. Around $5000 for volume license. No other options.&lt;br /&gt;But! there is a 90-day Trial here: &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=572e1e71-ae6b-4f92-960d-544cabe62162&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyID=572e1e71-ae6b-4f92-960d-544cabe62162&amp;amp;displaylang=en&lt;/a&gt;&lt;br /&gt;Again but! It does not work for me - I have VS 2008 SP1 but trial is compiled against pre-SP1 libraries. Really there are LOTS of reasons it may not work for you at all. Some of them are here: &lt;a href="http://weblogs.asp.net/okloeten/archive/2008/09/09/6612870.aspx"&gt;http://weblogs.asp.net/okloeten/archive/2008/09/09/6612870.aspx&lt;/a&gt;.&lt;br /&gt;So it seems we'll look for some other product - more friendly and worth its money...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32385168-681422853270668246?l=olturua.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://olturua.blogspot.com/feeds/681422853270668246/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32385168&amp;postID=681422853270668246' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/681422853270668246'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/681422853270668246'/><link rel='alternate' type='text/html' href='http://olturua.blogspot.com/2009/05/recently-we-had-idea-to-test-one-of.html' title='Visual Studio Team System 2008 Test Load Agent troubles'/><author><name>Alexander Turevskiy</name><uri>http://www.blogger.com/profile/15606865852762925694</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32385168.post-3667438141806305522</id><published>2008-12-03T17:51:00.006+02:00</published><updated>2009-05-20T07:55:55.179+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WSH InputBox JavasCRIPT'/><title type='text'>How to make InputBox in WSH JavaScript</title><content type='html'>I was just asked if Wisndows Shell (WSH) JavaScript has something like Visual Basic InputBox function.&lt;br /&gt;It seems no.&lt;br /&gt;So here is a small .NET utility showing the box and saving value to given environment variable.&lt;br /&gt;See usage sample in *.js file.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.savefile.com/files/1913944"&gt;http://www.savefile.com/files/1913944&lt;/a&gt; (LET ME KNOW IF THIS SERVICE ISN'T WORKING)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32385168-3667438141806305522?l=olturua.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://olturua.blogspot.com/feeds/3667438141806305522/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32385168&amp;postID=3667438141806305522' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/3667438141806305522'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/3667438141806305522'/><link rel='alternate' type='text/html' href='http://olturua.blogspot.com/2008/12/how-to-make-inputbox-in-wsh-javascript.html' title='How to make InputBox in WSH JavaScript'/><author><name>Alexander Turevskiy</name><uri>http://www.blogger.com/profile/15606865852762925694</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32385168.post-5043197933791943127</id><published>2008-10-13T18:36:00.005+03:00</published><updated>2008-10-13T18:40:22.744+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='TFS lock check out remove unlock workspace command line tools'/><title type='text'>How to unlock locked file in TFS</title><content type='html'>Just solved a problem.&lt;br /&gt;&lt;br /&gt;Imagine some bad guys left your team and did not check in their files.&lt;br /&gt;So you cannot deal with them anymore from Visual Studio.&lt;br /&gt;&lt;br /&gt;Here is great explanation of how to rescue:&lt;br /&gt;&lt;a href="http://blogs.msdn.com/rimuri/archive/2006/03/06/544686.aspx"&gt;http://blogs.msdn.com/rimuri/archive/2006/03/06/544686.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Also - description of TFS command-line tools you'll surely need:&lt;br /&gt;&lt;a href="http://blogs.msdn.com/buckh/articles/CommandLineSummary.aspx"&gt;http://blogs.msdn.com/buckh/articles/CommandLineSummary.aspx&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32385168-5043197933791943127?l=olturua.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://olturua.blogspot.com/feeds/5043197933791943127/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32385168&amp;postID=5043197933791943127' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/5043197933791943127'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/5043197933791943127'/><link rel='alternate' type='text/html' href='http://olturua.blogspot.com/2008/10/how-to-unlock-locked-file-in-tfs.html' title='How to unlock locked file in TFS'/><author><name>Alexander Turevskiy</name><uri>http://www.blogger.com/profile/15606865852762925694</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32385168.post-1676185050626912069</id><published>2008-10-02T10:04:00.002+03:00</published><updated>2009-05-20T08:00:43.913+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Russia Putin Hitler Munich'/><title type='text'>Just a bit about politics (sorry, can't bear...)</title><content type='html'>With nowadays Russia approach to internal and external affairs I'm feeling like just after Munich'38.&lt;br /&gt;Don't like to be around if it continues. Remember - Hitler had no nuke but managed to kill millions. Putin has :-(&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32385168-1676185050626912069?l=olturua.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://olturua.blogspot.com/feeds/1676185050626912069/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32385168&amp;postID=1676185050626912069' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/1676185050626912069'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/1676185050626912069'/><link rel='alternate' type='text/html' href='http://olturua.blogspot.com/2008/10/just-bit-about-politics-sorry-cant-bear.html' title='Just a bit about politics (sorry, can&apos;t bear...)'/><author><name>Alexander Turevskiy</name><uri>http://www.blogger.com/profile/15606865852762925694</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32385168.post-8774256392504752404</id><published>2008-10-02T10:00:00.000+03:00</published><updated>2008-10-02T10:04:29.041+03:00</updated><title type='text'>Troubles with TFS: TF30063: You are not authorized to access Microsoft-IIS/6.0.</title><content type='html'>Hello there,&lt;br /&gt;&lt;br /&gt;Couple of days ago we got following trouble message when connecting to TFS from one of our PCs:&lt;br /&gt;TF30063: You are not authorized to access Microsoft-IIS/6.0.&lt;br /&gt;&lt;br /&gt;Gooogl'ing brings idea that it is connected with local Internet proxy settings, however proxy was not set directly.&lt;br /&gt;But! We found that some software specified the proxy configuration script setting some local proxy server. We thought about Selenium IDE installed there but aren't sure since have it installed elsewhere and no such problems yet.&lt;br /&gt;&lt;br /&gt;Anyway, turning the script off solved the problem. We will check if it brings other issues.&lt;br /&gt;&lt;br /&gt;Enjoy!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32385168-8774256392504752404?l=olturua.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://olturua.blogspot.com/feeds/8774256392504752404/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32385168&amp;postID=8774256392504752404' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/8774256392504752404'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/8774256392504752404'/><link rel='alternate' type='text/html' href='http://olturua.blogspot.com/2008/10/troubles-with-tfs-tf30063-you-are-not.html' title='Troubles with TFS: TF30063: You are not authorized to access Microsoft-IIS/6.0.'/><author><name>Alexander Turevskiy</name><uri>http://www.blogger.com/profile/15606865852762925694</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32385168.post-7580534637620406893</id><published>2008-10-02T09:55:00.000+03:00</published><updated>2008-10-02T09:59:13.506+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sins offshore outsourcing software development problems'/><title type='text'>"Seven Sins of Offshoring"</title><content type='html'>Just mentioned this article - http://www.telecommerce.co.uk/download/OffshoringReport2007.pdf&lt;br /&gt;(In Russian - http://www.pcweek.ru/themes/detail.php?ID=114469)&lt;br /&gt;&lt;br /&gt;Nice modern ideas in comparison with Bible ones!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32385168-7580534637620406893?l=olturua.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://olturua.blogspot.com/feeds/7580534637620406893/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32385168&amp;postID=7580534637620406893' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/7580534637620406893'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/7580534637620406893'/><link rel='alternate' type='text/html' href='http://olturua.blogspot.com/2008/10/seven-sins-of-offshoring.html' title='&quot;Seven Sins of Offshoring&quot;'/><author><name>Alexander Turevskiy</name><uri>http://www.blogger.com/profile/15606865852762925694</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32385168.post-115503456613452002</id><published>2006-08-08T13:44:00.002+03:00</published><updated>2009-05-20T08:11:32.226+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET Framework C# FileInfo DirectoryInfo long path problem'/><title type='text'>FileInfo and DirectoryInfo does not work with long file names (260 chars or something like it)</title><content type='html'>What I found:&lt;br /&gt;&lt;br /&gt;NET Framework FileInfo and DirectoryInfo can't work with file and folder names longer then 260 chars. This is by design. For compatibility or something like this. Great. But you can stil lcreate them with calling the Unicode version of API function and prepending the name with&lt;br /&gt;"&lt;a href="file:///?\"&gt;file:////?\&lt;/a&gt;".&lt;br /&gt;See for example CreateFile docs in MSDN &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/createfile.asp"&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/createfile.asp&lt;/a&gt;.&lt;br /&gt;Isn't it good to can't see the data you can create?!&lt;br /&gt;&lt;br /&gt;So need to solve.&lt;br /&gt;The only way - get back to API and write the classes from scratch.&lt;br /&gt;I did not have time to duplicate them fully (if you really need this - see at Reflector tool &lt;a href="http://www.aisto.com/roeder/dotnet/"&gt;http://www.aisto.com/roeder/dotnet/&lt;/a&gt;, it will help you alot to dig into Framework code).&lt;br /&gt;So below are just simplest implementation, covering my needs.&lt;br /&gt;Let me know if you have a better one!&lt;br /&gt;&lt;br /&gt;Below are three separated classes.&lt;br /&gt;Sorry for pure formatting, I'm new to blogging&lt;br /&gt;and don't know if there are attachments or something here...&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;-------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;using System;&lt;br /&gt;using System.Collections.Generic;&lt;br /&gt;using System.Text;&lt;br /&gt;using System.Runtime.InteropServices;&lt;br /&gt;using System.IO;&lt;br /&gt;using System.ComponentModel;&lt;br /&gt;using Microsoft.Win32.SafeHandles;&lt;br /&gt;namespace MyCompany.MyProduct.Common.Win32&lt;br /&gt;{&lt;br /&gt;[Serializable]&lt;br /&gt;public abstract class MyCompanyFileSystemInfo : MarshalByRefObject&lt;br /&gt;{&lt;br /&gt;const string UNC_PREFIX = "\\\\?\\UNC\\";&lt;br /&gt;const string PREFIX = "\\\\?\\";&lt;br /&gt;protected string _path;&lt;br /&gt;protected WIN32_FILE_ATTRIBUTE_DATA _attributes;&lt;br /&gt;protected bool _attributesNotFilled = false;&lt;br /&gt;protected int _realPathStart;&lt;br /&gt;int GetLastError()&lt;br /&gt;{&lt;br /&gt;return Marshal.GetLastWin32Error();&lt;br /&gt;}&lt;br /&gt;public string FullNameWithPrefix&lt;br /&gt;{&lt;br /&gt;get { return _path; }&lt;br /&gt;}&lt;br /&gt;public string FullName&lt;br /&gt;{&lt;br /&gt;get&lt;br /&gt;{&lt;br /&gt;//return _path.Substring(_realPathStart);&lt;br /&gt;string t = _path;&lt;br /&gt;if (t.StartsWith(UNC_PREFIX))&lt;br /&gt;t = "\\\\" + t.Substring(UNC_PREFIX.Length);&lt;br /&gt;else if (t.StartsWith(PREFIX))&lt;br /&gt;t = t.Substring(PREFIX.Length);&lt;br /&gt;return t;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;public override string ToString()&lt;br /&gt;{&lt;br /&gt;return FullName;&lt;br /&gt;}&lt;br /&gt;public MyCompanyFileSystemInfo(string path)&lt;br /&gt;{&lt;br /&gt;path = path.TrimEnd('\\');&lt;br /&gt;if (!path.StartsWith(PREFIX))&lt;br /&gt;{&lt;br /&gt;if (path.StartsWith("\\\\"))&lt;br /&gt;{&lt;br /&gt;// Unicode&lt;br /&gt;path = UNC_PREFIX + path.TrimStart('\\');&lt;br /&gt;_realPathStart = 8;&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;if (path[1] != ':')&lt;br /&gt;{&lt;br /&gt;if(path.StartsWith(".."))&lt;br /&gt;{&lt;br /&gt;path = Environment.CurrentDirectory.TrimEnd('\\') + "\\" + path.Substring(3);&lt;br /&gt;}&lt;br /&gt;else if (path.StartsWith("."))&lt;br /&gt;{&lt;br /&gt;path = Environment.CurrentDirectory.TrimEnd('\\') + "\\" + path.Substring(2);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;// Local&lt;br /&gt;path = PREFIX + path;&lt;br /&gt;_realPathStart = 4;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;_path = path;&lt;br /&gt;FillAttributes();&lt;br /&gt;}&lt;br /&gt;private void FillAttributes()&lt;br /&gt;{&lt;br /&gt;if (!GetFileAttributesEx(_path, EFileInfoLevel.GetFileExInfoStandard, out _attributes))&lt;br /&gt;_attributesNotFilled = true;&lt;br /&gt;else&lt;br /&gt;_attributesNotFilled = false;&lt;br /&gt;}&lt;br /&gt;public long Length&lt;br /&gt;{&lt;br /&gt;get&lt;br /&gt;{&lt;br /&gt;FillAttributes();&lt;br /&gt;if (_attributesNotFilled)&lt;br /&gt;throw new ApplicationException("File could not be opened");&lt;br /&gt;long result = MakeLong(_attributes.fileSizeHigh, _attributes.fileSizeLow);&lt;br /&gt;return result;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;private long MakeLong(int high, int low)&lt;br /&gt;{&lt;br /&gt;return (((long)high) &lt;&lt; result =" (EFileAttributes)_attributes.fileAttributes;" result =" DateTime.FromFileTime(MakeLong(" result =" DateTime.FromFileTime(MakeLong(" result =" DateTime.FromFileTime(MakeLong(" handle =" CreateFileInternal(" handle ="=" result =" false;" result =" true;" handle =" INVALID_HANDLE_VALUE;" handle =" CreateFile(" lastbslash =" _path.LastIndexOf('\\');"&gt;= _realPathStart)&lt;br /&gt;{&lt;br /&gt;string t = _path.Substring(0, lastBSlash).Substring(_realPathStart);&lt;br /&gt;return new MyCompanyDirectoryInfo(t);&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;return null;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;public string Name&lt;br /&gt;{&lt;br /&gt;get&lt;br /&gt;{&lt;br /&gt;string result = "";&lt;br /&gt;int lastBSlash = _path.LastIndexOf('\\');&lt;br /&gt;if (lastBSlash &gt;= _realPathStart)&lt;br /&gt;{&lt;br /&gt;result = _path.Substring(lastBSlash+1);&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;result = _path.Substring(_realPathStart);&lt;br /&gt;}&lt;br /&gt;return result;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;public abstract bool Delete();&lt;br /&gt;#region API Wrappers&lt;br /&gt;public static readonly IntPtr INVALID_HANDLE_VALUE = new IntPtr(-1);&lt;br /&gt;[Flags]&lt;br /&gt;public enum EFileAccess : uint&lt;br /&gt;{&lt;br /&gt;None = 0x0,&lt;br /&gt;GenericRead = 0x80000000,&lt;br /&gt;GenericWrite = 0x40000000,&lt;br /&gt;GenericExecute = 0x20000000,&lt;br /&gt;GenericAll = 0x10000000,&lt;br /&gt;}&lt;br /&gt;[Flags]&lt;br /&gt;public enum EFileShare : uint&lt;br /&gt;{&lt;br /&gt;None = 0x00000000,&lt;br /&gt;Read = 0x00000001,&lt;br /&gt;Write = 0x00000002,&lt;br /&gt;Delete = 0x00000004,&lt;br /&gt;}&lt;br /&gt;public enum ECreationDisposition : uint&lt;br /&gt;{&lt;br /&gt;New = 1,&lt;br /&gt;CreateAlways = 2,&lt;br /&gt;OpenExisting = 3,&lt;br /&gt;OpenAlways = 4,&lt;br /&gt;TruncateExisting = 5,&lt;br /&gt;}&lt;br /&gt;[Flags]&lt;br /&gt;public enum EFileAttributes : uint&lt;br /&gt;{&lt;br /&gt;Readonly = 0x00000001,&lt;br /&gt;Hidden = 0x00000002,&lt;br /&gt;System = 0x00000004,&lt;br /&gt;Directory = 0x00000010,&lt;br /&gt;Archive = 0x00000020,&lt;br /&gt;Device = 0x00000040,&lt;br /&gt;Normal = 0x00000080,&lt;br /&gt;Temporary = 0x00000100,&lt;br /&gt;SparseFile = 0x00000200,&lt;br /&gt;ReparsePoint = 0x00000400,&lt;br /&gt;Compressed = 0x00000800,&lt;br /&gt;Offline = 0x00001000,&lt;br /&gt;NotContentIndexed = 0x00002000,&lt;br /&gt;Encrypted = 0x00004000,&lt;br /&gt;Write_Through = 0x80000000,&lt;br /&gt;Overlapped = 0x40000000,&lt;br /&gt;NoBuffering = 0x20000000,&lt;br /&gt;RandomAccess = 0x10000000,&lt;br /&gt;SequentialScan = 0x08000000,&lt;br /&gt;DeleteOnClose = 0x04000000,&lt;br /&gt;BackupSemantics = 0x02000000,&lt;br /&gt;PosixSemantics = 0x01000000,&lt;br /&gt;OpenReparsePoint = 0x00200000,&lt;br /&gt;OpenNoRecall = 0x00100000,&lt;br /&gt;FirstPipeInstance = 0x00080000&lt;br /&gt;}&lt;br /&gt;[DllImport("kernel32.dll", EntryPoint = "CreateFileW", SetLastError = true,&lt;br /&gt;CharSet = CharSet.Unicode, ExactSpelling = true)]&lt;br /&gt;public static extern IntPtr CreateFile(&lt;br /&gt;string lpFileName,&lt;br /&gt;EFileAccess dwDesiredAccess,&lt;br /&gt;EFileShare dwShareMode,&lt;br /&gt;IntPtr lpSecurityAttributes,&lt;br /&gt;ECreationDisposition dwCreationDisposition,&lt;br /&gt;EFileAttributes dwFlagsAndAttributes,&lt;br /&gt;IntPtr hTemplateFile);&lt;br /&gt;[StructLayout(LayoutKind.Sequential)]&lt;br /&gt;public struct WIN32_FILE_ATTRIBUTE_DATA&lt;br /&gt;{&lt;br /&gt;public uint fileAttributes;&lt;br /&gt;public System.Runtime.InteropServices.ComTypes.FILETIME creationTime;&lt;br /&gt;public System.Runtime.InteropServices.ComTypes.FILETIME lastAccessTime;&lt;br /&gt;public System.Runtime.InteropServices.ComTypes.FILETIME lastWriteTime;&lt;br /&gt;public uint fileSizeHigh;&lt;br /&gt;public uint fileSizeLow;&lt;br /&gt;}&lt;br /&gt;[DllImport("kernel32.dll", EntryPoint = "GetFileAttributesExW", SetLastError = true,&lt;br /&gt;CharSet = CharSet.Unicode, ExactSpelling = true)]&lt;br /&gt;public static extern bool GetFileAttributesEx&lt;br /&gt;(string path, EFileInfoLevel level, out WIN32_FILE_ATTRIBUTE_DATA data);&lt;br /&gt;[DllImport("kernel32.dll", EntryPoint = "CreateDirectoryExW", SetLastError = true,&lt;br /&gt;CharSet = CharSet.Unicode, ExactSpelling = true)]&lt;br /&gt;public static extern bool CreateDirectoryEx(string lpTemplateDirectory,&lt;br /&gt;string lpNewDirectory, IntPtr lpSecurityAttributes);&lt;br /&gt;public enum EFileInfoLevel : int&lt;br /&gt;{&lt;br /&gt;GetFileExInfoStandard = 0&lt;br /&gt;}&lt;br /&gt;public const int MAX_PATH = 260;&lt;br /&gt;public const int MAX_ALTERNATE = 14;&lt;br /&gt;[StructLayout(LayoutKind.Sequential, CharSet =&lt;br /&gt;CharSet.Unicode)]&lt;br /&gt;public struct WIN32_FIND_DATA&lt;br /&gt;{&lt;br /&gt;public EFileAttributes dwFileAttributes;&lt;br /&gt;public System.Runtime.InteropServices.ComTypes.FILETIME ftCreationTime;&lt;br /&gt;public System.Runtime.InteropServices.ComTypes.FILETIME ftLastAccessTime;&lt;br /&gt;public System.Runtime.InteropServices.ComTypes.FILETIME ftLastWriteTime;&lt;br /&gt;public int nFileSizeHigh;&lt;br /&gt;public int nFileSizeLow;&lt;br /&gt;public int dwReserved0;&lt;br /&gt;public int dwReserved1;&lt;br /&gt;[MarshalAs(UnmanagedType.ByValTStr, SizeConst = MAX_PATH)]&lt;br /&gt;public string cFileName;&lt;br /&gt;[MarshalAs(UnmanagedType.ByValTStr, SizeConst = MAX_ALTERNATE)]&lt;br /&gt;public string cAlternate;&lt;br /&gt;}&lt;br /&gt;[DllImport("kernel32", EntryPoint = "FindFirstFileW", SetLastError = true,&lt;br /&gt;CharSet = CharSet.Unicode, ExactSpelling = true)]&lt;br /&gt;public static extern IntPtr FindFirstFile(string lpFileName, out WIN32_FIND_DATA lpFindFileData);&lt;br /&gt;[DllImport("kernel32", EntryPoint = "FindNextFileW", SetLastError = true,&lt;br /&gt;CharSet = CharSet.Unicode, ExactSpelling = true)]&lt;br /&gt;public static extern bool FindNextFile(IntPtr hFindFile, out WIN32_FIND_DATA lpFindFileData);&lt;br /&gt;[DllImport("kernel32.dll", SetLastError = true, ExactSpelling = true)]&lt;br /&gt;public static extern bool FindClose(IntPtr hFindFile);&lt;br /&gt;[DllImport("kernel32.dll", EntryPoint = "RemoveDirectoryW", SetLastError = true,&lt;br /&gt;CharSet = CharSet.Unicode, ExactSpelling = true)]&lt;br /&gt;public static extern bool RemoveDirectory(string lpPathName);&lt;br /&gt;[DllImport("kernel32.dll", EntryPoint = "DeleteFileW", SetLastError = true,&lt;br /&gt;CharSet = CharSet.Unicode, ExactSpelling = true)]&lt;br /&gt;[return: MarshalAs(UnmanagedType.Bool)]&lt;br /&gt;public static extern bool DeleteFile([MarshalAs(UnmanagedType.LPTStr)]string lpFileName);&lt;br /&gt;[DllImport("kernel32.dll", SetLastError = true, ExactSpelling = true)]&lt;br /&gt;[return: MarshalAs(UnmanagedType.Bool)]&lt;br /&gt;static extern bool CloseHandle(IntPtr hObject);&lt;br /&gt;[DllImport("kernel32.dll", EntryPoint = "CopyFileW", SetLastError = true,&lt;br /&gt;CharSet = CharSet.Auto, ExactSpelling = true)]&lt;br /&gt;public static extern bool CopyFile(&lt;br /&gt;String src, String dst, bool failIfExists);&lt;br /&gt;#endregion&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;---------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;using System;&lt;br /&gt;using System.Collections.Generic;&lt;br /&gt;using System.Text;&lt;br /&gt;using System.IO;&lt;br /&gt;using System.ComponentModel;&lt;br /&gt;using System.Runtime.InteropServices;&lt;br /&gt;using Microsoft.Win32.SafeHandles;&lt;br /&gt;namespace MyCompany.MyProduct.Common.Win32&lt;br /&gt;{&lt;br /&gt;public class MyCompanyDirectoryInfo : MyCompanyFileSystemInfo&lt;br /&gt;{&lt;br /&gt;public MyCompanyDirectoryInfo(string path) : base(path)&lt;br /&gt;{&lt;br /&gt;//if ((int)(Attributes &amp;amp; EFileAttributes.Directory) == 0)&lt;br /&gt;// throw new ApplicationException("File path is specified. Use MyCompanyFileInfo instead");&lt;br /&gt;}&lt;br /&gt;public bool Create()&lt;br /&gt;{&lt;br /&gt;if (Exists)&lt;br /&gt;return true;&lt;br /&gt;if (Parent == null)&lt;br /&gt;return true;&lt;br /&gt;string t = Parent.FullNameWithPrefix;&lt;br /&gt;if (t.EndsWith(":"))&lt;br /&gt;t = Environment.SystemDirectory;&lt;br /&gt;return CreateDirectoryEx(t, _path, new IntPtr());&lt;br /&gt;}&lt;br /&gt;public MyCompanyFileInfo[] GetFiles()&lt;br /&gt;{&lt;br /&gt;return GetFiles("*");&lt;br /&gt;}&lt;br /&gt;public MyCompanyDirectoryInfo[] GetDirectories()&lt;br /&gt;{&lt;br /&gt;return GetDirectories("*");&lt;br /&gt;}&lt;br /&gt;public MyCompanyFileInfo[] GetFiles(string pattern)&lt;br /&gt;{&lt;br /&gt;if (string.IsNullOrEmpty(pattern))&lt;br /&gt;pattern = "*";&lt;br /&gt;List&lt;mycompanyfileinfo&gt; _files = new List&lt;mycompanyfileinfo&gt;();&lt;br /&gt;WIN32_FIND_DATA findData;&lt;br /&gt;IntPtr findHandle;&lt;br /&gt;findHandle = FindFirstFile(_path + @"\" + pattern, out findData);&lt;br /&gt;if (findHandle != INVALID_HANDLE_VALUE)&lt;br /&gt;{&lt;br /&gt;do&lt;br /&gt;{&lt;br /&gt;if ((findData.dwFileAttributes &amp;amp; EFileAttributes.Directory) != 0)&lt;br /&gt;{&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;string file = _path + @"\" + findData.cFileName;&lt;br /&gt;_files.Add(new MyCompanyFileInfo(file));&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;while (FindNextFile(findHandle, out findData));&lt;br /&gt;FindClose(findHandle);&lt;br /&gt;}&lt;br /&gt;return _files.ToArray();&lt;br /&gt;}&lt;br /&gt;public MyCompanyDirectoryInfo[] GetDirectories(string pattern)&lt;br /&gt;{&lt;br /&gt;if (string.IsNullOrEmpty(pattern))&lt;br /&gt;pattern = "*";&lt;br /&gt;List&lt;mycompanydirectoryinfo&gt; _folders = new List&lt;mycompanydirectoryinfo&gt;();&lt;br /&gt;WIN32_FIND_DATA findData;&lt;br /&gt;IntPtr findHandle;&lt;br /&gt;findHandle = FindFirstFile(_path + @"\" + pattern, out findData);&lt;br /&gt;if (findHandle != INVALID_HANDLE_VALUE)&lt;br /&gt;{&lt;br /&gt;do&lt;br /&gt;{&lt;br /&gt;if ((findData.dwFileAttributes &amp;amp; EFileAttributes.Directory) != 0)&lt;br /&gt;{&lt;br /&gt;if (findData.cFileName != "." &amp;amp;&amp;amp; findData.cFileName != "..")&lt;br /&gt;{&lt;br /&gt;string subdirectory = _path + @"\" + findData.cFileName;&lt;br /&gt;_folders.Add(new MyCompanyDirectoryInfo(subdirectory));&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;while (FindNextFile(findHandle, out findData));&lt;br /&gt;FindClose(findHandle);&lt;br /&gt;}&lt;br /&gt;return _folders.ToArray();&lt;br /&gt;}&lt;br /&gt;public override bool Delete()&lt;br /&gt;{&lt;br /&gt;return RemoveDirectory(_path);&lt;br /&gt;}&lt;br /&gt;public bool Delete(bool recursively)&lt;br /&gt;{&lt;br /&gt;if (!recursively)&lt;br /&gt;return Delete();&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;DeleteFilesAndFolders();&lt;br /&gt;return Delete();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;public void DeleteFilesAndFolders()&lt;br /&gt;{&lt;br /&gt;foreach (MyCompanyDirectoryInfo di in GetDirectories())&lt;br /&gt;{&lt;br /&gt;di.Delete(true);&lt;br /&gt;}&lt;br /&gt;foreach (MyCompanyFileInfo fi in GetFiles())&lt;br /&gt;{&lt;br /&gt;fi.Delete();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;public bool Create(bool recursively)&lt;br /&gt;{&lt;br /&gt;if (recursively &amp;amp;&amp;amp;amp; Parent != null &amp;amp;&amp;amp; !Parent.Exists)&lt;br /&gt;Parent.Create(recursively);&lt;br /&gt;bool b = Create();&lt;br /&gt;return b;&lt;br /&gt;}&lt;br /&gt;public void CopyTo(MyCompanyDirectoryInfo dest, string pattern, bool recursively)&lt;br /&gt;{&lt;br /&gt;if (recursively)&lt;br /&gt;{&lt;br /&gt;foreach (MyCompanyDirectoryInfo di in GetDirectories(pattern))&lt;br /&gt;{&lt;br /&gt;MyCompanyDirectoryInfo di2 = new MyCompanyDirectoryInfo(dest.FullName + "\\" + di.Name);&lt;br /&gt;di2.Create(true);&lt;br /&gt;di.CopyTo(di2, pattern, true);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;foreach (MyCompanyFileInfo fi in GetFiles(pattern))&lt;br /&gt;{&lt;br /&gt;MyCompanyFileInfo fi2 = new MyCompanyFileInfo(dest.FullName + "\\" + fi.Name);&lt;br /&gt;fi.CopyTo(fi2, false);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;using System;&lt;br /&gt;using System.Collections.Generic;&lt;br /&gt;using System.Text;&lt;br /&gt;using System.IO;&lt;br /&gt;using System.ComponentModel;&lt;br /&gt;using System.Runtime.InteropServices;&lt;br /&gt;using Microsoft.Win32.SafeHandles;&lt;br /&gt;namespace MyCompany.MyProduct.Common.Win32&lt;br /&gt;{&lt;br /&gt;public class MyCompanyFileInfo : MyCompanyFileSystemInfo&lt;br /&gt;{&lt;br /&gt;public MyCompanyFileInfo(string path) : base(path)&lt;br /&gt;{&lt;br /&gt;//if ((int)(Attributes &amp;amp; EFileAttributes.Directory) != 0)&lt;br /&gt;// throw new ApplicationException("Directory path is specified. Use MyCompanyDirectoryInfo instead");&lt;br /&gt;}&lt;br /&gt;public FileStream Open(EFileAccess access,&lt;br /&gt;EFileShare share,&lt;br /&gt;ECreationDisposition creationDisposition,&lt;br /&gt;EFileAttributes fileAttributes)&lt;br /&gt;{&lt;br /&gt;IntPtr handle = CreateFileInternal(access, share, creationDisposition, fileAttributes);&lt;br /&gt;if (handle == INVALID_HANDLE_VALUE)&lt;br /&gt;{&lt;br /&gt;throw new Win32Exception(Marshal.GetLastWin32Error());&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;return new FileStream(new SafeFileHandle(handle, true), FileAccess.ReadWrite);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;public MyCompanyDirectoryInfo Directory&lt;br /&gt;{&lt;br /&gt;get&lt;br /&gt;{&lt;br /&gt;return Parent;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;public FileStream OpenRead()&lt;br /&gt;{&lt;br /&gt;return Open(EFileAccess.GenericRead,EFileShare.Read,ECreationDisposition.OpenExisting,EFileAttributes.Normal);&lt;br /&gt;}&lt;br /&gt;public FileStream Create()&lt;br /&gt;{&lt;br /&gt;return Open(EFileAccess.GenericAll, EFileShare.None, ECreationDisposition.CreateAlways, EFileAttributes.Normal);&lt;br /&gt;}&lt;br /&gt;public FileStream OpenWrite()&lt;br /&gt;{&lt;br /&gt;return Open(EFileAccess.GenericWrite, EFileShare.None, ECreationDisposition.OpenAlways, EFileAttributes.Normal);&lt;br /&gt;}&lt;br /&gt;public override bool Delete()&lt;br /&gt;{&lt;br /&gt;return DeleteFile(_path);&lt;br /&gt;}&lt;br /&gt;internal void CopyTo(MyCompanyFileInfo fi2, bool failIfExists)&lt;br /&gt;{&lt;br /&gt;CopyFile(_path, fi2._path, failIfExists);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32385168-115503456613452002?l=olturua.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://olturua.blogspot.com/feeds/115503456613452002/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32385168&amp;postID=115503456613452002' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/115503456613452002'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/115503456613452002'/><link rel='alternate' type='text/html' href='http://olturua.blogspot.com/2006/08/fileinfo-and-directory-info-does-not.html' title='FileInfo and DirectoryInfo does not work with long file names (260 chars or something like it)'/><author><name>Alexander Turevskiy</name><uri>http://www.blogger.com/profile/15606865852762925694</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32385168.post-115503353402541803</id><published>2006-08-08T13:27:00.000+03:00</published><updated>2006-08-08T13:38:54.036+03:00</updated><title type='text'>Throwing and catching an Exception from remoting object problem</title><content type='html'>So here is the problem I have:&lt;br /&gt;&lt;br /&gt;When throwing any exception from Remoting'ly created object&lt;br /&gt;on the client side we have RemotingException instead having something like this:&lt;br /&gt;&lt;em&gt;&lt;strong&gt;Server encountered an internal error. For more information, turn off customErrors in the server's .config file.&lt;br /&gt;&lt;/strong&gt;&lt;/em&gt;instead of the real exception.&lt;br /&gt;Be aware - it happens only when calling object really remotely, not by remoting on the same computer.&lt;br /&gt;The solution should be to add following lines to your *.config file (either &lt;em&gt;app.config &lt;/em&gt;copyied then to &lt;em&gt;appname.exe.config &lt;/em&gt;or &lt;em&gt;web.config):&lt;/em&gt;&lt;br /&gt;&lt;strong&gt;&lt;system.runtime.remoting&gt;&lt;br /&gt;&lt;customerrors mode="Off"&gt;&lt;br /&gt;&lt;/system.runtime.remoting&gt;&lt;/strong&gt;&lt;br /&gt;However it does not help!&lt;br /&gt;The reason is in strange fact that Remoting does not load the config settings by default. Can't imagine why...&lt;br /&gt;To workaround this, have something like this in startup method of your application:&lt;br /&gt;&lt;strong&gt;string configPath =&lt;br /&gt;System.Reflection.Assembly.GetExecutingAssembly().Location + ".config"; &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;System.Runtime.Remoting.RemotingConfiguration.Configure(configPath);&lt;/strong&gt;&lt;br /&gt;The goal is to force Remoting to final load the config from proper file.&lt;br /&gt;I saw an idea to use a &lt;em&gt;null&lt;/em&gt; instead of file name, but this did  no work for me.&lt;br /&gt;Enjoy!&lt;br /&gt;You can use code like this&lt;br /&gt;&lt;strong&gt;bool b = System.Runtime.Remoting.RemotingConfiguration.CustomErrorsEnabled(false);&lt;br /&gt;&lt;/strong&gt;to check this setting.&lt;br /&gt;&lt;br /&gt;Thanks Chris Taylor for great info from here:&lt;br /&gt;&lt;a href="http://dotnetjunkies.com/WebLog/chris.taylor/articles/5566.aspx"&gt;http://dotnetjunkies.com/WebLog/chris.taylor/articles/5566.aspx&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32385168-115503353402541803?l=olturua.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://olturua.blogspot.com/feeds/115503353402541803/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32385168&amp;postID=115503353402541803' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/115503353402541803'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32385168/posts/default/115503353402541803'/><link rel='alternate' type='text/html' href='http://olturua.blogspot.com/2006/08/throwing-and-catching-exception-from.html' title='Throwing and catching an Exception from remoting object problem'/><author><name>Alexander Turevskiy</name><uri>http://www.blogger.com/profile/15606865852762925694</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
