<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" version="2.0">
  <channel>
    <title>Matevz Gacnik's Weblog</title>
    <link>http://www.request-response.com/blog/</link>
    <description>Technology Philanthropy</description>
    <image>
      <url>http://www.request-response.com/blog/images/favicon.jpg</url>
      <title>Matevz Gacnik's Weblog</title>
      <link>http://www.request-response.com/blog/</link>
    </image>
    <language>en-us</language>
    <copyright>Matevz Gacnik</copyright>
    <lastBuildDate>Fri, 29 Aug 2008 18:38:07 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.1.8102.813</generator>
    <managingEditor>matevz.gacnik@gama-system.si</managingEditor>
    <webMaster>matevz.gacnik@gama-system.si</webMaster>
    <item>
      <trackback:ping>http://www.request-response.com/blog/Trackback.aspx?guid=efa4e231-ddf1-48f4-9a26-54363e799d42</trackback:ping>
      <pingback:server>http://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.request-response.com/blog/PermaLink,guid,efa4e231-ddf1-48f4-9a26-54363e799d42.aspx</pingback:target>
      <dc:creator>Matevz Gacnik</dc:creator>
      <wfw:comment>http://www.request-response.com/blog/CommentView,guid,efa4e231-ddf1-48f4-9a26-54363e799d42.aspx</wfw:comment>
      <wfw:commentRss>http://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=efa4e231-ddf1-48f4-9a26-54363e799d42</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Recently I needed to specify exactly how I would like a <em>specific class</em> serialized.
Suppose we have the following simple schema:
</p>
        <p>
          <font face="Courier New">&lt;xs:schema targetNamespace="</font>
          <font face="Courier New">http://my.favourite.ns/person.xsd</font>
          <font face="Courier New">"<br />
   elementFormDefault="qualified"<br />
   xmlns:xs="</font>
          <font face="Courier New">http://www.w3.org/2001/XMLSchema</font>
          <font face="Courier New">"<br />
   </font>
          <font face="Courier New">xmlns="</font>
          <font face="Courier New">http://my.favourite.ns/person.xsd"</font>
          <font face="Courier New">&gt;<br /><strong>  &lt;xs:complexType name="Person"&gt;</strong><br />
    &lt;xs:sequence&gt;<br />
      &lt;xs:element name="Name" type="xs:string" /&gt;<br />
      &lt;xs:element name="Surname" type="xs:string" /&gt;<br />
      &lt;xs:element name="Age" type="xs:int" minOccurs="0"
/&gt;<br />
    &lt;/xs:sequence&gt;<br /><strong>  &lt;/xs:complexType&gt;<br /></strong>&lt;/xs:schema&gt;</font>
        </p>
        <p>
Let's call this schema <font face="Courier New">President.xsd</font>.
</p>
        <p>
A valid XML instance against this schema would be, for example:
</p>
        <p>
          <font face="Courier New">&lt;Person xmlns="http://my.favourite.ns/person.xsd"&gt;<br />
   &lt;Name&gt;Barrack&lt;/Name&gt;<br />
   &lt;Surname&gt;Obama&lt;/Surname&gt;<br />
   &lt;Age&gt;47&lt;/Age&gt;<br />
&lt;/Person&gt;</font>
        </p>
        <p>
Since we are serializing against a specific <a href="http://www.w3.org/XML/Schema">XML
schema</a> (XSD), we have an option of schema compilation:
</p>
        <p>
          <font face="Courier New">xsd /c President.xsd</font>
        </p>
        <p>
This, obviously, yields a programmatic type system result in a form of a C# class.
All well and done.
</p>
        <p>
Now.
</p>
        <p>
If we serialize the filled up class instance back to XML, we get a valid XML instance.
It's valid against <font face="Courier New">President.xsd</font>.
</p>
        <p>
There is a case where your schema changes ever so slightly - read, the namespaces
change, and you don't want to recompile the entire solution to support this, but you
still want to use XML serialization. Who doesn't - what do you do?
</p>
        <p>
Suppose we want to get <strong>the following back</strong>, when serializing:
</p>
        <p>
          <font face="Courier New">&lt;PresidentPerson xmlns="</font>
          <font face="Courier New">http://schemas.gama-system.com/<br />
      president.xsd"</font>
          <font face="Courier New">&gt;<br />
   &lt;Name&gt;Barrack&lt;/Name&gt;<br />
   &lt;Surname&gt;Obama&lt;/Surname&gt;<br />
   &lt;Age&gt;47&lt;/Age&gt;<br />
&lt;/PresidentPerson&gt;</font>
        </p>
        <p>
There is an option to override the default serialization technique of <font face="Courier New">XmlSerializer</font>.
Enter  the world of <font face="Courier New">XmlAttributes</font> and <font face="Courier New">XmlAttributeOverrides</font>:
</p>
        <p>
          <font face="Courier New">private XmlSerializer GetOverridedSerializer()<br />
{<br />
   // set overrides for person element<br />
   XmlAttributes attrsPerson = new XmlAttributes();<br />
   XmlRootAttribute rootPerson = 
<br />
      new XmlRootAttribute("<strong>PresidentPerson</strong>");<br />
   rootPerson.Namespace = "</font>
          <font face="Courier New">
            <strong>http://schemas.gama-system.com/<br />
      president.xsd</strong>
          </font>
          <font face="Courier New">";<br />
   attrsPerson.XmlRoot = rootPerson;</font>
        </p>
        <p>
          <font face="Courier New">   // create overrider<br />
   XmlAttributeOverrides xOver = new XmlAttributeOverrides();<br />
   xOver.Add(typeof(Person), attrsPerson);</font>
        </p>
        <p>
          <font face="Courier New">   XmlSerializer xSer = new XmlSerializer(typeof(Person),
xOver);<br />
   return xSer;<br />
}</font>
        </p>
        <p>
Now serialize normally:
</p>
        <p>
          <font face="Courier New">Stream ms = new MemoryStream();<br />
XmlTextWriter tw = new XmlTextWriter(ms, null);<br />
xSer.Serialize(tw, person);</font>
        </p>
        <p>
This will work even if you only have a compiled version of your object graph, and
you don't have any sources. <font face="Courier New">System.Xml.Serialization.XmlAttributeOverrides</font> class
allows you to adorn any XML serializable class with your own XML syntax - element
names, attribute names, namespaces and types.
</p>
        <p>
Remember - you can override them all and <em>still</em> serialize <em>your</em> angle
brackets.<br /></p>
        <br />
        <img width="0" height="0" src="http://www.request-response.com/blog/aggbug.ashx?id=efa4e231-ddf1-48f4-9a26-54363e799d42" />
      </body>
      <title>XmlSerializer: Serialized Syntax and How to Override It</title>
      <guid isPermaLink="false">http://www.request-response.com/blog/PermaLink,guid,efa4e231-ddf1-48f4-9a26-54363e799d42.aspx</guid>
      <link>http://www.request-response.com/blog/PermaLink,guid,efa4e231-ddf1-48f4-9a26-54363e799d42.aspx</link>
      <pubDate>Fri, 29 Aug 2008 18:38:07 GMT</pubDate>
      <description>&lt;p&gt;
Recently I needed to specify exactly how I would like a &lt;em&gt;specific class&lt;/em&gt; serialized.
Suppose we have the following simple schema:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;lt;xs:schema targetNamespace="&lt;/font&gt;&lt;font face="Courier New"&gt;http://my.favourite.ns/person.xsd&lt;/font&gt;&lt;font face="Courier New"&gt;"&lt;br&gt;
&amp;nbsp;&amp;nbsp; elementFormDefault="qualified"&lt;br&gt;
&amp;nbsp;&amp;nbsp; xmlns:xs="&lt;/font&gt;&lt;font face="Courier New"&gt;http://www.w3.org/2001/XMLSchema&lt;/font&gt;&lt;font face="Courier New"&gt;"&lt;br&gt;
&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font face="Courier New"&gt;xmlns="&lt;/font&gt;&lt;font face="Courier New"&gt;http://my.favourite.ns/person.xsd"&lt;/font&gt;&lt;font face="Courier New"&gt;&amp;gt;&lt;br&gt;
&lt;strong&gt;&amp;nbsp; &amp;lt;xs:complexType name="Person"&amp;gt;&lt;/strong&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xs:sequence&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xs:element name="Name" type="xs:string" /&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xs:element name="Surname" type="xs:string" /&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xs:element name="Age" type="xs:int" minOccurs="0"
/&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/xs:sequence&amp;gt;&lt;br&gt;
&lt;strong&gt;&amp;nbsp; &amp;lt;/xs:complexType&amp;gt;&lt;br&gt;
&lt;/strong&gt;&amp;lt;/xs:schema&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
Let's call this schema &lt;font face="Courier New"&gt;President.xsd&lt;/font&gt;.
&lt;/p&gt;
&lt;p&gt;
A valid XML instance against this schema would be, for example:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;lt;Person xmlns="http://my.favourite.ns/person.xsd"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;Name&amp;gt;Barrack&amp;lt;/Name&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;Surname&amp;gt;Obama&amp;lt;/Surname&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;Age&amp;gt;47&amp;lt;/Age&amp;gt;&lt;br&gt;
&amp;lt;/Person&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
Since we are serializing against a specific &lt;a href="http://www.w3.org/XML/Schema"&gt;XML
schema&lt;/a&gt; (XSD), we have an option of schema compilation:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;xsd /c President.xsd&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
This, obviously,&amp;nbsp;yields a programmatic type system result in a form of a C# class.
All well and done.
&lt;/p&gt;
&lt;p&gt;
Now.
&lt;/p&gt;
&lt;p&gt;
If we serialize the filled up class instance back to XML, we get a valid XML instance.
It's valid against &lt;font face="Courier New"&gt;President.xsd&lt;/font&gt;.
&lt;/p&gt;
&lt;p&gt;
There is a case where your schema changes ever so slightly - read, the namespaces
change, and you don't want to recompile the entire solution to support this, but you
still want to use XML serialization. Who doesn't&amp;nbsp;-&amp;nbsp;what do you do?
&lt;/p&gt;
&lt;p&gt;
Suppose we want to get &lt;strong&gt;the following back&lt;/strong&gt;, when serializing:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;lt;PresidentPerson xmlns="&lt;/font&gt;&lt;font face="Courier New"&gt;http://schemas.gama-system.com/&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; president.xsd"&lt;/font&gt;&lt;font face="Courier New"&gt;&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;Name&amp;gt;Barrack&amp;lt;/Name&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;Surname&amp;gt;Obama&amp;lt;/Surname&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp; &amp;lt;Age&amp;gt;47&amp;lt;/Age&amp;gt;&lt;br&gt;
&amp;lt;/PresidentPerson&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
There is an option to override the default serialization technique of &lt;font face="Courier New"&gt;XmlSerializer&lt;/font&gt;.
Enter&amp;nbsp; the world of &lt;font face="Courier New"&gt;XmlAttributes&lt;/font&gt; and &lt;font face="Courier New"&gt;XmlAttributeOverrides&lt;/font&gt;:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;private XmlSerializer GetOverridedSerializer()&lt;br&gt;
{&lt;br&gt;
&amp;nbsp;&amp;nbsp; // set overrides for person element&lt;br&gt;
&amp;nbsp;&amp;nbsp; XmlAttributes attrsPerson = new XmlAttributes();&lt;br&gt;
&amp;nbsp;&amp;nbsp; XmlRootAttribute rootPerson = 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new XmlRootAttribute("&lt;strong&gt;PresidentPerson&lt;/strong&gt;");&lt;br&gt;
&amp;nbsp;&amp;nbsp; rootPerson.Namespace = "&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;strong&gt;http://schemas.gama-system.com/&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; president.xsd&lt;/strong&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;";&lt;br&gt;
&amp;nbsp;&amp;nbsp; attrsPerson.XmlRoot = rootPerson;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp; // create overrider&lt;br&gt;
&amp;nbsp;&amp;nbsp; XmlAttributeOverrides xOver = new XmlAttributeOverrides();&lt;br&gt;
&amp;nbsp;&amp;nbsp; xOver.Add(typeof(Person), attrsPerson);&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp; XmlSerializer xSer = new XmlSerializer(typeof(Person),
xOver);&lt;br&gt;
&amp;nbsp;&amp;nbsp; return xSer;&lt;br&gt;
}&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
Now serialize normally:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;Stream ms = new MemoryStream();&lt;br&gt;
XmlTextWriter tw = new XmlTextWriter(ms, null);&lt;br&gt;
xSer.Serialize(tw, person);&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
This will work even if you only have a compiled version of your object graph, and
you don't have any sources. &lt;font face="Courier New"&gt;System.Xml.Serialization.XmlAttributeOverrides&lt;/font&gt; class
allows you to adorn any XML serializable class with your own XML syntax - element
names, attribute names, namespaces and types.
&lt;/p&gt;
&lt;p&gt;
Remember - you can override them all and &lt;em&gt;still&lt;/em&gt; serialize &lt;em&gt;your&lt;/em&gt; angle
brackets.&lt;br&gt;
&lt;/p&gt;
&lt;br&gt;
&lt;img width="0" height="0" src="http://www.request-response.com/blog/aggbug.ashx?id=efa4e231-ddf1-48f4-9a26-54363e799d42" /&gt;</description>
      <comments>http://www.request-response.com/blog/CommentView,guid,efa4e231-ddf1-48f4-9a26-54363e799d42.aspx</comments>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>http://www.request-response.com/blog/Trackback.aspx?guid=b6565ebe-4d35-4676-a09e-08b84b6554b1</trackback:ping>
      <pingback:server>http://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.request-response.com/blog/PermaLink,guid,b6565ebe-4d35-4676-a09e-08b84b6554b1.aspx</pingback:target>
      <dc:creator>Matevz Gacnik</dc:creator>
      <wfw:comment>http://www.request-response.com/blog/CommentView,guid,b6565ebe-4d35-4676-a09e-08b84b6554b1.aspx</wfw:comment>
      <wfw:commentRss>http://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=b6565ebe-4d35-4676-a09e-08b84b6554b1</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I'm happy to announce <a href="http://blogs.solidq.com/EN/dsarka/Lists/Posts/Post.aspx?ID=119">our</a> organization
work is coming to fruition.
</p>
        <p>
          <a href="http://www.bleedingedge.si">Bleeding Edge 2008</a> is taking the stage for
the autumn season.
</p>
        <p>
          <strong>
            <img src="http://www.request-response.com/blog/content/binary/be2008.jpg" />
            <br />
          </strong>
          <strong>Portorož, Slovenia, October 1<sup>st</sup>, 9:00</strong>
        </p>
        <p>
          <a href="http://www.bleedingedge.si">Official site</a>, <a href="http://www.bleedingedge.si/prijava.html">Registration</a>, <a href="http://www.bleedingedge.si/sponzorji.html">Sponsors</a></p>
        <p>
Go for the early bird registration (till September 12<sup>th</sup>). The time is now.
</p>
        <p>
Potential sponsor? <a href="http://www.bleedingedge.si/sponzorji.html">Here</a>'s
the offering.
</p>
        <img width="0" height="0" src="http://www.request-response.com/blog/aggbug.ashx?id=b6565ebe-4d35-4676-a09e-08b84b6554b1" />
      </body>
      <title>Bleeding Edge 2008</title>
      <guid isPermaLink="false">http://www.request-response.com/blog/PermaLink,guid,b6565ebe-4d35-4676-a09e-08b84b6554b1.aspx</guid>
      <link>http://www.request-response.com/blog/PermaLink,guid,b6565ebe-4d35-4676-a09e-08b84b6554b1.aspx</link>
      <pubDate>Thu, 17 Jul 2008 13:50:06 GMT</pubDate>
      <description>&lt;p&gt;
I'm happy to announce &lt;a href="http://blogs.solidq.com/EN/dsarka/Lists/Posts/Post.aspx?ID=119"&gt;our&lt;/a&gt; organization
work is coming to fruition.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.bleedingedge.si"&gt;Bleeding Edge 2008&lt;/a&gt; is taking the stage for
the autumn season.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;&lt;img src="http://www.request-response.com/blog/content/binary/be2008.jpg"&gt;
&lt;br&gt;
&lt;/strong&gt;&lt;strong&gt;Portorož, Slovenia, October 1&lt;sup&gt;st&lt;/sup&gt;, 9:00&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.bleedingedge.si"&gt;Official site&lt;/a&gt;, &lt;a href="http://www.bleedingedge.si/prijava.html"&gt;Registration&lt;/a&gt;, &lt;a href="http://www.bleedingedge.si/sponzorji.html"&gt;Sponsors&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Go for the early bird registration (till September 12&lt;sup&gt;th&lt;/sup&gt;). The time is now.
&lt;/p&gt;
&lt;p&gt;
Potential sponsor? &lt;a href="http://www.bleedingedge.si/sponzorji.html"&gt;Here&lt;/a&gt;'s
the offering.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.request-response.com/blog/aggbug.ashx?id=b6565ebe-4d35-4676-a09e-08b84b6554b1" /&gt;</description>
      <comments>http://www.request-response.com/blog/CommentView,guid,b6565ebe-4d35-4676-a09e-08b84b6554b1.aspx</comments>
      <category>Architecture</category>
      <category>Conferences</category>
      <category>MVP</category>
      <category>Work</category>
    </item>
    <item>
      <trackback:ping>http://www.request-response.com/blog/Trackback.aspx?guid=dc2c17a8-a37b-4aa5-9e73-b0c55efe22f0</trackback:ping>
      <pingback:server>http://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.request-response.com/blog/PermaLink,guid,dc2c17a8-a37b-4aa5-9e73-b0c55efe22f0.aspx</pingback:target>
      <dc:creator>Matevz Gacnik</dc:creator>
      <wfw:comment>http://www.request-response.com/blog/CommentView,guid,dc2c17a8-a37b-4aa5-9e73-b0c55efe22f0.aspx</wfw:comment>
      <wfw:commentRss>http://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=dc2c17a8-a37b-4aa5-9e73-b0c55efe22f0</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
One of our core products, <a href="http://gama-system.com/Content.aspx?id=20050200">Gama
System eArchive</a> was <a href="http://www.merriam-webster.com/dictionary/accredit">accredited</a> last
week.
</p>
        <p>
This is <strong>the first accreditation</strong> of a domestic product and <strong>the
first one</strong> covering long term electronic document storage in a SOA based system.
</p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
            <em>Every document stored inside the Gama System eArchive product is now legally legal.
No questions asked.</em>
          </p>
        </blockquote>
        <p>
Accreditation is done by a <a href="http://www.arhiv.gov.si/en/">national body</a> and
represents the last step in a formal acknowledgement to holiness.
</p>
        <p align="center">
          <img src="http://www.request-response.com/blog/content/binary/archive1.jpg" />
        </p>
        <p>
That means a lot to me, even more to <a href="http://www.gama-system.si">our company</a>.
</p>
        <p>
The following blog entries were (in)directly inspired by the development of this product:
</p>
        <ul>
          <li>
            <a href="http://www.request-response.com/blog/PermaLink,guid,f37eda08-845c-4b0a-a66c-ea9cec03c06b.aspx">Laws
and Digital Signatures</a>
          </li>
          <li>
            <a href="http://www.request-response.com/blog/PermaLink,guid,a510f1dc-23bb-42aa-b683-a70c4740bfe5.aspx">Reliable
Messaging and Retry Timeouts</a>
          </li>
          <li>
            <a href="http://www.request-response.com/blog/PermaLink,guid,ab874bc2-1546-48d1-a8aa-46f0bf876d93.aspx">Approaches
to Document Style Parameter Models</a>
          </li>
          <li>
            <a href="http://www.request-response.com/blog/PermaLink,guid,26149053-63bc-495e-bab0-8d14e7e46190.aspx">XmlSerializer,
Ambient XML Namespaces and Digital Signatures</a>
          </li>
          <li>
            <a href="http://www.request-response.com/blog/PermaLink,guid,f731e5cc-9490-4f1e-bc7d-efb91f357cd1.aspx">Security
Sessions and Service Throttling</a>
          </li>
          <li>
            <a href="http://www.request-response.com/blog/PermaLink,guid,a6cb59e6-cbc2-4ce3-92b2-ea40bc5929f6.aspx">Reliable
Message Delivery</a>
          </li>
          <li>
            <a href="http://www.request-response.com/blog/PermaLink,guid,aa617aa7-1073-422c-86f5-deaaa0758e7d.aspx">Reliable
Message Delivery Continued</a>
          </li>
          <li>
            <a href="http://www.request-response.com/blog/PermaLink,guid,03fb0e40-b446-42b5-ad90-3be9b0260cb5.aspx">Durable
Reliable Messaging</a>
          </li>
        </ul>
        <p>
We've made <strong>a lot of effort</strong> to get this thing developed and accredited.
The certificate is <a href="http://www.request-response.com/blog/content/binary/e_ars_2007_003.pdf">here</a>.
</p>
        <p>
          <a href="http://www.arhiv.gov.si/si/e_hramba_dokumentarnega_gradiva/akreditacija/register_akreditirane_opreme_in_storitev">This</a>, <a href="http://www.posta.si/Namizje.aspx?tabid=746">this</a>, <a href="http://www.agencijanet.si/gama-system-e-arhiv-inovacija-leta-med-malimi-in-srednjimi-podjetji/">this</a>, <a href="http://finance.si/214263">this</a>, <a href="http://www.mojmikro.si/mreza/po_slovensko/ucinkovito_upravljanje_dokumentov_in_varna_e-hramba_podatkov">this</a>, <a href="http://mladipodjetnik.si/arhiv/novice/clani-tehnoloskega-parka-ljubljana-izbrani-med-10-najbolj-inovativnih-podjetij-v-sloveniji">this</a>, <a href="http://www.mojmikro.si/news/gama_system_pricakuje_preboj_med_svetovno_elito">this</a>, <a href="http://www.imix.ba/">this</a>, <a href="http://www.ashrafcom.com/edoc.htm">this</a> and <a href="http://www.si21.com/news.php?id=62696">t</a><a href="http://download.microsoft.com/download/7/D/E/7DE50907-87DD-4FFB-B10F-44A891EB49EC/cs_posta-slovenije-arhiviranje.doc">h</a><a href="http://www.agencijanet.si/slovenska-podjetja-na-cebit-u-2008/">o</a><a href="http://download.microsoft.com/download/F/2/4/F248F674-5D6E-430D-9C31-76546D57C2A3/CS%20Posta%20CEP.DOC">s</a><a href="http://www.agencijanet.si/matevzu-gacniku-ze-tretjic-mandat-microsoftovega-regionalnega-direktorja/">e</a> are
direct approvals of our correct decisions.
</p>
        <img width="0" height="0" src="http://www.request-response.com/blog/aggbug.ashx?id=dc2c17a8-a37b-4aa5-9e73-b0c55efe22f0" />
      </body>
      <title>Accreditus: Gama System eArchive</title>
      <guid isPermaLink="false">http://www.request-response.com/blog/PermaLink,guid,dc2c17a8-a37b-4aa5-9e73-b0c55efe22f0.aspx</guid>
      <link>http://www.request-response.com/blog/PermaLink,guid,dc2c17a8-a37b-4aa5-9e73-b0c55efe22f0.aspx</link>
      <pubDate>Sat, 05 Jul 2008 12:18:06 GMT</pubDate>
      <description>&lt;p&gt;
One of our core products, &lt;a href="http://gama-system.com/Content.aspx?id=20050200"&gt;Gama
System eArchive&lt;/a&gt; was &lt;a href="http://www.merriam-webster.com/dictionary/accredit"&gt;accredited&lt;/a&gt; last
week.
&lt;/p&gt;
&lt;p&gt;
This is &lt;strong&gt;the first accreditation&lt;/strong&gt; of a domestic product and &lt;strong&gt;the
first one&lt;/strong&gt; covering long term electronic document storage in a SOA based system.
&lt;/p&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
&lt;em&gt;Every document stored inside the Gama System eArchive product is now legally legal.
No questions asked.&lt;/em&gt;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
Accreditation is done by a &lt;a href="http://www.arhiv.gov.si/en/"&gt;national body&lt;/a&gt;&amp;nbsp;and
represents the last step in a formal acknowledgement to holiness.
&lt;/p&gt;
&lt;p align=center&gt;
&lt;img src="http://www.request-response.com/blog/content/binary/archive1.jpg"&gt;
&lt;/p&gt;
&lt;p&gt;
That means a lot to me, even more to &lt;a href="http://www.gama-system.si"&gt;our company&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
The following blog entries were (in)directly inspired by the development of this product:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://www.request-response.com/blog/PermaLink,guid,f37eda08-845c-4b0a-a66c-ea9cec03c06b.aspx"&gt;Laws
and Digital Signatures&lt;/a&gt; 
&lt;li&gt;
&lt;a href="http://www.request-response.com/blog/PermaLink,guid,a510f1dc-23bb-42aa-b683-a70c4740bfe5.aspx"&gt;Reliable
Messaging and Retry Timeouts&lt;/a&gt; 
&lt;li&gt;
&lt;a href="http://www.request-response.com/blog/PermaLink,guid,ab874bc2-1546-48d1-a8aa-46f0bf876d93.aspx"&gt;Approaches
to Document Style Parameter Models&lt;/a&gt; 
&lt;li&gt;
&lt;a href="http://www.request-response.com/blog/PermaLink,guid,26149053-63bc-495e-bab0-8d14e7e46190.aspx"&gt;XmlSerializer,
Ambient XML Namespaces and Digital Signatures&lt;/a&gt; 
&lt;li&gt;
&lt;a href="http://www.request-response.com/blog/PermaLink,guid,f731e5cc-9490-4f1e-bc7d-efb91f357cd1.aspx"&gt;Security
Sessions and Service Throttling&lt;/a&gt; 
&lt;li&gt;
&lt;a href="http://www.request-response.com/blog/PermaLink,guid,a6cb59e6-cbc2-4ce3-92b2-ea40bc5929f6.aspx"&gt;Reliable
Message Delivery&lt;/a&gt; 
&lt;li&gt;
&lt;a href="http://www.request-response.com/blog/PermaLink,guid,aa617aa7-1073-422c-86f5-deaaa0758e7d.aspx"&gt;Reliable
Message Delivery Continued&lt;/a&gt; 
&lt;li&gt;
&lt;a href="http://www.request-response.com/blog/PermaLink,guid,03fb0e40-b446-42b5-ad90-3be9b0260cb5.aspx"&gt;Durable
Reliable Messaging&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
We've made &lt;strong&gt;a lot of effort&lt;/strong&gt; to get this thing developed and accredited.
The certificate is &lt;a href="http://www.request-response.com/blog/content/binary/e_ars_2007_003.pdf"&gt;here&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.arhiv.gov.si/si/e_hramba_dokumentarnega_gradiva/akreditacija/register_akreditirane_opreme_in_storitev"&gt;This&lt;/a&gt;, &lt;a href="http://www.posta.si/Namizje.aspx?tabid=746"&gt;this&lt;/a&gt;, &lt;a href="http://www.agencijanet.si/gama-system-e-arhiv-inovacija-leta-med-malimi-in-srednjimi-podjetji/"&gt;this&lt;/a&gt;, &lt;a href="http://finance.si/214263"&gt;this&lt;/a&gt;, &lt;a href="http://www.mojmikro.si/mreza/po_slovensko/ucinkovito_upravljanje_dokumentov_in_varna_e-hramba_podatkov"&gt;this&lt;/a&gt;, &lt;a href="http://mladipodjetnik.si/arhiv/novice/clani-tehnoloskega-parka-ljubljana-izbrani-med-10-najbolj-inovativnih-podjetij-v-sloveniji"&gt;this&lt;/a&gt;, &lt;a href="http://www.mojmikro.si/news/gama_system_pricakuje_preboj_med_svetovno_elito"&gt;this&lt;/a&gt;, &lt;a href="http://www.imix.ba/"&gt;this&lt;/a&gt;, &lt;a href="http://www.ashrafcom.com/edoc.htm"&gt;this&lt;/a&gt;&amp;nbsp;and &lt;a href="http://www.si21.com/news.php?id=62696"&gt;t&lt;/a&gt;&lt;a href="http://download.microsoft.com/download/7/D/E/7DE50907-87DD-4FFB-B10F-44A891EB49EC/cs_posta-slovenije-arhiviranje.doc"&gt;h&lt;/a&gt;&lt;a href="http://www.agencijanet.si/slovenska-podjetja-na-cebit-u-2008/"&gt;o&lt;/a&gt;&lt;a href="http://download.microsoft.com/download/F/2/4/F248F674-5D6E-430D-9C31-76546D57C2A3/CS%20Posta%20CEP.DOC"&gt;s&lt;/a&gt;&lt;a href="http://www.agencijanet.si/matevzu-gacniku-ze-tretjic-mandat-microsoftovega-regionalnega-direktorja/"&gt;e&lt;/a&gt; are
direct approvals of our correct decisions.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.request-response.com/blog/aggbug.ashx?id=dc2c17a8-a37b-4aa5-9e73-b0c55efe22f0" /&gt;</description>
      <comments>http://www.request-response.com/blog/CommentView,guid,dc2c17a8-a37b-4aa5-9e73-b0c55efe22f0.aspx</comments>
      <category>.NET 3.0 - General</category>
      <category>.NET 3.0 - WCF</category>
      <category>.NET 3.5 - WCF</category>
      <category>Other</category>
      <category>Personal</category>
      <category>Work</category>
    </item>
    <item>
      <trackback:ping>http://www.request-response.com/blog/Trackback.aspx?guid=40794232-f39b-4068-a536-23c5b56a9216</trackback:ping>
      <pingback:server>http://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.request-response.com/blog/PermaLink,guid,40794232-f39b-4068-a536-23c5b56a9216.aspx</pingback:target>
      <dc:creator>Matevz Gacnik</dc:creator>
      <wfw:comment>http://www.request-response.com/blog/CommentView,guid,40794232-f39b-4068-a536-23c5b56a9216.aspx</wfw:comment>
      <wfw:commentRss>http://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=40794232-f39b-4068-a536-23c5b56a9216</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
This is <strong>brilliant</strong>.
</p>
        <p>
          <a href="http://technet.microsoft.com/en-us/sysinternals">Sysinternals</a> tools are
now (actually were already when I left for vacation) available live via a web (http
and <strong>WebDAV</strong>) based resource on <font face="Courier New"><a href="http://live.sysinternals.com">http://live.sysinternals.com</a></font><font face="Verdana">and </font><font face="Courier New">\\live.sysinternals.com</font>.
</p>
        <p>
This means I can do the following:
</p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
            <font face="Courier New">[c:\]dir </font>
            <font face="Courier New">\\live.sysinternals.com\tools</font>
          </p>
          <p>
            <font face="Courier New"> Directory of  </font>
            <font face="Courier New">\\live.sysinternals.com\tools\</font>
            <font face="Courier New">*</font>
          </p>
          <p>
            <font face="Courier New"> 2.06.2008   1:16        
&lt;DIR&gt;    .<br />
 2.06.2008   1:16         &lt;DIR&gt;   
..<br />
 2.06.2008   1:16         &lt;DIR&gt;   
WindowsInternals<br />
30.05.2008  17:55            
668  About_This_Site.txt<br />
13.05.2008  19:00         225.320 
accesschk.exe<br />
 1.11.2006  15:06         174.968 
AccessEnum.exe<br />
 1.11.2006  23:05         121.712 
accvio.EXE<br />
12.07.2007   7:26         
50.379  AdExplorer.chm<br />
26.11.2007  14:21         422.952 
ADExplorer.exe<br />
 7.11.2007  11:13         401.616 
ADInsight.chm<br />
20.11.2007  14:25       1.049.640  ADInsight.exe<br />
 1.11.2006  15:05         150.328 
adrestore.exe<br />
 1.11.2006  15:06         154.424 
Autologon.exe<br />
 8.05.2008  10:20         
48.476  autoruns.chm<br />
12.05.2008  17:31         622.632 
autoruns.exe 1.11.2006  <br />
...<br />
 1.11.2006  15:06         207.672 
Winobj.exe<br />
30.12.1999  12:26          
7.653  WINOBJ.HLP<br />
27.05.2008  16:21         142.376 
ZoomIt.exe<br />
     24.185.901 bytes in 103 files and 3 dirs<br />
109.442.727.936 bytes free</font>
          </p>
        </blockquote>
        <p dir="ltr">
Or, I can fire up a Windows Explorer window (or <strong>press the start key</strong>,
then type) and just type: <font face="Courier New">\\live.sysinternals.com\tools</font>.
</p>
        <p dir="ltr">
Or:
</p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p dir="ltr">
            <font face="Courier New">[c:\]copy </font>
            <font face="Courier New">\\live.sysinternals.com\tools\Procmon.exe</font>
            <font face="Courier New">
              <br />
        C:\Windows\System32<br /></font>
            <font face="Courier New">\\live.sysinternals.com\tools\Procmon.exe</font>
            <font face="Courier New"> =&gt; 
<br />
        C:\Windows\System32\Procmon.exe<br />
     1 file copied</font>
          </p>
        </blockquote>
        <p dir="ltr">
Brilliant and useful.
</p>
        <img width="0" height="0" src="http://www.request-response.com/blog/aggbug.ashx?id=40794232-f39b-4068-a536-23c5b56a9216" />
      </body>
      <title>Sysinternals Live</title>
      <guid isPermaLink="false">http://www.request-response.com/blog/PermaLink,guid,40794232-f39b-4068-a536-23c5b56a9216.aspx</guid>
      <link>http://www.request-response.com/blog/PermaLink,guid,40794232-f39b-4068-a536-23c5b56a9216.aspx</link>
      <pubDate>Thu, 19 Jun 2008 17:52:52 GMT</pubDate>
      <description>&lt;p&gt;
This is &lt;strong&gt;brilliant&lt;/strong&gt;.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://technet.microsoft.com/en-us/sysinternals"&gt;Sysinternals&lt;/a&gt; tools are
now (actually were already when I left for vacation) available live via a web (http
and &lt;strong&gt;WebDAV&lt;/strong&gt;) based resource on &lt;font face="Courier New"&gt;&lt;a href="http://live.sysinternals.com"&gt;http://live.sysinternals.com&lt;/a&gt; &lt;/font&gt;&lt;font face=Verdana&gt;and&amp;nbsp;&lt;/font&gt;&lt;font face="Courier New"&gt;\\live.sysinternals.com&lt;/font&gt;.
&lt;/p&gt;
&lt;p&gt;
This means I can do the following:
&lt;/p&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
&lt;font face="Courier New"&gt;[c:\]dir &lt;/font&gt;&lt;font face="Courier New"&gt;\\live.sysinternals.com\tools&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;nbsp;Directory of&amp;nbsp; &lt;/font&gt;&lt;font face="Courier New"&gt;\\live.sysinternals.com\tools\&lt;/font&gt;&lt;font face="Courier New"&gt;*&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;nbsp;2.06.2008&amp;nbsp;&amp;nbsp; 1:16&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;lt;DIR&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;br&gt;
&amp;nbsp;2.06.2008&amp;nbsp;&amp;nbsp; 1:16&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;DIR&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
..&lt;br&gt;
&amp;nbsp;2.06.2008&amp;nbsp;&amp;nbsp; 1:16&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;DIR&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
WindowsInternals&lt;br&gt;
30.05.2008&amp;nbsp; 17:55&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
668&amp;nbsp; About_This_Site.txt&lt;br&gt;
13.05.2008&amp;nbsp; 19:00&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 225.320&amp;nbsp;
accesschk.exe&lt;br&gt;
&amp;nbsp;1.11.2006&amp;nbsp; 15:06&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 174.968&amp;nbsp;
AccessEnum.exe&lt;br&gt;
&amp;nbsp;1.11.2006&amp;nbsp; 23:05&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 121.712&amp;nbsp;
accvio.EXE&lt;br&gt;
12.07.2007&amp;nbsp;&amp;nbsp; 7:26&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
50.379&amp;nbsp; AdExplorer.chm&lt;br&gt;
26.11.2007&amp;nbsp; 14:21&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 422.952&amp;nbsp;
ADExplorer.exe&lt;br&gt;
&amp;nbsp;7.11.2007&amp;nbsp; 11:13&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 401.616&amp;nbsp;
ADInsight.chm&lt;br&gt;
20.11.2007&amp;nbsp; 14:25&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.049.640&amp;nbsp; ADInsight.exe&lt;br&gt;
&amp;nbsp;1.11.2006&amp;nbsp; 15:05&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 150.328&amp;nbsp;
adrestore.exe&lt;br&gt;
&amp;nbsp;1.11.2006&amp;nbsp; 15:06&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 154.424&amp;nbsp;
Autologon.exe&lt;br&gt;
&amp;nbsp;8.05.2008&amp;nbsp; 10:20&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
48.476&amp;nbsp; autoruns.chm&lt;br&gt;
12.05.2008&amp;nbsp; 17:31&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 622.632&amp;nbsp;
autoruns.exe 1.11.2006&amp;nbsp;&amp;nbsp;&lt;br&gt;
...&lt;br&gt;
&amp;nbsp;1.11.2006&amp;nbsp; 15:06&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 207.672&amp;nbsp;
Winobj.exe&lt;br&gt;
30.12.1999&amp;nbsp; 12:26&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
7.653&amp;nbsp; WINOBJ.HLP&lt;br&gt;
27.05.2008&amp;nbsp; 16:21&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 142.376&amp;nbsp;
ZoomIt.exe&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 24.185.901 bytes in 103 files and 3 dirs&lt;br&gt;
109.442.727.936 bytes free&lt;/font&gt;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p dir=ltr&gt;
Or, I can fire up a Windows Explorer window (or&amp;nbsp;&lt;strong&gt;press the start key&lt;/strong&gt;,
then type) and just type: &lt;font face="Courier New"&gt;\\live.sysinternals.com\tools&lt;/font&gt;.
&lt;/p&gt;
&lt;p dir=ltr&gt;
Or:
&lt;/p&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p dir=ltr&gt;
&lt;font face="Courier New"&gt;[c:\]copy &lt;/font&gt;&lt;font face="Courier New"&gt;\\live.sysinternals.com\tools\Procmon.exe&lt;/font&gt;&lt;font face="Courier New"&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; C:\Windows\System32&lt;br&gt;
&lt;/font&gt;&lt;font face="Courier New"&gt;\\live.sysinternals.com\tools\Procmon.exe&lt;/font&gt;&lt;font face="Courier New"&gt; =&amp;gt; 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; C:\Windows\System32\Procmon.exe&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 file copied&lt;/font&gt;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p dir=ltr&gt;
Brilliant and useful.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.request-response.com/blog/aggbug.ashx?id=40794232-f39b-4068-a536-23c5b56a9216" /&gt;</description>
      <comments>http://www.request-response.com/blog/CommentView,guid,40794232-f39b-4068-a536-23c5b56a9216.aspx</comments>
      <category>Other</category>
    </item>
    <item>
      <trackback:ping>http://www.request-response.com/blog/Trackback.aspx?guid=a6f0a54f-31ae-4ccd-ad90-fdfbabba5d95</trackback:ping>
      <pingback:server>http://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.request-response.com/blog/PermaLink,guid,a6f0a54f-31ae-4ccd-ad90-fdfbabba5d95.aspx</pingback:target>
      <dc:creator>Matevz Gacnik</dc:creator>
      <wfw:comment>http://www.request-response.com/blog/CommentView,guid,a6f0a54f-31ae-4ccd-ad90-fdfbabba5d95.aspx</wfw:comment>
      <wfw:commentRss>http://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=a6f0a54f-31ae-4ccd-ad90-fdfbabba5d95</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
As promised, here are the sources from my <a href="http://www.ntk.si">NTK 2008</a> sessions <font size="1">[1]</font>.
</p>
        <p>
          <strong>Talk: Document Style Service Interfaces</strong>
        </p>
        <p>
Read the following <a href="http://www.request-response.com/blog/PermaLink,guid,ab874bc2-1546-48d1-a8aa-46f0bf876d93.aspx">blog
entry</a>, I tried to describe the concept in detail. Also, this <a href="http://www.request-response.com/blog/PermaLink,guid,a510f1dc-23bb-42aa-b683-a70c4740bfe5.aspx">blog post</a> discusses
issues when using large document parameters with reliable transport  (WS-RM)
channels.
</p>
        <p>
Demo: Document Style Service Interfaces [<a href="http://www.request-response.com/blog/content/binary/NTK2008DocStyleParamModels.zip">Download</a>]
</p>
        <p>
This demo defines a service interface with the document parameter model, ie. <font face="Courier New">Guid
CreatePerson(XmlDocument person)</font>. It shows three different approaches to creation
of the passed document:
</p>
        <ol>
          <li>
Raw XML creation 
</li>
          <li>
XML Serialization of the (attribute annotated) object graph 
</li>
          <li>
XML Serialization using the <em>client object model</em></li>
        </ol>
        <p>
Also, versioned schemas for the <font face="Courier New">Person</font> document are
shown, including the support for document validation and version independence.
</p>
        <p>
          <strong>Talk: Windows Server 2008 and Transactional NTFS</strong>
        </p>
        <p>
This <a href="http://www.request-response.com/blog/PermaLink,guid,bca19fa8-7ba8-43d8-873e-3a8cf03335cb.aspx">blog
entry</a> describes the concept.
</p>
        <p>
Demo 1: Logging using CLFS (Common Log File System) [<a href="http://www.request-response.com/blog/content/binary/NTK2008TxFCLFS.zip">Download</a>]<br />
Demo 2: NTFS Transactions using the File System, SQL, WCF [<a href="http://www.request-response.com/blog/content/binary/NTK2008TxFFSSQLWCF.zip">Download</a>]<br />
Demo 3: NTFS Transactions using the WCF, MTOM Transport [<a href="http://www.request-response.com/blog/content/binary/NTK2008TxFWCFMTOM.zip">Download</a>] <font size="1">[2]</font></p>
        <p>
          <font size="1">[1] All sources are in VS 2008 solution file format.<br />
[2] This transaction spans from the client, through the service boundary, to the server.</font>
        </p>
        <img width="0" height="0" src="http://www.request-response.com/blog/aggbug.ashx?id=a6f0a54f-31ae-4ccd-ad90-fdfbabba5d95" />
      </body>
      <title>Demos from the NT Conference 2008</title>
      <guid isPermaLink="false">http://www.request-response.com/blog/PermaLink,guid,a6f0a54f-31ae-4ccd-ad90-fdfbabba5d95.aspx</guid>
      <link>http://www.request-response.com/blog/PermaLink,guid,a6f0a54f-31ae-4ccd-ad90-fdfbabba5d95.aspx</link>
      <pubDate>Thu, 15 May 2008 15:24:19 GMT</pubDate>
      <description>&lt;p&gt;
As promised, here are the sources from&amp;nbsp;my &lt;a href="http://www.ntk.si"&gt;NTK 2008&lt;/a&gt; sessions &lt;font size=1&gt;[1]&lt;/font&gt;.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Talk: Document Style Service Interfaces&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Read the following &lt;a href="http://www.request-response.com/blog/PermaLink,guid,ab874bc2-1546-48d1-a8aa-46f0bf876d93.aspx"&gt;blog
entry&lt;/a&gt;, I tried to describe the concept in detail. Also, this &lt;a href="http://www.request-response.com/blog/PermaLink,guid,a510f1dc-23bb-42aa-b683-a70c4740bfe5.aspx"&gt;blog&amp;nbsp;post&lt;/a&gt; discusses
issues when using large document parameters with reliable transport&amp;nbsp; (WS-RM)
channels.
&lt;/p&gt;
&lt;p&gt;
Demo: Document Style Service Interfaces [&lt;a href="http://www.request-response.com/blog/content/binary/NTK2008DocStyleParamModels.zip"&gt;Download&lt;/a&gt;]
&lt;/p&gt;
&lt;p&gt;
This demo defines a service interface with the document parameter model, ie. &lt;font face="Courier New"&gt;Guid
CreatePerson(XmlDocument person)&lt;/font&gt;. It shows three different approaches to creation
of the passed document:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Raw XML creation 
&lt;li&gt;
XML Serialization of the (attribute annotated) object graph 
&lt;li&gt;
XML Serialization using the &lt;em&gt;client object model&lt;/em&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
Also, versioned schemas for the &lt;font face="Courier New"&gt;Person&lt;/font&gt; document are
shown, including the support for document validation and version independence.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Talk: Windows Server 2008 and Transactional NTFS&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
This &lt;a href="http://www.request-response.com/blog/PermaLink,guid,bca19fa8-7ba8-43d8-873e-3a8cf03335cb.aspx"&gt;blog
entry&lt;/a&gt; describes the concept.
&lt;/p&gt;
&lt;p&gt;
Demo 1: Logging&amp;nbsp;using CLFS (Common Log File System)&amp;nbsp;[&lt;a href="http://www.request-response.com/blog/content/binary/NTK2008TxFCLFS.zip"&gt;Download&lt;/a&gt;]&lt;br&gt;
Demo 2:&amp;nbsp;NTFS Transactions using the File System, SQL, WCF&amp;nbsp;[&lt;a href="http://www.request-response.com/blog/content/binary/NTK2008TxFFSSQLWCF.zip"&gt;Download&lt;/a&gt;]&lt;br&gt;
Demo 3:&amp;nbsp;NTFS Transactions using the&amp;nbsp;WCF, MTOM Transport&amp;nbsp;[&lt;a href="http://www.request-response.com/blog/content/binary/NTK2008TxFWCFMTOM.zip"&gt;Download&lt;/a&gt;] &lt;font size=1&gt;[2]&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size=1&gt;[1] All sources are in VS 2008 solution file format.&lt;br&gt;
[2] This transaction spans from the client, through the service boundary, to the server.&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.request-response.com/blog/aggbug.ashx?id=a6f0a54f-31ae-4ccd-ad90-fdfbabba5d95" /&gt;</description>
      <comments>http://www.request-response.com/blog/CommentView,guid,a6f0a54f-31ae-4ccd-ad90-fdfbabba5d95.aspx</comments>
      <category>.NET 3.5 - WCF</category>
      <category>Transactions</category>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>http://www.request-response.com/blog/Trackback.aspx?guid=f37eda08-845c-4b0a-a66c-ea9cec03c06b</trackback:ping>
      <pingback:server>http://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.request-response.com/blog/PermaLink,guid,f37eda08-845c-4b0a-a66c-ea9cec03c06b.aspx</pingback:target>
      <dc:creator>Matevz Gacnik</dc:creator>
      <wfw:comment>http://www.request-response.com/blog/CommentView,guid,f37eda08-845c-4b0a-a66c-ea9cec03c06b.aspx</wfw:comment>
      <wfw:commentRss>http://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=f37eda08-845c-4b0a-a66c-ea9cec03c06b</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Suppose we have a document like this:
</p>
        <p>
          <font face="Courier New">&lt;?xml version="1.0"?&gt;<br />
&lt;root xmlns="urn-foo-bar"&gt;<br />
  &lt;subroot&gt;<br />
    &lt;value1&gt;value1&lt;/value1&gt;<br />
    &lt;value2&gt;value2&lt;/value2&gt;<br />
  &lt;/subroot&gt;<br />
  &lt;Signature xmlns="h</font>
          <font face="Courier New">ttp://www.w3.org/2000/09/xmldsig</font>
          <font face="Courier New">#"&gt;<br />
    &lt;SignedInfo&gt;<br />
      &lt;CanonicalizationMethod 
<br />
        Algorithm="</font>
          <font face="Courier New">http://www.w3.org/TR/2001/REC-xml-c14n-20010315</font>
          <font face="Courier New">"
/&gt;<br />
      &lt;SignatureMethod<br />
        Algorithm="</font>
          <font face="Courier New">http://www.w3.org/2000/09/xmldsig#rsa-sha1</font>
          <font face="Courier New">"
/&gt;<br />
      &lt;Reference URI=""&gt;<br />
        &lt;Transforms&gt;<br />
          &lt;Transform <br />
            Algorithm="</font>
          <font face="Courier New">http://www.w3.org/2000/09/<br />
              xmldsig#enveloped-signature</font>
          <font face="Courier New">"/&gt;<br />
        &lt;/Transforms&gt;<br />
        &lt;DigestMethod<br />
          Algorithm="</font>
          <font face="Courier New">http://www.w3.org/2000/09/xmldsig#sha1</font>
          <font face="Courier New">"
/&gt;<br />
        &lt;DigestValue&gt;1Xp...EOko=&lt;/DigestValue&gt;<br />
      &lt;/Reference&gt;<br />
    &lt;/SignedInfo&gt;<br />
    &lt;SignatureValue&gt;nls...cH0k=&lt;/SignatureValue&gt;<br />
    &lt;KeyInfo&gt;<br />
      &lt;KeyValue&gt;<br />
        &lt;RSAKeyValue&gt;<br />
          &lt;Modulus&gt;9f3W...fxG0E=&lt;/Modulus&gt;<br />
          &lt;Exponent&gt;AQAB&lt;/Exponent&gt;<br />
        &lt;/RSAKeyValue&gt;<br />
      &lt;/KeyValue&gt;<br />
      &lt;X509Data&gt;<br />
        &lt;X509Certificate&gt;MIIEi...ktYgN&lt;/X509Certificate&gt;<br />
      &lt;/X509Data&gt;<br />
    &lt;/KeyInfo&gt;<br />
  &lt;/Signature&gt;<br />
&lt;/root&gt;</font>
        </p>
        <p>
This document represents data and an <em>enveloped digital signature</em> over the
complete XML document. The <em>digital signature completeness</em> is defined in the <font face="Courier New">Reference</font> element,
which has <font face="Courier New">URI</font> attribute set to empty string (<font face="Courier New">Reference
Uri=""</font>).
</p>
        <p>
          <strong>Checking the Signature</strong>
        </p>
        <p>
The following should always be applied during signature validation:
</p>
        <ol>
          <li>
Validating the digital signature 
</li>
          <li>
Validating the certificate(s) used to create the signature 
</li>
          <li>
Validating the certificate(s) chain(s)</li>
        </ol>
        <p>
          <strong>
            <em>Note:</em>
          </strong> In most situations this is the optimal validation
sequence. Why? Signatures are broken far more frequently then certificates are revoked/expired.
And certificates are revoked/expired far more frequently then their chains.
</p>
        <p>
          <em>1. Validating the digital signature</em>
        </p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
First, get it out of there:
</p>
          <p>
            <font face="Courier New">XmlNamespaceManager xmlns = new XmlNamespaceManager(xdkDocument.NameTable);
[1]<br />
xmlns.AddNamespace("ds", "</font>
            <font face="Courier New">http://www.w3.org/2000/09/xmldsig</font>
            <font face="Courier New">#");<br />
XmlNodeList nodeList = xdkDocument.SelectNodes("//ds:Signature", xmlns);<br /></font> <br /><font size="1">[1] <font face="Courier New">xdkDocument </font>should be an <font face="Courier New">XmlDocument</font> instance
representing your document.</font></p>
          <p>
Second, construct a <font face="Courier New">SignedXml</font> instance:
</p>
          <p>
            <font face="Courier New">foreach (XmlNode xmlNode in nodeList)<br />
{<br />
  // create signed xml object<br />
  SignedXml signedXml = new SignedXml(xdkDocument); [2]</font>
          </p>
          <p>
            <font face="Courier New">  // verify signature<br />
  signedXml.LoadXml((XmlElement)xmlNode);<br />
}</font>
          </p>
          <p>
            <font size="1">[2] Note that we are constructing the <font face="Courier New">SignedXml</font> instance
from a complete document, not only the signature. Read this.</font>
          </p>
          <p>
Third, validate:
</p>
          <p>
            <font face="Courier New">bool booSigValid = signedXml.CheckSignature();</font>
          </p>
          <p>
If <font face="Courier New">booSigValid</font> is <font face="Courier New">true</font>,
proceed.
</p>
        </blockquote>
        <p>
          <em>2. Validating the certificate(s) used to create the signature</em>
        </p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
First, get it out of there:
</p>
          <p>
            <font face="Courier New">XmlNode xndCert = xmlNode.SelectSingleNode(".//ds:X509Certificate",
xmlns); [3]</font>
          </p>
          <p>
            <font size="1">[3] There can be multiple <font face="Courier New">X509Certificate</font> elements
qualified with <font face="Courier New">h</font></font>
            <font face="Courier New" size="1">ttp://www.w3.org/2000/09/xmldsig</font>
            <font size="1">
              <font face="Courier New">#</font> namespace
in there. Xml Digital Signature specification is allowing the serialization of a complete
certificate chain of the certificate used to sign the document. Normally, the signing
certificate should be the first to be serialized.</font>
          </p>
          <p>
Second, get the <font face="Courier New">X509Certificate2</font> instance:
</p>
          <p>
            <font face="Courier New">byte[] bytCert = Convert.FromBase64String(xndCert.InnerText);<br />
X509Certificate2 x509cert = new X509Certificate2(bytCert);</font>
          </p>
          <p>
Third, validate:
</p>
          <p>
            <font face="Courier New">bool booCertValid = x509cert.Verify();</font>
          </p>
          <p>
If <font face="Courier New">booCertValid</font> is <font face="Courier New">true</font>,
proceed.
</p>
        </blockquote>
        <p>
          <em>3. Validating the certificate(s) chain(s)</em>
        </p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
Building and validating the chain:
</p>
          <p>
            <font face="Courier New">X509Chain certChain = new X509Chain();<br />
bool booChainValid = certChain.Build(x509cert);<br />
int intChainLength = certChain.ChainElements.Count; [4]</font>
          </p>
          <p>
If <font face="Courier New">booChainValid</font> is <font face="Courier New">true</font>,
your signature is <strong>valid</strong>.
</p>
        </blockquote>
        <p dir="ltr">
          <strong>Some Rules and Some Laws</strong>
        </p>
        <p dir="ltr" style="MARGIN-RIGHT: 0px">
We have three booleans:
</p>
        <p dir="ltr" style="MARGIN-RIGHT: 0px">
        </p>
        <ul>
          <li>
            <font face="Courier New">booSigValid</font> - signature validity 
</li>
          <li>
            <font face="Courier New">booCertValid</font> - certificate validity 
</li>
          <li>
            <font face="Courier New">booChainValid</font> - certificate's chain validity</li>
        </ul>
        <p>
        </p>
        <p>
If <font face="Courier New">booSigValid</font> evaluates to <font face="Courier New">false</font>,
there is no discussion. Someone <strong>changed the document</strong>.
</p>
        <p>
What happens if one of the following two expressions evaluates to <font face="Courier New">true</font>:
</p>
        <p>
1. <font face="Courier New">((booSigValid) &amp;&amp; (!booCertValid) &amp;&amp; (!booChainValid))<br /></font>2. <font face="Courier New">((booSigValid) &amp;&amp; (booCertValid) &amp;&amp;
(!booChainValid))</font></p>
        <p>
This normally means that either the certificate is not valid (CRLed or expired) [4],
or one of the chain's certificate is not valid/expired.
</p>
        <p>
          <font size="1">[4] The premise is that one checked the signature according to 1, 2,
3 schema described above.</font>
        </p>
        <p>
          <strong>The Question</strong>
        </p>
        <p>
Is digital signature valid even if CA revoked the certificate after the
signature has already been done? Is it valid even after the certificate expires? If
signature is valid and certificate has been revoked, what is the legal validity of
the signature?
</p>
        <p>
In legal terms, the signature would be <strong>invalid</strong> on both upper assertions,
1 and 2. 
</p>
        <p>
This means, that once the generator of the signature is dead, or one of his predecessors
is dead, all his children die too.
</p>
        <p>
          <strong>Timestamps to the Rescue</strong>
        </p>
        <p>
According to most country's digital signature laws the signature is valid only during
the validity of the signing certificate and validity of the signing certificate's
chain, both being checked for revocation and expiry date ... if you don't timestamp
it.
</p>
        <p>
If the source document has <em>another signature</em> from a trusted authority, and
that authority is a timestamp authority, it would look like this:
</p>
        <p>
          <font face="Courier New">&lt;?xml version="1.0"?&gt;<br />
&lt;root xmlns="urn-foo-bar"&gt;<br />
  &lt;subroot&gt;<br />
    &lt;value1&gt;value1&lt;/value1&gt;<br />
    &lt;value2&gt;value2&lt;/value2&gt;<br />
  &lt;/subroot&gt;<br />
  &lt;Signature xmlns="</font>
          <font face="Courier New">http://www.w3.org/2000/09/xmldsig</font>
          <font face="Courier New">#"&gt;<br />
    ...<br />
  &lt;/Signature&gt;<br />
  &lt;dsig:Signature Id="TimeStampToken"<br />
    </font>
          <font face="Courier New">xmlns:dsig="</font>
          <font face="Courier New">http://www.w3.org/2000/09/xmldsig</font>
          <font face="Courier New">#"&gt;<br />
    &lt;dsig:SignedInfo&gt;<br />
      &lt;dsig:CanonicalizationMethod<br />
        Algorithm="</font>
          <font face="Courier New">http://www.w3.org/TR/2001/REC-xml-c14n-20010315</font>
          <font face="Courier New">"
/&gt;<br />
      &lt;dsig:SignatureMethod<br />
        Algorithm="</font>
          <font face="Courier New">http://www.w3.org/2000/09/xmldsig#rsa-sha1"</font>
          <font face="Courier New"> /&gt;<br />
      &lt;dsig:Reference<br />
        URI="#TimeStampInfo-113D2EEB158BBB2D7CC000000000004DF65"&gt;<br />
        &lt;dsig:DigestMethod<br />
          Algorithm="</font>
          <font face="Courier New">http://www.w3.org/2000/09/xmldsig#sha1"</font>
          <font face="Courier New"> /&gt;<br />
          &lt;dsig:DigestValue&gt;y+xw...scKg=&lt;/dsig:DigestValue&gt;<br />
      &lt;/dsig:Reference&gt;<br />
      &lt;dsig:Reference URI="#TimeStampAuthority"&gt;<br />
        &lt;dsig:DigestMethod<br />
          Algorithm="</font>
          <font face="Courier New">http://www.w3.org/2000/09/xmldsig#sha1"</font>
          <font face="Courier New"> /&gt;<br />
        &lt;dsig:DigestValue&gt;KhFIr...Sv4=&lt;/dsig:DigestValue&gt;<br />
      &lt;dsig:/Reference&gt;<br />
    &lt;/dsig:SignedInfo&gt;<br />
    &lt;dsig:SignatureValue&gt;R4m...k3aQ==&lt;/dsig:SignatureValue&gt;<br />
    &lt;dsig:KeyInfo Id="TimeStampAuthority"&gt;<br />
      &lt;dsig:X509Data&gt;<br />
        &lt;dsig:X509Certificate&gt;MII...Osmg==&lt;/dsig:X509Certificate&gt;<br />
      &lt;/dsig:X509Data&gt;<br />
    &lt;/dsig:KeyInfo&gt;<br />
    &lt;dsig:Object<br />
      Id="TimeStampInfo-113D2EEB158BBB2D7CC000000000004DF65"&gt;<br />
      &lt;ts:TimeStampInfo<br />
         xmlns:ts="</font>
          <font face="Courier New">http://www.provider.com/schemas<font color="#003300"><br />
           </font>/timestamp-protocol-20020207</font>
          <font face="Courier New">"<br />
         xmlns:ds="</font>
          <font face="Courier New">http://www.w3.org/2000/09/xmldsig</font>
          <font face="Courier New">#"&gt;<br />
        &lt;ts:Policy id="</font>
          <font face="Courier New">http://provider.tsa.com/documents"</font>
          <font face="Courier New"> /&gt;<br />
          &lt;ts:Digest&gt;<br />
            &lt;ds:DigestMethod
Algorithm="</font>
          <font face="Courier New">http://www.w3.org/2000/<br />
              09/xmldsig#sha1"</font>
          <font face="Courier New"> /&gt;<br />
            &lt;ds:DigestValue&gt;V7+bH...Kmsec=&lt;/ds:DigestValue&gt;<br />
          &lt;/ts:Digest&gt;<br />
          &lt;ts:SerialNumber&gt;938...045&lt;/ts:SerialNumber&gt;<br />
          &lt;ts:CreationTime&gt;2008-04-13T11:31:42.004Z&lt;/ts:CreationTime&gt;<br />
          &lt;ts:Nonce&gt;121...780&lt;/ts:Nonce&gt;<br />
      &lt;/ts:TimeStampInfo&gt;<br />
    &lt;/dsig:Object&gt;<br />
  &lt;/dsig:Signature&gt;<br />
&lt;/root&gt;</font>
        </p>
        <p>
The second signature would be performed by an out-of-band authority, normally a <strong>TSA
authority</strong>. It would only sign a <em>hash value</em> (in this case SHA1 hash)
which was constructed by hashing the original document and the included digital signature.
</p>
        <p>
This (second) signature should be checked using the same 1, 2, 3 steps. For the purpose
of this mind experiment, let's say it would generate a <font face="Courier New">booTimestampValid</font> boolean.
</p>
        <p>
Now, let's reexamine the booleans:
</p>
        <ol>
          <li>
            <font face="Courier New">((booSigValid) &amp;&amp; (!booCertValid) &amp;&amp; (!booChainValid)
&amp;&amp; (booTimestampValid))</font>
          </li>
          <li>
            <font face="Courier New">((booSigValid) &amp;&amp; (booCertValid) &amp;&amp; (!booChainValid)
&amp;&amp; (booTimestampValid))</font>
          </li>
        </ol>
        <p>
In this case, <em>even though the signature's certificate (or its chain) is invalid,
the signature would pass legal validity</em> if the timesamp's signature is valid,
together with its certificate and certificate chain. Note that the TSA signature is
generated with a different set of keys than the original digital signature.
</p>
        <p>
Actually <font face="Courier New">booTimestampValid</font> is defined as <font face="Courier New">((booSigValid)
&amp;&amp; (booCertValid) &amp;&amp; (booChainValid))</font> for the timestamp signature/certificate/certificate
chain [5].
</p>
        <p>
          <font size="1">[5] Legal validity is guaranteed only in cases where 1 or 2 are true.</font>
        </p>
        <img width="0" height="0" src="http://www.request-response.com/blog/aggbug.ashx?id=f37eda08-845c-4b0a-a66c-ea9cec03c06b" />
      </body>
      <title>Laws and Digital Signatures</title>
      <guid isPermaLink="false">http://www.request-response.com/blog/PermaLink,guid,f37eda08-845c-4b0a-a66c-ea9cec03c06b.aspx</guid>
      <link>http://www.request-response.com/blog/PermaLink,guid,f37eda08-845c-4b0a-a66c-ea9cec03c06b.aspx</link>
      <pubDate>Wed, 16 Apr 2008 17:32:29 GMT</pubDate>
      <description>&lt;p&gt;
Suppose we have a document like this:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;lt;?xml version="1.0"?&amp;gt;&lt;br&gt;
&amp;lt;root xmlns="urn-foo-bar"&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;subroot&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;value1&amp;gt;value1&amp;lt;/value1&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;value2&amp;gt;value2&amp;lt;/value2&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;/subroot&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;Signature xmlns="h&lt;/font&gt;&lt;font face="Courier New"&gt;ttp://www.w3.org/2000/09/xmldsig&lt;/font&gt;&lt;font face="Courier New"&gt;#"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;SignedInfo&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;CanonicalizationMethod 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Algorithm="&lt;/font&gt;&lt;font face="Courier New"&gt;http://www.w3.org/TR/2001/REC-xml-c14n-20010315&lt;/font&gt;&lt;font face="Courier New"&gt;"
/&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;SignatureMethod&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Algorithm="&lt;/font&gt;&lt;font face="Courier New"&gt;http://www.w3.org/2000/09/xmldsig#rsa-sha1&lt;/font&gt;&lt;font face="Courier New"&gt;"
/&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Reference URI=""&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Transforms&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Transform&amp;nbsp;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Algorithm="&lt;/font&gt;&lt;font face="Courier New"&gt;http://www.w3.org/2000/09/&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;xmldsig#enveloped-signature&lt;/font&gt;&lt;font face="Courier New"&gt;"/&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Transforms&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;DigestMethod&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Algorithm="&lt;/font&gt;&lt;font face="Courier New"&gt;http://www.w3.org/2000/09/xmldsig#sha1&lt;/font&gt;&lt;font face="Courier New"&gt;"
/&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;DigestValue&amp;gt;1Xp...EOko=&amp;lt;/DigestValue&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Reference&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/SignedInfo&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;SignatureValue&amp;gt;nls...cH0k=&amp;lt;/SignatureValue&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;KeyInfo&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;KeyValue&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;RSAKeyValue&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Modulus&amp;gt;9f3W...fxG0E=&amp;lt;/Modulus&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Exponent&amp;gt;AQAB&amp;lt;/Exponent&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/RSAKeyValue&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/KeyValue&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;X509Data&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;X509Certificate&amp;gt;MIIEi...ktYgN&amp;lt;/X509Certificate&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/X509Data&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/KeyInfo&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;/Signature&amp;gt;&lt;br&gt;
&amp;lt;/root&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
This document represents data and an &lt;em&gt;enveloped digital signature&lt;/em&gt; over the
complete XML document. The &lt;em&gt;digital signature completeness&lt;/em&gt; is defined in the &lt;font face="Courier New"&gt;Reference&lt;/font&gt; element,
which has &lt;font face="Courier New"&gt;URI&lt;/font&gt; attribute set to empty string (&lt;font face="Courier New"&gt;Reference
Uri=""&lt;/font&gt;).
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Checking the Signature&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
The following should always be applied during signature validation:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Validating the digital signature 
&lt;li&gt;
Validating the certificate(s) used to create the signature 
&lt;li&gt;
Validating the certificate(s) chain(s)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
&lt;strong&gt;&lt;em&gt;Note:&lt;/em&gt;&lt;/strong&gt; In most situations this is the optimal validation
sequence. Why? Signatures are broken far more frequently then certificates are revoked/expired.
And certificates are revoked/expired far more frequently then their chains.
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;1. Validating the digital signature&lt;/em&gt;
&lt;/p&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
First, get it out of there:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;XmlNamespaceManager xmlns = new XmlNamespaceManager(xdkDocument.NameTable);
[1]&lt;br&gt;
xmlns.AddNamespace("ds", "&lt;/font&gt;&lt;font face="Courier New"&gt;http://www.w3.org/2000/09/xmldsig&lt;/font&gt;&lt;font face="Courier New"&gt;#");&lt;br&gt;
XmlNodeList nodeList = xdkDocument.SelectNodes("//ds:Signature", xmlns);&lt;br&gt;
&lt;/font&gt;&amp;nbsp;&lt;br&gt;
&lt;font size=1&gt;[1] &lt;font face="Courier New"&gt;xdkDocument &lt;/font&gt;should be an &lt;font face="Courier New"&gt;XmlDocument&lt;/font&gt; instance
representing your document.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
Second, construct a &lt;font face="Courier New"&gt;SignedXml&lt;/font&gt; instance:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;foreach (XmlNode xmlNode in nodeList)&lt;br&gt;
{&lt;br&gt;
&amp;nbsp; // create signed xml object&lt;br&gt;
&amp;nbsp; SignedXml signedXml = new SignedXml(xdkDocument); [2]&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;nbsp; // verify signature&lt;br&gt;
&amp;nbsp; signedXml.LoadXml((XmlElement)xmlNode);&lt;br&gt;
}&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size=1&gt;[2] Note that we are constructing the &lt;font face="Courier New"&gt;SignedXml&lt;/font&gt; instance
from a complete document, not only the signature. Read this.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
Third, validate:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;bool booSigValid = signedXml.CheckSignature();&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
If &lt;font face="Courier New"&gt;booSigValid&lt;/font&gt; is &lt;font face="Courier New"&gt;true&lt;/font&gt;,
proceed.
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
&lt;em&gt;2. Validating the certificate(s) used to create the signature&lt;/em&gt;
&lt;/p&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
First, get it out of there:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;XmlNode xndCert = xmlNode.SelectSingleNode(".//ds:X509Certificate",
xmlns); [3]&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size=1&gt;[3] There can be multiple &lt;font face="Courier New"&gt;X509Certificate&lt;/font&gt; elements
qualified with &lt;font face="Courier New"&gt;h&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New" size=1&gt;ttp://www.w3.org/2000/09/xmldsig&lt;/font&gt;&lt;font size=1&gt;&lt;font face="Courier New"&gt;#&lt;/font&gt; namespace
in there. Xml Digital Signature specification is allowing the serialization of a complete
certificate chain of the certificate used to sign the document. Normally, the signing
certificate should be the first to be serialized.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
Second, get the &lt;font face="Courier New"&gt;X509Certificate2&lt;/font&gt; instance:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;byte[] bytCert = Convert.FromBase64String(xndCert.InnerText);&lt;br&gt;
X509Certificate2 x509cert = new X509Certificate2(bytCert);&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
Third, validate:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;bool booCertValid = x509cert.Verify();&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
If &lt;font face="Courier New"&gt;booCertValid&lt;/font&gt; is &lt;font face="Courier New"&gt;true&lt;/font&gt;,
proceed.
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
&lt;em&gt;3. Validating the certificate(s) chain(s)&lt;/em&gt;
&lt;/p&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
Building and validating the chain:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;X509Chain certChain = new X509Chain();&lt;br&gt;
bool booChainValid = certChain.Build(x509cert);&lt;br&gt;
int intChainLength = certChain.ChainElements.Count; [4]&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
If &lt;font face="Courier New"&gt;booChainValid&lt;/font&gt; is &lt;font face="Courier New"&gt;true&lt;/font&gt;,
your signature is &lt;strong&gt;valid&lt;/strong&gt;.
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p dir=ltr&gt;
&lt;strong&gt;Some Rules and Some Laws&lt;/strong&gt;
&lt;/p&gt;
&lt;p dir=ltr style="MARGIN-RIGHT: 0px"&gt;
We have three booleans:
&lt;/p&gt;
&lt;p dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;font face="Courier New"&gt;booSigValid&lt;/font&gt; - signature validity 
&lt;li&gt;
&lt;font face="Courier New"&gt;booCertValid&lt;/font&gt; - certificate validity 
&lt;li&gt;
&lt;font face="Courier New"&gt;booChainValid&lt;/font&gt; - certificate's chain validity&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
If &lt;font face="Courier New"&gt;booSigValid&lt;/font&gt; evaluates to &lt;font face="Courier New"&gt;false&lt;/font&gt;,
there is no discussion. Someone &lt;strong&gt;changed the document&lt;/strong&gt;.
&lt;/p&gt;
&lt;p&gt;
What happens if one of the following two expressions evaluates to &lt;font face="Courier New"&gt;true&lt;/font&gt;:
&lt;/p&gt;
&lt;p&gt;
1. &lt;font face="Courier New"&gt;((booSigValid) &amp;amp;&amp;amp; (!booCertValid) &amp;amp;&amp;amp; (!booChainValid))&lt;br&gt;
&lt;/font&gt;2. &lt;font face="Courier New"&gt;((booSigValid) &amp;amp;&amp;amp; (booCertValid) &amp;amp;&amp;amp;
(!booChainValid))&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
This normally means that either the certificate is not valid (CRLed or expired) [4],
or one of the chain's certificate is not valid/expired.
&lt;/p&gt;
&lt;p&gt;
&lt;font size=1&gt;[4] The premise is that one checked the signature according to 1, 2,
3 schema described above.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;The Question&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Is&amp;nbsp;digital signature&amp;nbsp;valid even if CA revoked the certificate after the
signature has already been done? Is it valid even after the certificate expires? If
signature is valid and certificate has been revoked, what is the legal validity of
the signature?
&lt;/p&gt;
&lt;p&gt;
In legal terms, the signature would be &lt;strong&gt;invalid&lt;/strong&gt; on both upper assertions,
1 and 2. 
&lt;/p&gt;
&lt;p&gt;
This means, that once the generator of the signature is dead, or one of his predecessors
is dead, all&amp;nbsp;his children die too.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Timestamps to the Rescue&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
According to most country's digital signature laws the signature is valid only during
the validity of the signing certificate and validity of the signing certificate's
chain, both being checked for revocation and expiry date ... if you don't timestamp
it.
&lt;/p&gt;
&lt;p&gt;
If the source document has &lt;em&gt;another signature&lt;/em&gt; from a trusted authority, and
that authority is a timestamp authority, it would look like this:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;lt;?xml version="1.0"?&amp;gt;&lt;br&gt;
&amp;lt;root xmlns="urn-foo-bar"&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;subroot&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;value1&amp;gt;value1&amp;lt;/value1&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;value2&amp;gt;value2&amp;lt;/value2&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;/subroot&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;Signature xmlns="&lt;/font&gt;&lt;font face="Courier New"&gt;http://www.w3.org/2000/09/xmldsig&lt;/font&gt;&lt;font face="Courier New"&gt;#"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;br&gt;
&amp;nbsp; &amp;lt;/Signature&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;dsig:Signature Id="TimeStampToken"&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font face="Courier New"&gt;xmlns:dsig="&lt;/font&gt;&lt;font face="Courier New"&gt;http://www.w3.org/2000/09/xmldsig&lt;/font&gt;&lt;font face="Courier New"&gt;#"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;dsig:SignedInfo&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;dsig:CanonicalizationMethod&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Algorithm="&lt;/font&gt;&lt;font face="Courier New"&gt;http://www.w3.org/TR/2001/REC-xml-c14n-20010315&lt;/font&gt;&lt;font face="Courier New"&gt;"
/&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;dsig:SignatureMethod&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Algorithm="&lt;/font&gt;&lt;font face="Courier New"&gt;http://www.w3.org/2000/09/xmldsig#rsa-sha1"&lt;/font&gt;&lt;font face="Courier New"&gt; /&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;dsig:Reference&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; URI="#TimeStampInfo-113D2EEB158BBB2D7CC000000000004DF65"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;dsig:DigestMethod&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Algorithm="&lt;/font&gt;&lt;font face="Courier New"&gt;http://www.w3.org/2000/09/xmldsig#sha1"&lt;/font&gt;&lt;font face="Courier New"&gt; /&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;dsig:DigestValue&amp;gt;y+xw...scKg=&amp;lt;/dsig:DigestValue&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/dsig:Reference&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;dsig:Reference URI="#TimeStampAuthority"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;dsig:DigestMethod&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Algorithm="&lt;/font&gt;&lt;font face="Courier New"&gt;http://www.w3.org/2000/09/xmldsig#sha1"&lt;/font&gt;&lt;font face="Courier New"&gt; /&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;dsig:DigestValue&amp;gt;KhFIr...Sv4=&amp;lt;/dsig:DigestValue&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;dsig:/Reference&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/dsig:SignedInfo&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;dsig:SignatureValue&amp;gt;R4m...k3aQ==&amp;lt;/dsig:SignatureValue&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;dsig:KeyInfo Id="TimeStampAuthority"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;dsig:X509Data&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;dsig:X509Certificate&amp;gt;MII...Osmg==&amp;lt;/dsig:X509Certificate&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/dsig:X509Data&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/dsig:KeyInfo&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;dsig:Object&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Id="TimeStampInfo-113D2EEB158BBB2D7CC000000000004DF65"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ts:TimeStampInfo&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:ts="&lt;/font&gt;&lt;font face="Courier New"&gt;http://www.provider.com/schemas&lt;font color=#003300&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;/timestamp-protocol-20020207&lt;/font&gt;&lt;font face="Courier New"&gt;"&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:ds="&lt;/font&gt;&lt;font face="Courier New"&gt;http://www.w3.org/2000/09/xmldsig&lt;/font&gt;&lt;font face="Courier New"&gt;#"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ts:Policy id="&lt;/font&gt;&lt;font face="Courier New"&gt;http://provider.tsa.com/documents"&lt;/font&gt;&lt;font face="Courier New"&gt; /&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ts:Digest&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ds:DigestMethod
Algorithm="&lt;/font&gt;&lt;font face="Courier New"&gt;http://www.w3.org/2000/&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 09/xmldsig#sha1"&lt;/font&gt;&lt;font face="Courier New"&gt; /&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ds:DigestValue&amp;gt;V7+bH...Kmsec=&amp;lt;/ds:DigestValue&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/ts:Digest&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ts:SerialNumber&amp;gt;938...045&amp;lt;/ts:SerialNumber&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ts:CreationTime&amp;gt;2008-04-13T11:31:42.004Z&amp;lt;/ts:CreationTime&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ts:Nonce&amp;gt;121...780&amp;lt;/ts:Nonce&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/ts:TimeStampInfo&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/dsig:Object&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;/dsig:Signature&amp;gt;&lt;br&gt;
&amp;lt;/root&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
The second signature would be performed by an out-of-band authority, normally a &lt;strong&gt;TSA
authority&lt;/strong&gt;. It would only sign a &lt;em&gt;hash value&lt;/em&gt; (in this case SHA1 hash)
which was constructed by hashing the original document and the included digital signature.
&lt;/p&gt;
&lt;p&gt;
This (second) signature should be checked using the same 1, 2, 3 steps. For the purpose
of this mind experiment, let's say it would generate a &lt;font face="Courier New"&gt;booTimestampValid&lt;/font&gt; boolean.
&lt;/p&gt;
&lt;p&gt;
Now, let's reexamine the booleans:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;font face="Courier New"&gt;((booSigValid) &amp;amp;&amp;amp; (!booCertValid) &amp;amp;&amp;amp; (!booChainValid)
&amp;amp;&amp;amp; (booTimestampValid))&lt;/font&gt; 
&lt;li&gt;
&lt;font face="Courier New"&gt;((booSigValid) &amp;amp;&amp;amp; (booCertValid) &amp;amp;&amp;amp; (!booChainValid)
&amp;amp;&amp;amp; (booTimestampValid))&lt;/font&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
In this case, &lt;em&gt;even though the signature's certificate (or its chain) is invalid,
the signature would pass legal validity&lt;/em&gt; if the timesamp's signature is valid,
together with its certificate and certificate chain. Note that the TSA signature is
generated with a different set of&amp;nbsp;keys than the original digital signature.
&lt;/p&gt;
&lt;p&gt;
Actually &lt;font face="Courier New"&gt;booTimestampValid&lt;/font&gt; is defined as &lt;font face="Courier New"&gt;((booSigValid)
&amp;amp;&amp;amp; (booCertValid) &amp;amp;&amp;amp; (booChainValid))&lt;/font&gt; for the timestamp signature/certificate/certificate
chain&amp;nbsp;[5].
&lt;/p&gt;
&lt;p&gt;
&lt;font size=1&gt;[5] Legal validity is guaranteed only in cases where 1 or 2 are true.&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.request-response.com/blog/aggbug.ashx?id=f37eda08-845c-4b0a-a66c-ea9cec03c06b" /&gt;</description>
      <comments>http://www.request-response.com/blog/CommentView,guid,f37eda08-845c-4b0a-a66c-ea9cec03c06b.aspx</comments>
      <category>Other</category>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>http://www.request-response.com/blog/Trackback.aspx?guid=a510f1dc-23bb-42aa-b683-a70c4740bfe5</trackback:ping>
      <pingback:server>http://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.request-response.com/blog/PermaLink,guid,a510f1dc-23bb-42aa-b683-a70c4740bfe5.aspx</pingback:target>
      <dc:creator>Matevz Gacnik</dc:creator>
      <wfw:comment>http://www.request-response.com/blog/CommentView,guid,a510f1dc-23bb-42aa-b683-a70c4740bfe5.aspx</wfw:comment>
      <wfw:commentRss>http://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=a510f1dc-23bb-42aa-b683-a70c4740bfe5</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
There is a <em>serious limitation</em> present in the RTM version of WCF 3.0/3.5 regarding
control of WS-RM retry messages during a <strong>reliable session</strong> saga.
</p>
        <p>
Let me try to explain the concept.
</p>
        <p>
We have a sender (communication initiator) and a receiver (service). When a reliable
session is constructed between the two, every message needs to come to the other side.
In a request-reply world, the sender would be a client during the request phase. Then
roles would switch during the response phase.
</p>
        <p>
The problem arises when one of the sides <strong>does not get</strong> the message
acknowledgement in time. WCF reliable messaging implementation retries the sending
process and hopes for the acknowledgement. All is well.
</p>
        <p>
The problem is that there is <em>no way </em>for the sending application to specify <em>how
long the retry timeout should be</em>. There is a way to specify channel opening and
closing timeouts, acknowledgement interval and more, but nothing will define how long
should the initiator wait for message acks.
</p>
        <p>
          <img src="http://www.request-response.com/blog/images/wcfreplytimeout1.gif" />
        </p>
        <p>
Let's talk about how WCF acknowledges messages.
</p>
        <p>
During a request-reply exchange every request message is acknowledged <em>in a response
message</em>. WS-RM SOAP headers regarding sequence definition (request) and acknowledgements
(response) look like this:
</p>
        <p>
          <font face="Courier New">a1 &lt;r:Sequence s:mustUnderstand="1" u:Id="_2"&gt;<br />
a2    &lt;r:Identifier&gt;urn:uuid:6c9d...ca90&lt;/r:Identifier&gt;<br />
a3    <strong>&lt;r:MessageNumber&gt;1&lt;/r:MessageNumber&gt;<br /></strong>a4 &lt;/r:Sequence&gt;</font>
        </p>
        <p>
          <font face="Courier New">b1 &lt;r:SequenceAcknowledgement u:Id="_3"&gt;<br />
b2    &lt;r:Identifier&gt;urn:uuid:6c99...ca290&lt;/r:Identifier&gt;<br />
b3    <strong>&lt;r:AcknowledgementRange Lower="1" Upper="1"/&gt;<br />
b4    &lt;netrm:BufferRemaining 
<br />
b5       xmlns:netrm="</strong></font>
          <font face="Courier New">
            <strong>http://schemas.microsoft.com/ws/2006/05/rm"</strong>
          </font>
          <font face="Courier New">
            <strong>&gt;<br />
b6    &lt;/netrm:BufferRemaining&gt;<br /></strong>b7 &lt;/r:SequenceAcknowledgement&gt;</font>
        </p>
        <p>
Request phase defines a sequence and sends the first message (<font face="Courier New">a3</font>).
In response, there is the appropriate acknowledgement present, which acks the first
message (<font face="Courier New">b3</font>) with <font face="Courier New">Lower</font> and <font face="Courier New">Upper</font> attributes.
Lines <font face="Courier New">b4-b6</font> define a benign and super useful WCF implementation
of <em>flow control</em>, which allows the sender to limit the rate of sent messages
if service side <strong>becomes congested</strong>.
</p>
        <p>
When the session is setup, WCF will have a really small time waiting window for acks.
Therefore, if ack is not received during this period, the infrastructure <em>will
retry the message</em>.
</p>
        <p>
Duplex contracts work slightly differently. There, the acknowledgement interval can
be set. This configuration option (config attribute is called <font face="Courier New">acknowledgementInterval</font>)
is named inappropriately, since it controls the service and not the client side.
</p>
        <p>
It does not define the time limit on <em>received acknowledgements</em>, but the necessary
time to <em>send the acknowledgments back</em>. It allows grouping of sent acks, so
that multiple incoming messages can be acked together. Also, the infrastructure will
not necessarily honor the specified value.
</p>
        <p>
Now consider the following scenario:
</p>
        <ol>
          <li>
The client is on a reliable network 
</li>
          <li>
Network bandwidth is so thin that the sending message takes 20s to come through <font face="Courier New">[1]</font></li>
          <li>
            <a href="http://www.request-response.com/blog/PermaLink,guid,48b65a92-4015-45f2-8fee-78ae5c0e48b8.aspx">Service
instancing</a> is set to <font face="Courier New">Multiple</font></li>
          <li>
The solution uses a request-reply semantics</li>
        </ol>
        <p>
          <font size="1">
            <font face="Courier New">[1]</font> It does not matter whether the
initiator is on a dial up, or the message is huge.</font>
        </p>
        <p>
          <strong>What happens?</strong>
        </p>
        <p>
Service initiator sets up a reliable session, then:
</p>
        <ol>
          <li>
First message is being sent 
</li>
          <li>
Since the retry interval is really small <font face="Courier New">[2]</font>, the
message will not get to the other end and the acknowledgement will not bounce
back in time 
</li>
          <li>
First message is retried, now two messages are being transported 
</li>
          <li>
No acks received yet 
</li>
          <li>
First message is retried again 
</li>
          <li>
Network bandwidth is even thinner 
</li>
          <li>
First message is acknowledged 
</li>
          <li>
First message retry is discarded on the service side 
</li>
          <li>
Second message retry is discarded on the service side</li>
        </ol>
        <p>
          <font size="1">
            <font face="Courier New">[2]</font> Under 3s.</font>
        </p>
        <p>
The number of retry messages depends on the <em>bandwidth</em> and <em>message size</em>.
It can happen that tens of messages will be sent before first acknowledgement will
be received.
</p>
        <p>
          <strong>Adaptability algorithms</strong>
        </p>
        <p>
A good thing is that there are undocumented algorithms implemented for retry timeout.
The implementation increases the reply timeout <em>exponentially</em> when the infrastructure
detects that the network conditions demand more time (slow throughput) and allows
reliable delivery (no losses). If loses are present the reply timeout decreases.
</p>
        <p>
Retry timeout is actually calculated when establishing an RM session. It
is based on the roundtrip time and is bigger if the roundtrip time is long.
</p>
        <p>
So, when first messages in a session are exchanged, don't be too surprised to see
a couple of message retries.
</p>
        <img width="0" height="0" src="http://www.request-response.com/blog/aggbug.ashx?id=a510f1dc-23bb-42aa-b683-a70c4740bfe5" />
      </body>
      <title>WCF: Reliable Messaging and Retry Timeouts</title>
      <guid isPermaLink="false">http://www.request-response.com/blog/PermaLink,guid,a510f1dc-23bb-42aa-b683-a70c4740bfe5.aspx</guid>
      <link>http://www.request-response.com/blog/PermaLink,guid,a510f1dc-23bb-42aa-b683-a70c4740bfe5.aspx</link>
      <pubDate>Tue, 08 Apr 2008 22:33:13 GMT</pubDate>
      <description>&lt;p&gt;
There is a &lt;em&gt;serious limitation&lt;/em&gt; present in the RTM version of WCF 3.0/3.5 regarding
control of WS-RM retry messages during a &lt;strong&gt;reliable session&lt;/strong&gt; saga.
&lt;/p&gt;
&lt;p&gt;
Let me try to explain the concept.
&lt;/p&gt;
&lt;p&gt;
We have a sender (communication initiator) and a receiver (service). When a reliable
session is constructed between the two, every message needs to come to the other side.
In a request-reply world, the sender would be a client during the request phase. Then
roles would switch during the response phase.
&lt;/p&gt;
&lt;p&gt;
The problem arises when one of the sides &lt;strong&gt;does not get&lt;/strong&gt; the message
acknowledgement in time. WCF reliable messaging implementation retries the sending
process and hopes for the acknowledgement. All is well.
&lt;/p&gt;
&lt;p&gt;
The problem is that there is &lt;em&gt;no way &lt;/em&gt;for the sending application to specify &lt;em&gt;how
long the retry timeout should be&lt;/em&gt;. There is a way to specify channel opening and
closing timeouts, acknowledgement interval and more, but nothing will define how long
should the initiator wait for message acks.
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.request-response.com/blog/images/wcfreplytimeout1.gif"&gt;
&lt;/p&gt;
&lt;p&gt;
Let's talk about how WCF acknowledges messages.
&lt;/p&gt;
&lt;p&gt;
During a request-reply exchange every request message is acknowledged &lt;em&gt;in a response
message&lt;/em&gt;. WS-RM SOAP headers regarding sequence definition (request) and acknowledgements
(response) look like this:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;a1 &amp;lt;r:Sequence s:mustUnderstand="1" u:Id="_2"&amp;gt;&lt;br&gt;
a2&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;r:Identifier&amp;gt;urn:uuid:6c9d...ca90&amp;lt;/r:Identifier&amp;gt;&lt;br&gt;
a3&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;strong&gt;&amp;lt;r:MessageNumber&amp;gt;1&amp;lt;/r:MessageNumber&amp;gt;&lt;br&gt;
&lt;/strong&gt;a4 &amp;lt;/r:Sequence&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;b1 &amp;lt;r:SequenceAcknowledgement u:Id="_3"&amp;gt;&lt;br&gt;
b2&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;r:Identifier&amp;gt;urn:uuid:6c99...ca290&amp;lt;/r:Identifier&amp;gt;&lt;br&gt;
b3&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;strong&gt;&amp;lt;r:AcknowledgementRange Lower="1" Upper="1"/&amp;gt;&lt;br&gt;
b4&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;netrm:BufferRemaining 
&lt;br&gt;
b5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:netrm="&lt;/strong&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;strong&gt;http://schemas.microsoft.com/ws/2006/05/rm"&lt;/strong&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;strong&gt;&amp;gt;&lt;br&gt;
b6&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/netrm:BufferRemaining&amp;gt;&lt;br&gt;
&lt;/strong&gt;b7 &amp;lt;/r:SequenceAcknowledgement&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
Request phase defines a sequence and sends the first message (&lt;font face="Courier New"&gt;a3&lt;/font&gt;).
In response, there is the appropriate acknowledgement present, which acks the first
message (&lt;font face="Courier New"&gt;b3&lt;/font&gt;) with &lt;font face="Courier New"&gt;Lower&lt;/font&gt; and &lt;font face="Courier New"&gt;Upper&lt;/font&gt; attributes.
Lines &lt;font face="Courier New"&gt;b4-b6&lt;/font&gt; define a benign and super useful WCF implementation
of &lt;em&gt;flow control&lt;/em&gt;, which allows the sender to limit the rate of sent messages
if service side &lt;strong&gt;becomes congested&lt;/strong&gt;.
&lt;/p&gt;
&lt;p&gt;
When the session is setup, WCF will have a really small time waiting window for acks.
Therefore, if ack is not received during this period, the infrastructure &lt;em&gt;will
retry the message&lt;/em&gt;.
&lt;/p&gt;
&lt;p&gt;
Duplex contracts work slightly differently. There, the acknowledgement interval can
be set. This configuration option (config attribute is called &lt;font face="Courier New"&gt;acknowledgementInterval&lt;/font&gt;)
is named inappropriately, since it controls the service and not the client side.
&lt;/p&gt;
&lt;p&gt;
It does not define the time limit on &lt;em&gt;received acknowledgements&lt;/em&gt;, but the necessary
time to &lt;em&gt;send the acknowledgments back&lt;/em&gt;. It allows grouping of sent acks, so
that multiple incoming messages can be acked together. Also, the infrastructure will
not necessarily honor the specified value.
&lt;/p&gt;
&lt;p&gt;
Now consider the following scenario:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
The client is on a reliable network 
&lt;li&gt;
Network bandwidth is so thin that the sending message takes 20s to come through &lt;font face="Courier New"&gt;[1]&lt;/font&gt; 
&lt;li&gt;
&lt;a href="http://www.request-response.com/blog/PermaLink,guid,48b65a92-4015-45f2-8fee-78ae5c0e48b8.aspx"&gt;Service
instancing&lt;/a&gt; is set to &lt;font face="Courier New"&gt;Multiple&lt;/font&gt; 
&lt;li&gt;
The solution uses a request-reply semantics&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
&lt;font size=1&gt;&lt;font face="Courier New"&gt;[1]&lt;/font&gt; It does not matter whether the initiator
is on a dial up, or the message is huge.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;What happens?&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Service initiator sets up a reliable session, then:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
First message is being sent 
&lt;li&gt;
Since the retry interval is really small &lt;font face="Courier New"&gt;[2]&lt;/font&gt;, the
message will not get to the other end and&amp;nbsp;the acknowledgement will not bounce
back in time 
&lt;li&gt;
First message is retried, now two messages are being transported 
&lt;li&gt;
No acks received yet 
&lt;li&gt;
First message is retried again 
&lt;li&gt;
Network bandwidth is even thinner 
&lt;li&gt;
First message is acknowledged 
&lt;li&gt;
First message retry is discarded on the service side 
&lt;li&gt;
Second message retry is discarded on the service side&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
&lt;font size=1&gt;&lt;font face="Courier New"&gt;[2]&lt;/font&gt; Under 3s.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
The number of retry messages depends on the &lt;em&gt;bandwidth&lt;/em&gt; and &lt;em&gt;message size&lt;/em&gt;.
It can happen that tens of messages will be sent before first acknowledgement will
be received.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Adaptability algorithms&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
A good thing is that there are undocumented algorithms implemented for retry timeout.
The implementation increases the reply timeout &lt;em&gt;exponentially&lt;/em&gt; when the infrastructure
detects that the network conditions demand more time (slow throughput) and allows
reliable delivery (no losses). If loses are present the reply timeout decreases.
&lt;/p&gt;
&lt;p&gt;
Retry timeout is actually calculated&amp;nbsp;when establishing an&amp;nbsp;RM session.&amp;nbsp;It
is based on the roundtrip time and is bigger if the roundtrip time is long.
&lt;/p&gt;
&lt;p&gt;
So, when first messages in a session are exchanged, don't be too surprised to see
a couple of message retries.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.request-response.com/blog/aggbug.ashx?id=a510f1dc-23bb-42aa-b683-a70c4740bfe5" /&gt;</description>
      <comments>http://www.request-response.com/blog/CommentView,guid,a510f1dc-23bb-42aa-b683-a70c4740bfe5.aspx</comments>
      <category>.NET 3.0 - WCF</category>
      <category>.NET 3.5 - WCF</category>
    </item>
    <item>
      <trackback:ping>http://www.request-response.com/blog/Trackback.aspx?guid=fff35773-9d2b-4ffc-9795-4e2b62fc61a4</trackback:ping>
      <pingback:server>http://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.request-response.com/blog/PermaLink,guid,fff35773-9d2b-4ffc-9795-4e2b62fc61a4.aspx</pingback:target>
      <dc:creator>Matevz Gacnik</dc:creator>
      <wfw:comment>http://www.request-response.com/blog/CommentView,guid,fff35773-9d2b-4ffc-9795-4e2b62fc61a4.aspx</wfw:comment>
      <wfw:commentRss>http://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=fff35773-9d2b-4ffc-9795-4e2b62fc61a4</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Wow, <a href="http://www.stephenforte.net/PermaLink,guid,48917fe9-ab8a-4d98-8d49-c70cb53a82ef.aspx">Stephen</a>. 
</p>
        <p>
This is one of the best ideas I've heard of hedging against the dollar in terms if
IT outsourcing cost. And I mean it.
</p>
        <p>
I'm not in a position of valueing the description made, but I am willing to take the
pill, no matter what.
</p>
        <p>
What everybody needs is only to get to one million sterling project,
taking half a year. 
</p>
        <p>
That's it, hedging done or not.
</p>
        <img width="0" height="0" src="http://www.request-response.com/blog/aggbug.ashx?id=fff35773-9d2b-4ffc-9795-4e2b62fc61a4" />
      </body>
      <title>Calculating Outsourcing Project Cost</title>
      <guid isPermaLink="false">http://www.request-response.com/blog/PermaLink,guid,fff35773-9d2b-4ffc-9795-4e2b62fc61a4.aspx</guid>
      <link>http://www.request-response.com/blog/PermaLink,guid,fff35773-9d2b-4ffc-9795-4e2b62fc61a4.aspx</link>
      <pubDate>Mon, 18 Feb 2008 22:01:39 GMT</pubDate>
      <description>&lt;p&gt;
Wow, &lt;a href="http://www.stephenforte.net/PermaLink,guid,48917fe9-ab8a-4d98-8d49-c70cb53a82ef.aspx"&gt;Stephen&lt;/a&gt;. 
&lt;/p&gt;
&lt;p&gt;
This is one of the best ideas I've heard of hedging against the dollar in terms if
IT outsourcing cost. And I mean it.
&lt;/p&gt;
&lt;p&gt;
I'm not in a position of valueing the description made, but I am willing to take the
pill, no matter what.
&lt;/p&gt;
&lt;p&gt;
What everybody needs is only&amp;nbsp;to get to&amp;nbsp;one million&amp;nbsp;sterling project,
taking half a year. 
&lt;/p&gt;
&lt;p&gt;
That's it, hedging done or not.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.request-response.com/blog/aggbug.ashx?id=fff35773-9d2b-4ffc-9795-4e2b62fc61a4" /&gt;</description>
      <comments>http://www.request-response.com/blog/CommentView,guid,fff35773-9d2b-4ffc-9795-4e2b62fc61a4.aspx</comments>
      <category>Personal</category>
    </item>
    <item>
      <trackback:ping>http://www.request-response.com/blog/Trackback.aspx?guid=b8fa5b93-1d54-4cdb-a353-5febb4232890</trackback:ping>
      <pingback:server>http://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.request-response.com/blog/PermaLink,guid,b8fa5b93-1d54-4cdb-a353-5febb4232890.aspx</pingback:target>
      <dc:creator>Matevz Gacnik</dc:creator>
      <wfw:comment>http://www.request-response.com/blog/CommentView,guid,b8fa5b93-1d54-4cdb-a353-5febb4232890.aspx</wfw:comment>
      <wfw:commentRss>http://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=b8fa5b93-1d54-4cdb-a353-5febb4232890</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
This week XML is <a href="http://www.tbray.org/ongoing/When/200x/2008/02/10/XML-People">ten
years old</a>. The core XML 1.0 specification was released in February 1998. 
</p>
        <p>
It's a nice anniversary to have.
</p>
        <p>
The XML + Namespaces specification has a built in namespace declaration of <font face="Courier New">http://www.w3.org/XML/1998/namespace</font>.
That's an implicit namespace declaration, a special one, governing all other. One
namespace declaration to rule them all. Bound to <font face="Courier New"><a href="http://www.w3.org/XML/1998/namespace">xml:</a></font> prefix.
</p>
        <p>
          <img src="http://www.request-response.com/blog/images/originalxmlnamespace.jpg" />
        </p>
        <p>
XML was born and published as a W3C Recommendation on 10<sup>th</sup> of February
1998.
</p>
        <p>
So, well done XML. You did <strong>a lot</strong> for IT industry in the past decade.
</p>
        <img width="0" height="0" src="http://www.request-response.com/blog/aggbug.ashx?id=b8fa5b93-1d54-4cdb-a353-5febb4232890" />
      </body>
      <title>Happy Birthday XML</title>
      <guid isPermaLink="false">http://www.request-response.com/blog/PermaLink,guid,b8fa5b93-1d54-4cdb-a353-5febb4232890.aspx</guid>
      <link>http://www.request-response.com/blog/PermaLink,guid,b8fa5b93-1d54-4cdb-a353-5febb4232890.aspx</link>
      <pubDate>Wed, 13 Feb 2008 19:36:09 GMT</pubDate>
      <description>&lt;p&gt;
This week XML is &lt;a href="http://www.tbray.org/ongoing/When/200x/2008/02/10/XML-People"&gt;ten
years old&lt;/a&gt;. The core XML 1.0 specification was released in February 1998. 
&lt;/p&gt;
&lt;p&gt;
It's a nice anniversary to have.
&lt;/p&gt;
&lt;p&gt;
The XML + Namespaces specification has a built in namespace declaration of &lt;font face="Courier New"&gt;http://www.w3.org/XML/1998/namespace&lt;/font&gt;.
That's an implicit namespace declaration, a special one, governing all other. One
namespace declaration to rule them all. Bound to &lt;font face="Courier New"&gt;&lt;a href="http://www.w3.org/XML/1998/namespace"&gt;xml:&lt;/a&gt;&lt;/font&gt; prefix.
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.request-response.com/blog/images/originalxmlnamespace.jpg"&gt;
&lt;/p&gt;
&lt;p&gt;
XML was born and published as a W3C Recommendation on 10&lt;sup&gt;th&lt;/sup&gt; of February
1998.
&lt;/p&gt;
&lt;p&gt;
So, well done XML. You did &lt;strong&gt;a lot&lt;/strong&gt; for IT industry in the past decade.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.request-response.com/blog/aggbug.ashx?id=b8fa5b93-1d54-4cdb-a353-5febb4232890" /&gt;</description>
      <comments>http://www.request-response.com/blog/CommentView,guid,b8fa5b93-1d54-4cdb-a353-5febb4232890.aspx</comments>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>http://www.request-response.com/blog/Trackback.aspx?guid=3990a494-ac6f-4314-978b-39a459c36759</trackback:ping>
      <pingback:server>http://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.request-response.com/blog/PermaLink,guid,3990a494-ac6f-4314-978b-39a459c36759.aspx</pingback:target>
      <dc:creator>Matevz Gacnik</dc:creator>
      <wfw:comment>http://www.request-response.com/blog/CommentView,guid,3990a494-ac6f-4314-978b-39a459c36759.aspx</wfw:comment>
      <wfw:commentRss>http://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=3990a494-ac6f-4314-978b-39a459c36759</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
If you're into <a href="http://silverlight.net/Default.aspx">Silverlight</a>, and
you should be, check out <a href="http://www.silverlightchallenge.eu">http://www.silverlightchallenge.eu</a>,
and especially sign up on <a href="http://slovenia.silverlightchallenge.eu">http://slovenia.silverlightchallenge.eu</a> and
join one of our many developers who will participate in this competition.
</p>
        <p>
          <img src="http://www.request-response.com/blog/images/silverlightchallenge2008.jpg" />
        </p>
        <p>
More <a href="http://www.slodug.si/blogs/system/archive/2007/12/20/1.-evropski-nate_0D01_aj-Silverlight.aspx">here</a>.
</p>
        <img width="0" height="0" src="http://www.request-response.com/blog/aggbug.ashx?id=3990a494-ac6f-4314-978b-39a459c36759" />
      </body>
      <title>European Silverlight Challenge</title>
      <guid isPermaLink="false">http://www.request-response.com/blog/PermaLink,guid,3990a494-ac6f-4314-978b-39a459c36759.aspx</guid>
      <link>http://www.request-response.com/blog/PermaLink,guid,3990a494-ac6f-4314-978b-39a459c36759.aspx</link>
      <pubDate>Fri, 04 Jan 2008 09:33:22 GMT</pubDate>
      <description>&lt;p&gt;
If you're into &lt;a href="http://silverlight.net/Default.aspx"&gt;Silverlight&lt;/a&gt;, and
you should be, check out &lt;a href="http://www.silverlightchallenge.eu"&gt;http://www.silverlightchallenge.eu&lt;/a&gt;,
and especially sign up on &lt;a href="http://slovenia.silverlightchallenge.eu"&gt;http://slovenia.silverlightchallenge.eu&lt;/a&gt; and
join one of our many developers who will participate in this competition.
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.request-response.com/blog/images/silverlightchallenge2008.jpg"&gt;
&lt;/p&gt;
&lt;p&gt;
More &lt;a href="http://www.slodug.si/blogs/system/archive/2007/12/20/1.-evropski-nate_0D01_aj-Silverlight.aspx"&gt;here&lt;/a&gt;.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.request-response.com/blog/aggbug.ashx?id=3990a494-ac6f-4314-978b-39a459c36759" /&gt;</description>
      <comments>http://www.request-response.com/blog/CommentView,guid,3990a494-ac6f-4314-978b-39a459c36759.aspx</comments>
      <category>Other</category>
      <category>Silverlight</category>
    </item>
    <item>
      <trackback:ping>http://www.request-response.com/blog/Trackback.aspx?guid=3b183ab0-9506-470b-807a-e9f39a40aa12</trackback:ping>
      <pingback:server>http://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.request-response.com/blog/PermaLink,guid,3b183ab0-9506-470b-807a-e9f39a40aa12.aspx</pingback:target>
      <dc:creator>Matevz Gacnik</dc:creator>
      <wfw:comment>http://www.request-response.com/blog/CommentView,guid,3b183ab0-9506-470b-807a-e9f39a40aa12.aspx</wfw:comment>
      <wfw:commentRss>http://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=3b183ab0-9506-470b-807a-e9f39a40aa12</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Mr. <a href="http://www.lessig.org/blog/">Lawrence Lessig</a> is a founder of <a href="http://cyberlaw.stanford.edu/">Stanford
Center for Internet and Society</a>. He's also a chairman for the <a href="http://creativecommons.org/">Creative
Commons</a> organization.
</p>
        <p>
Lessig is one of the most effective speakers in the world, a professor at
Stanford, who tries to make this world a better place from a standpoint of stupidity
in terms of the copyright law.
</p>
        <p>
The following is published on the <a href="http://creativecommons.org/">CC</a>'s site:
</p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
            <em>We use <strong>private rights</strong> to create <strong>public goods</strong>:
creative works set free for certain uses. ... We work to offer creators a best-of-both-worlds
way to protect their works while encouraging certain uses of them — to declare <strong>“some
rights reserved.”</strong></em>
          </p>
        </blockquote>
        <p>
Therefore Creative Commons stands for the mantra of <em>some rights reserved</em> and
not <em>all rights reserved</em> in terms of meaningful usage of digital technology.
</p>
        <p>
Being a <a href="http://en.wikipedia.org/wiki/Libertarianism">libertarian</a> myself,
I cannot oppose these stands. <em>Balance</em> and <em>compromise </em>are good things for
content and intellectual products, such as software.
</p>
        <p>
Watch <a href="http://www.ted.com/index.php/talks/view/id/187">his masterpiece</a>,
delivered at <a href="http://www.ted.com">TED</a>.
</p>
        <img width="0" height="0" src="http://www.request-response.com/blog/aggbug.ashx?id=3b183ab0-9506-470b-807a-e9f39a40aa12" />
      </body>
      <title>Mr. Larry Lessig</title>
      <guid isPermaLink="false">http://www.request-response.com/blog/PermaLink,guid,3b183ab0-9506-470b-807a-e9f39a40aa12.aspx</guid>
      <link>http://www.request-response.com/blog/PermaLink,guid,3b183ab0-9506-470b-807a-e9f39a40aa12.aspx</link>
      <pubDate>Fri, 09 Nov 2007 22:59:24 GMT</pubDate>
      <description>&lt;p&gt;
Mr. &lt;a href="http://www.lessig.org/blog/"&gt;Lawrence Lessig&lt;/a&gt; is a founder of &lt;a href="http://cyberlaw.stanford.edu/"&gt;Stanford
Center for Internet and Society&lt;/a&gt;. He's also a chairman for the &lt;a href="http://creativecommons.org/"&gt;Creative
Commons&lt;/a&gt; organization.
&lt;/p&gt;
&lt;p&gt;
Lessig is one of the&amp;nbsp;most effective&amp;nbsp;speakers in the world, a professor at
Stanford, who tries to make this world a better place from a standpoint of stupidity
in terms of the copyright law.
&lt;/p&gt;
&lt;p&gt;
The following is published on the &lt;a href="http://creativecommons.org/"&gt;CC&lt;/a&gt;'s site:
&lt;/p&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
&lt;em&gt;We use &lt;strong&gt;private rights&lt;/strong&gt; to create &lt;strong&gt;public goods&lt;/strong&gt;:
creative works set free for certain uses. ...&amp;nbsp;We work to offer creators a best-of-both-worlds
way to protect their works while encouraging certain uses of them — to declare &lt;strong&gt;“some
rights reserved.”&lt;/strong&gt; &lt;/em&gt;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
Therefore Creative Commons stands for the mantra of &lt;em&gt;some rights reserved&lt;/em&gt; and
not &lt;em&gt;all rights reserved&lt;/em&gt; in terms of meaningful usage of digital technology.
&lt;/p&gt;
&lt;p&gt;
Being a &lt;a href="http://en.wikipedia.org/wiki/Libertarianism"&gt;libertarian&lt;/a&gt; myself,
I cannot oppose these stands. &lt;em&gt;Balance&lt;/em&gt; and &lt;em&gt;compromise &lt;/em&gt;are good things&amp;nbsp;for
content and intellectual products, such as software.
&lt;/p&gt;
&lt;p&gt;
Watch&amp;nbsp;&lt;a href="http://www.ted.com/index.php/talks/view/id/187"&gt;his masterpiece&lt;/a&gt;,
delivered at &lt;a href="http://www.ted.com"&gt;TED&lt;/a&gt;.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.request-response.com/blog/aggbug.ashx?id=3b183ab0-9506-470b-807a-e9f39a40aa12" /&gt;</description>
      <comments>http://www.request-response.com/blog/CommentView,guid,3b183ab0-9506-470b-807a-e9f39a40aa12.aspx</comments>
      <category>Personal</category>
    </item>
    <item>
      <trackback:ping>http://www.request-response.com/blog/Trackback.aspx?guid=634a58b1-13e5-4b7a-b2ac-010965235bcb</trackback:ping>
      <pingback:server>http://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.request-response.com/blog/PermaLink,guid,634a58b1-13e5-4b7a-b2ac-010965235bcb.aspx</pingback:target>
      <dc:creator>Matevz Gacnik</dc:creator>
      <wfw:comment>http://www.request-response.com/blog/CommentView,guid,634a58b1-13e5-4b7a-b2ac-010965235bcb.aspx</wfw:comment>
      <wfw:commentRss>http://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=634a58b1-13e5-4b7a-b2ac-010965235bcb</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
We talked today, with <a href="http://cs.rthand.com/blogs/blog_with_righthand/">Miha</a>,
a C# <a href="http://en.wikipedia.org/wiki/Yoda">Yoda</a>. Via IM, everything seemed
pointless. Couldn't find a good case for the cause of the following mind experiment:
</p>
        <p>
          <font face="Courier New">using System;<br />
class Tubo<br />
{<br />
  public static void Test() {}<br />
  private void Test() {} <br />
}<br /></font>
          <font size="1">
            <br />
Note: I'm using Miha's syntax in this post.</font>
        </p>
        <p>
We have a <strong>static method</strong> called <font face="Courier New">Test</font> and
an <strong>instance method</strong>, also called <font face="Courier New">Test</font>.
Parameter models of both methods are the same, <em>empty</em>.
</p>
        <p>
Would this compile?
</p>
        <p>
          <em>It does not.</em>
        </p>
        <p>
The question is why and who/what causes this. There is actually <strong>no rationale </strong>behind
not allowing this thing to compile since both, the compiler and the runtime know the
method info upfront.
</p>
        <p>
Since the runtime has all the information it needs, it is strange that this would
not be allowed at compile time. However, a (C#) compiler has to determine whether
you, <strong>the programmer </strong>meant to access a <em>static</em> or an <em>instance</em> method.
</p>
        <p>
          <em>Here lie the dragons.</em>
        </p>
        <p>
It is illegal in most virtual machine based languages to have the same method name
and signature for a static/instance method.
</p>
        <p>
The following is an excerpt from a <a href="http://java.sun.com/docs/books/jls/third_edition/html/classes.html#8.4.2">Java
specification</a>:
</p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
            <em>8.4.2 Method Signature</em>
          </p>
        </blockquote>
        <blockquote>
          <p>
            <em>Two methods have the <strong>same signature</strong> if they have the same name
and argument types.</em>
          </p>
          <p>
            <em>Two method or constructor declarations M and N have the same argument types if
all of the following conditions hold: </em>
          </p>
          <p>
            <em>
            </em>
          </p>
          <ul>
            <a name="299803">
            </a>
            <li>
              <em>They have the same number of formal parameters (possibly zero) </em>
              <a name="299804">
              </a>
            </li>
            <li>
              <em>They have the same number of type parameters (possibly zero) </em>
              <a name="324473">
              </a>
            </li>
            <li>
              <em>Let &lt;A<sub>1</sub>,...,A<sub>n</sub>&gt; be the formal type parameters of M
and let &lt;B<sub>1</sub>,...,B<sub>n</sub>&gt; be the formal type parameters of N.
After renaming each occurrence of a B<sub>i</sub> in N's type to A<sub>i</sub> the
bounds of corresponding type variables and the argument types of M and N are the same. </em>
            </li>
          </ul>
        </blockquote>
        <p>
Java (and also C#) does not allow two methods with the same name and parameter model
no matter what the access modifier is (public, private, internal, protected ...) and
whether the method is static or instance based.
</p>
        <p>
          <em>Why?</em>
        </p>
        <p>
Simple. <strong>Programmer ambiguity.</strong> There is no technical reason not to
allow it.
</p>
        <p>
Consider the following:
</p>
        <p>
          <font face="Courier New">using System;<br />
class Tubo<br />
{ 
<br />
  public static void Test(); 
<br />
  private void Test(); 
<br />
  public void AmbiguousCaller() { Test(); } 
<br />
}</font>
        </p>
        <p>
What would method <font face="Courier New">AmbiguousCaller</font> call? A static <font face="Courier New">Test</font> or
instance <font face="Courier New">Test</font> method? 
</p>
        <p>
          <em>Can't decide? </em>
        </p>
        <p>
That's why this is not allowed. 
</p>
        <p>
And yes, it would call the instance method if this would be allowed, since statics
in C# <em>should</em> be called using a class name, as in <font face="Courier New">Test.Test()</font>.
Note that the preceding example <em>does not compile</em>. Also note, that
it <em>is legal</em> to have a <font face="Courier New">AmbiguousCaller</font> body
as <font face="Courier New">Test()</font> or <font face="Courier New">Tubo.Test()</font>.
</p>
        <p>
There is another ambiguous reason. Local variables in C# <strong>cannot</strong> be
named <em>the same as the enclosing class</em>. Therefore, this is illegal:
</p>
        <p>
          <font face="Courier New">using System;<br />
class Tubo<br />
{<br />
  private int Tubo;<br />
}</font>
        </p>
        <p>
It is. Do a <font face="Courier New">csc /t:library</font> on it.
</p>
        <p>
Since you confirmed this fact, consider the following:
</p>
        <p>
          <font face="Courier New">using System;<br />
public class Tubo<br />
{ 
<br />
  public static void StaticMethod() {} 
<br />
  public void InstanceMethod() {} 
<br />
}</font>
        </p>
        <p>
          <font face="Courier New">public class RunMe<br />
{<br />
  public static void Main()<br />
  { 
<br />
    Tubo Tubo = new Tubo();<br />
    Tubo.InstanceMethod();<br />
    Tubo.StaticMethod();<br />
  }<br />
}</font>
        </p>
        <p>
Focus on the <font face="Courier New">Main</font> method <em>body</em>. In <font face="Courier New">Tubo.InstanceMethod()</font> an
instance method is called and a reference (namely <font face="Courier New">Tubo</font>)
is used. In <font face="Courier New">Tubo.StaticMethod()</font> a static method is
called and <font face="Courier New">Tubo</font> is not an instance reference, but
class name.
</p>
        <p>
It all comes down to <em>programmer ambiguity</em>. Given a chance, I would support
this design decision too.
</p>
        <img width="0" height="0" src="http://www.request-response.com/blog/aggbug.ashx?id=634a58b1-13e5-4b7a-b2ac-010965235bcb" />
      </body>
      <title>On Instance and Static Method Signatures</title>
      <guid isPermaLink="false">http://www.request-response.com/blog/PermaLink,guid,634a58b1-13e5-4b7a-b2ac-010965235bcb.aspx</guid>
      <link>http://www.request-response.com/blog/PermaLink,guid,634a58b1-13e5-4b7a-b2ac-010965235bcb.aspx</link>
      <pubDate>Sat, 03 Nov 2007 21:04:38 GMT</pubDate>
      <description>&lt;p&gt;
We talked today, with &lt;a href="http://cs.rthand.com/blogs/blog_with_righthand/"&gt;Miha&lt;/a&gt;,
a C# &lt;a href="http://en.wikipedia.org/wiki/Yoda"&gt;Yoda&lt;/a&gt;. Via IM, everything seemed
pointless. Couldn't find a good case for the cause of the following mind experiment:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;using System;&lt;br&gt;
class Tubo&lt;br&gt;
{&lt;br&gt;
&amp;nbsp; public static void Test() {}&lt;br&gt;
&amp;nbsp; private void Test() {}&amp;nbsp;&lt;br&gt;
}&lt;br&gt;
&lt;/font&gt;&lt;font size=1&gt;
&lt;br&gt;
Note: I'm using Miha's syntax in this post.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
We have a &lt;strong&gt;static method&lt;/strong&gt; called &lt;font face="Courier New"&gt;Test&lt;/font&gt; and
an &lt;strong&gt;instance method&lt;/strong&gt;, also called &lt;font face="Courier New"&gt;Test&lt;/font&gt;.
Parameter models of both methods&amp;nbsp;are the same, &lt;em&gt;empty&lt;/em&gt;.
&lt;/p&gt;
&lt;p&gt;
Would this compile?
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;It does not.&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
The question is why and who/what causes this. There is actually &lt;strong&gt;no rationale &lt;/strong&gt;behind
not allowing this thing to compile since both, the compiler and the runtime know the
method info upfront.
&lt;/p&gt;
&lt;p&gt;
Since the runtime has all the information it needs, it is strange that this would
not be allowed at compile time. However, a (C#) compiler has to determine whether
you, &lt;strong&gt;the programmer &lt;/strong&gt;meant to access a &lt;em&gt;static&lt;/em&gt; or an&amp;nbsp;&lt;em&gt;instance&lt;/em&gt; method.
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;Here lie the dragons.&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
It is illegal in most virtual machine based languages to have the same method name
and signature for a static/instance method.
&lt;/p&gt;
&lt;p&gt;
The following is an excerpt from a &lt;a href="http://java.sun.com/docs/books/jls/third_edition/html/classes.html#8.4.2"&gt;Java
specification&lt;/a&gt;:
&lt;/p&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
&lt;em&gt;8.4.2 Method Signature&lt;/em&gt;
&lt;/p&gt;
&lt;/blockquote&gt; &lt;blockquote&gt; 
&lt;p&gt;
&lt;em&gt;Two methods have the &lt;strong&gt;same signature&lt;/strong&gt; if they have the same name
and argument types.&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;Two method or constructor declarations M and N have the same argument types if
all of the following conditions hold: &lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;&lt;/em&gt; 
&lt;ul&gt;
&lt;a name=299803&gt;&lt;/a&gt; 
&lt;li&gt;
&lt;em&gt;They have the same number of formal parameters (possibly zero) &lt;/em&gt;&lt;a name=299804&gt;&lt;/a&gt; 
&lt;li&gt;
&lt;em&gt;They have the same number of type parameters (possibly zero) &lt;/em&gt;&lt;a name=324473&gt;&lt;/a&gt; 
&lt;li&gt;
&lt;em&gt;Let &amp;lt;A&lt;sub&gt;1&lt;/sub&gt;,...,A&lt;sub&gt;n&lt;/sub&gt;&amp;gt; be the formal type parameters of M
and let &amp;lt;B&lt;sub&gt;1&lt;/sub&gt;,...,B&lt;sub&gt;n&lt;/sub&gt;&amp;gt; be the formal type parameters of N.
After renaming each occurrence of a B&lt;sub&gt;i&lt;/sub&gt; in N's type to A&lt;sub&gt;i&lt;/sub&gt; the
bounds of corresponding type variables and the argument types of M and N are the same. &lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
Java (and also C#) does not allow two methods with the same name and parameter model
no matter what the access modifier is (public, private, internal, protected ...) and
whether the method is static or instance based.
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;Why?&lt;/em&gt; 
&lt;/p&gt;
&lt;p&gt;
Simple. &lt;strong&gt;Programmer ambiguity.&lt;/strong&gt; There is no technical reason not to
allow it.
&lt;/p&gt;
&lt;p&gt;
Consider the following:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;using System;&lt;br&gt;
class Tubo&lt;br&gt;
{ 
&lt;br&gt;
&amp;nbsp; public static void Test(); 
&lt;br&gt;
&amp;nbsp; private void Test(); 
&lt;br&gt;
&amp;nbsp; public void AmbiguousCaller() { Test(); } 
&lt;br&gt;
}&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
What would method &lt;font face="Courier New"&gt;AmbiguousCaller&lt;/font&gt; call? A static &lt;font face="Courier New"&gt;Test&lt;/font&gt; or
instance &lt;font face="Courier New"&gt;Test&lt;/font&gt; method? 
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;Can't decide? &lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
That's why this is not allowed. 
&lt;/p&gt;
&lt;p&gt;
And yes, it would call the instance method if this would be allowed, since statics
in C# &lt;em&gt;should&lt;/em&gt; be called using a class name, as in &lt;font face="Courier New"&gt;Test.Test()&lt;/font&gt;.
Note that&amp;nbsp;the preceding example&amp;nbsp;&lt;em&gt;does not compile&lt;/em&gt;. Also note, that
it &lt;em&gt;is legal&lt;/em&gt; to&amp;nbsp;have a&amp;nbsp;&lt;font face="Courier New"&gt;AmbiguousCaller&lt;/font&gt;&amp;nbsp;body
as &lt;font face="Courier New"&gt;Test()&lt;/font&gt; or &lt;font face="Courier New"&gt;Tubo.Test()&lt;/font&gt;.
&lt;/p&gt;
&lt;p&gt;
There is another ambiguous reason. Local variables in C# &lt;strong&gt;cannot&lt;/strong&gt; be
named &lt;em&gt;the same as the enclosing class&lt;/em&gt;. Therefore, this is illegal:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;using System;&lt;br&gt;
class Tubo&lt;br&gt;
{&lt;br&gt;
&amp;nbsp; private int Tubo;&lt;br&gt;
}&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
It is. Do a &lt;font face="Courier New"&gt;csc /t:library&lt;/font&gt; on it.
&lt;/p&gt;
&lt;p&gt;
Since you confirmed this fact,&amp;nbsp;consider the following:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;using System;&lt;br&gt;
public class Tubo&lt;br&gt;
{ 
&lt;br&gt;
&amp;nbsp; public static void StaticMethod() {} 
&lt;br&gt;
&amp;nbsp; public void InstanceMethod() {} 
&lt;br&gt;
}&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;public class RunMe&lt;br&gt;
{&lt;br&gt;
&amp;nbsp; public static void Main()&lt;br&gt;
&amp;nbsp; { 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Tubo Tubo = new Tubo();&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Tubo.InstanceMethod();&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Tubo.StaticMethod();&lt;br&gt;
&amp;nbsp; }&lt;br&gt;
}&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
Focus on the &lt;font face="Courier New"&gt;Main&lt;/font&gt; method &lt;em&gt;body&lt;/em&gt;. In &lt;font face="Courier New"&gt;Tubo.InstanceMethod()&lt;/font&gt; an
instance method is called and a reference&amp;nbsp;(namely &lt;font face="Courier New"&gt;Tubo&lt;/font&gt;)
is used. In &lt;font face="Courier New"&gt;Tubo.StaticMethod()&lt;/font&gt; a static method is
called and &lt;font face="Courier New"&gt;Tubo&lt;/font&gt; is not an instance reference, but
class name.
&lt;/p&gt;
&lt;p&gt;
It all comes down to &lt;em&gt;programmer ambiguity&lt;/em&gt;. Given a chance, I would support
this design decision too.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.request-response.com/blog/aggbug.ashx?id=634a58b1-13e5-4b7a-b2ac-010965235bcb" /&gt;</description>
      <comments>http://www.request-response.com/blog/CommentView,guid,634a58b1-13e5-4b7a-b2ac-010965235bcb.aspx</comments>
      <category>CLR</category>
    </item>
    <item>
      <trackback:ping>http://www.request-response.com/blog/Trackback.aspx?guid=ff5fab81-affb-4b2b-aa67-c80bdfc86cbd</trackback:ping>
      <pingback:server>http://www.request-response.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.request-response.com/blog/PermaLink,guid,ff5fab81-affb-4b2b-aa67-c80bdfc86cbd.aspx</pingback:target>
      <dc:creator>Matevz Gacnik</dc:creator>
      <wfw:comment>http://www.request-response.com/blog/CommentView,guid,ff5fab81-affb-4b2b-aa67-c80bdfc86cbd.aspx</wfw:comment>
      <wfw:commentRss>http://www.request-response.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=ff5fab81-affb-4b2b-aa67-c80bdfc86cbd</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
In WCF, collection data that is passed through the service boundary goes through a <em>type
filter </em>- meaning you will not necessarily get the <em>intrinsic service side
type</em> on the client, even if you're <strong>expecting it</strong>.
</p>
        <p>
No matter if you throw back an <font face="Courier New">int[]</font> or <font face="Courier New">List&lt;int&gt;,</font> you
will get the <font face="Courier New">int[]</font> by default on the client.
</p>
        <p>
The main reason is that there is no representation for <font face="Courier New">System.Collections.Generic.List</font> or <font face="Courier New">System.Collection.Generic.LinkedList</font> in
service metadata. The concept of <font face="Courier New">System.Collection.Generic.List&lt;int&gt;</font> for
example, actually does not have a different semantic meaning from an <em>integer array</em> -
it's still a list of <em>ints</em> - but will allow you to program against it with
ease.
</p>
        <p>
Though, if one asks nicely, <strong>it is possible</strong> to guarantee the preferred
coll