﻿<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>ICT</title>
    <description>Information communication technologies: chatting around computer world&lt;br&gt;
[Informatica e telecomunicazioni: post sul mondo dei computer]</description>
    <link>http://www.netdruids.com/Blog/tabid/54/BlogId/6/Default.aspx</link>
    <language>en-US</language>
    <webMaster>postmaster@netdruids.com</webMaster>
    <pubDate>Sun, 05 Feb 2012 16:30:10 GMT</pubDate>
    <lastBuildDate>Sun, 05 Feb 2012 16:30:10 GMT</lastBuildDate>
    <docs>http://backend.userland.com/rss</docs>
    <generator>Blog RSS Generator Version 3.5.1.19887</generator>
    <item>
      <title>I bug dei big</title>
      <description>&lt;img src="/Portals/0/Blog/Files/6/32/bug.jpg" alt="" align="left" vspace="10" width="150" height="150" hspace="10"&gt;Con l'ultimo aggiornamento della sicurezza di Windows XP (quello del 12 
aprile 2011) è inclusa una simpatica sorpresa... e visto che siamo in 
tempo di Pasqua effettivamente, non guasta.&lt;br&gt;&lt;br&gt;&lt;a href=http://www.netdruids.com/Blog/tabid/54/EntryId/32/I-bug-dei-big.aspx&gt;More...&lt;/a&gt;</description>
      <link>http://www.netdruids.com/Blog/tabid/54/EntryId/32/I-bug-dei-big.aspx</link>
      <comments>http://www.netdruids.com/Blog/tabid/54/EntryId/32/I-bug-dei-big.aspx#Comments</comments>
      <guid isPermaLink="true">http://www.netdruids.com/Blog/tabid/54/EntryId/32/I-bug-dei-big.aspx</guid>
      <pubDate>Sun, 24 Apr 2011 23:00:00 GMT</pubDate>
      <slash:comments>1</slash:comments>
      <trackback:ping>http://www.netdruids.com/DesktopModules/Blog/Trackback.aspx?id=32</trackback:ping>
    </item>
    <item>
      <title>...fondata sul lavoro.</title>
      <description>&lt;img src="/Portals/0/Blog/Files/1/22/lavoro01.jpg" alt="" width="345" height="270"&gt;&lt;br&gt;&lt;br&gt;
Questi sono gli annunci di lavoro che si trovano a Cosenza.
Ti spari prima una bella laurea di 5 anni, poi trovi un lavoro (anche a gratis) che ti permetta di imparare tutto quello che l'università non ti ha dato ma il mercato richiede: PHP, ASP, .NET, MySQL, SQL Server e,  perchè no, anche Ajax.&lt;br&gt;&lt;br&gt;
Poi... un bel giorno (dopo 3/5 anni) leggi questo annuncio e decidi di fare il salto di qualità... una botta di vita... ragazzi si passa a 450 euro al mese (NETTI!!! Questa è una svolta!!).&lt;br&gt;
&lt;br&gt;
Io purtroppo non conosco PHP... peccato... se vi interessa vi passo il link, và.</description>
      <link>http://www.netdruids.com/Blog/tabid/54/EntryId/22/-fondata-sul-lavoro.aspx</link>
      <comments>http://www.netdruids.com/Blog/tabid/54/EntryId/22/-fondata-sul-lavoro.aspx#Comments</comments>
      <guid isPermaLink="true">http://www.netdruids.com/Blog/tabid/54/EntryId/22/-fondata-sul-lavoro.aspx</guid>
      <pubDate>Thu, 25 Sep 2008 08:38:58 GMT</pubDate>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.netdruids.com/DesktopModules/Blog/Trackback.aspx?id=22</trackback:ping>
    </item>
    <item>
      <title>RevokeCertificate, two's complement and unchecked</title>
      <description>Those of you working with Microsoft &lt;A href="http://en.wikipedia.org/wiki/Certification_Authority" target=_blank&gt;Certification Authority&lt;/A&gt; in a .NET environment probably noticed that during the use of a specific Win32 dll in .NET an anomalous situation arises.&lt;BR&gt;&lt;BR&gt;&lt;B&gt;Prologue&lt;/B&gt;&lt;BR&gt;&lt;BR&gt;&lt;B&gt;CertAdm.dll&lt;/B&gt; library expose, among other ca administrative methods, the RevokeCertificate method of the &lt;A href="http://msdn2.microsoft.com/en-us/library/aa383234.aspx" target=_blank&gt;ICertAdmin2 interface&lt;/A&gt;. Those method, as explained in &lt;A href="http://msdn2.microsoft.com/en-us/library/aa383251.aspx" target=_blank&gt;documentation&lt;/A&gt;, accept the &lt;B&gt;LONG Reason&lt;/B&gt; input parameter (We could argue why a LONG, given that allowed values are 0..6).&lt;BR&gt;However, from the documentation we can read that in case of certificates revoked with CRL_REASON_CERTIFICATE_HOLD reason (Reason=6) it is possible to invoke again RevokeCertificate method to do a certificate resume using MAXDWORD (0xffffffff as defined in Winnt.h) as Reason value. After it is reinstated, the certificate will not appear in future &lt;A href="http://en.wikipedia.org/wiki/Certificate_revocation_list" target=_blank&gt;CRLs&lt;/A&gt;.&lt;BR&gt;&lt;BR&gt;&lt;B&gt;The anomaly&lt;/B&gt;&lt;BR&gt;&lt;BR&gt;When importing CertAdm.dll in your .NET project, Visual Studio provide to create the wrapper Interop.CERTADMINLib.dll. With this wrapper you can create a CCertAdmin object that expose:&lt;BR&gt;&lt;BR&gt;&lt;FONT face="Courier New"&gt;objAdmin.RevokeCertificate(string Config, string SN, int Reason, DateTime Date); &lt;/FONT&gt;&lt;BR&gt;&lt;BR&gt;Note that Reason is now an int, no more a LONG.&lt;BR&gt;&lt;BR&gt;&lt;FONT face="Courier New"&gt;int Reason = 0xffffffff; &lt;/FONT&gt;&lt;BR&gt;&lt;BR&gt;rises the following error:&lt;BR&gt;&lt;BR&gt;&lt;FONT face="Courier New"&gt;Cannot implicitly convert type 'uint' to 'int' &lt;/FONT&gt;&lt;BR&gt;&lt;BR&gt;So, how to assign a uint value to an int? &lt;BR&gt;&lt;BR&gt;&lt;B&gt;The solution ?&lt;/B&gt;&lt;BR&gt;&lt;BR&gt;Another try could be this one:&lt;BR&gt;&lt;BR&gt;&lt;FONT face="Courier New"&gt;int Reason = (int)0xffffffff;&lt;/FONT&gt;&lt;BR&gt;&lt;BR&gt;but it rises the following error:&lt;BR&gt;&lt;BR&gt;&lt;FONT face="Courier New"&gt;Constant value '4294967295' cannot be converted to a 'int' (use 'unchecked' syntax to override)&lt;/FONT&gt;&lt;BR&gt;&lt;BR&gt;In fact, giving a look at some &lt;A href="http://www.codeproject.com/csharp/overflow_checking.asp" target=_blank&gt;articles&lt;/A&gt; around the internet, comes out that one method to do the trick could be the use of &lt;A href="http://msdn2.microsoft.com/en-us/library/a569z7k8(vs.71).aspx" target=_blank&gt;unchecked keyword&lt;/A&gt;:&lt;BR&gt;&lt;BR&gt;&lt;I&gt;"Conversions between numeric types, where the value to be converted overflows the destination type, can also be checked/unchecked."&lt;/I&gt;&lt;BR&gt;&lt;BR&gt;So this seems to be the solution:&lt;BR&gt;&lt;BR&gt;&lt;FONT face="Courier New"&gt;int Reason = unchecked((int)0xffffffff); &lt;/FONT&gt;&lt;BR&gt;&lt;BR&gt;&lt;B&gt;Egg of Columbus&lt;/B&gt;&lt;BR&gt;&lt;BR&gt;The problem is indeed simpler than how it seems.&lt;BR&gt;In fact, it's enough to remember that int type is a representation of signed integers in &lt;A href="http://en.wikipedia.org/wiki/Two's_complement" target=_blank&gt;two's complement&lt;/A&gt;. And which is the representation of 0xffffffff in two's complement?&lt;BR&gt;&lt;BR&gt;&lt;PRE&gt; ffffffff (exadecimal)
 00000000 (One's complement)
+       1
----------
 00000001 (Two's complement)
 ^
 sign -
&lt;/PRE&gt;0xffffffff equivals to -1 in decimal when we are representing a 4 byte signed integer value.&lt;BR&gt;So, the smartest solutions is:&lt;BR&gt;&lt;BR&gt;&lt;FONT face="Courier New"&gt;int Reason = -1; &lt;/FONT&gt;</description>
      <link>http://www.netdruids.com/Blog/tabid/54/EntryId/7/RevokeCertificate-twos-complement-and-unchecked.aspx</link>
      <comments>http://www.netdruids.com/Blog/tabid/54/EntryId/7/RevokeCertificate-twos-complement-and-unchecked.aspx#Comments</comments>
      <guid isPermaLink="true">http://www.netdruids.com/Blog/tabid/54/EntryId/7/RevokeCertificate-twos-complement-and-unchecked.aspx</guid>
      <pubDate>Thu, 18 Oct 2007 13:56:30 GMT</pubDate>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.netdruids.com/DesktopModules/Blog/Trackback.aspx?id=7</trackback:ping>
    </item>
    <item>
      <title>Error BC30560</title>
      <description>Few days ago, early in the morning, connecting to my DotNetNuke site I found it completely crashed!&lt;BR&gt;Apparently without a valid reason, given that I left it in good health the night before... everything was ok and I didn't make any config changes.&lt;BR&gt;Giving a look at the log, the main exception (at which many other followed) seemed to be this:&lt;BR&gt;&lt;BR&gt;&lt;I&gt;&lt;B&gt;"System.Web.HttpCompileException: \Portals\_default\Skins\Tranquility\Basic.ascx(32): error BC30560: 'admin_skins_solpartmenu_ascx' is ambiguous in the namespace 'ASP'."&lt;/B&gt;&lt;/I&gt;&lt;BR&gt;&lt;BR&gt;After 5 minutes of panic, I started to look for a known solution on the internet and on dotnetnuke.com forums.&lt;BR&gt;I didn't find many solutions... and the few ones I found didn't match my case.&lt;BR&gt;&lt;BR&gt;&lt;A href="http://www.dotnetnuke.com/Community/Forums/tabid/795/forumid/107/threadid/146923/scope/posts/Default.aspx" target=_blank&gt;For someone the exception arises due to the existence of an "admin" virtual path &lt;/A&gt;&lt;BR&gt;&lt;BR&gt;&lt;A href="http://lists.evolt.org/archive/Week-of-Mon-20050214/169508.html" target=_blank&gt;Others state that is a naming conflict and a renaming is enough to fix the bug &lt;/A&gt;&lt;BR&gt;&lt;BR&gt;&lt;A href="http://www.aspdeveloper.net/tiki-view_blog_post.php?find=&amp;blogId=4&amp;offset=0&amp;sort_mode=created_desc&amp;postId=13&amp;show_comments=1" target=_blank&gt;In some other cases seems to be a lower-upper case problem &lt;/A&gt;&lt;BR&gt;&lt;BR&gt;However, in all situations above everything started after a modify, an external input... thing not true in my case. My provider too assured me that no modifies or patching activities was done during that night.&lt;BR&gt;&lt;BR&gt;At the end I solved this way: 
&lt;UL&gt;
&lt;LI&gt;set to true the debug mode in web.config: &lt;COMPILATION debug="true" strict="false"&gt;
&lt;LI&gt;restart the application connecting to the home page 
&lt;LI&gt;re-set to false the debug mode in web.config: &lt;COMPILATION debug="false" strict="false"&gt;&lt;/LI&gt;&lt;/UL&gt;The mistery about the exception remains... if someone know a clear explanation, please, post it on the blog.. just to avoid the "An error occurred" panic! ;-)</description>
      <link>http://www.netdruids.com/Blog/tabid/54/EntryId/4/Error-BC30560.aspx</link>
      <comments>http://www.netdruids.com/Blog/tabid/54/EntryId/4/Error-BC30560.aspx#Comments</comments>
      <guid isPermaLink="true">http://www.netdruids.com/Blog/tabid/54/EntryId/4/Error-BC30560.aspx</guid>
      <pubDate>Mon, 16 Jul 2007 10:12:14 GMT</pubDate>
      <slash:comments>12</slash:comments>
      <trackback:ping>http://www.netdruids.com/DesktopModules/Blog/Trackback.aspx?id=4</trackback:ping>
    </item>
  </channel>
</rss>
