<?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:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Patrice Lamarche - Astuces</title>
    <link>http://patricelamarche.net/</link>
    <description>Ce blog est moche. Je ne suis pas designer.</description>
    <language>fr-fr</language>
    <copyright>Patrice Lamarche</copyright>
    <lastBuildDate>Sat, 24 Apr 2010 09:04:34 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.3.9074.18820</generator>
    <managingEditor>patrice.lamarche@gmail.com</managingEditor>
    <webMaster>patrice.lamarche@gmail.com</webMaster>
    <item>
      <trackback:ping>http://patricelamarche.net/Trackback.aspx?guid=bafa3b4e-79dd-4f84-84aa-00dbee576f1a</trackback:ping>
      <pingback:server>http://patricelamarche.net/pingback.aspx</pingback:server>
      <pingback:target>http://patricelamarche.net/PermaLink,guid,bafa3b4e-79dd-4f84-84aa-00dbee576f1a.aspx</pingback:target>
      <dc:creator>Patrice Lamarche</dc:creator>
      <wfw:comment>http://patricelamarche.net/CommentView,guid,bafa3b4e-79dd-4f84-84aa-00dbee576f1a.aspx</wfw:comment>
      <wfw:commentRss>http://patricelamarche.net/SyndicationService.asmx/GetEntryCommentsRss?guid=bafa3b4e-79dd-4f84-84aa-00dbee576f1a</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p align="justify">
          <img style="display: inline; margin-left: 0px; margin-right: 0px" align="left" src="http://www.netfirms.com/blog/wp-content/uploads/2009/11/wordpress.png" width="240" height="214" />En
me rendant sur la page d’accueil de la plate-forme Wordpress, je suis tombé sur le
dernier post de blog de l’équipe de développement de ce logiciel. Ce post intitulé
“<a href="http://wordpress.org/development/2010/04/file-permissions/">Secure File
Permissions Matter</a>” indique de manière censée qu’il est toujours nécessaire de
configurer les permissions d’accès à vos fichiers afin d’éviter tout problème de sécurit”,
notamment liés à votre hébergeur.
</p>
        <p align="justify">
Ce qui est plus que surprenant, c’est de voir <a href="http://ma.tt">Matt Mullenweg</a> créateur
de Wordpress et <a href="http://awurl.com/LVvZmIFuK">une des personnes les plus influentes
du web</a> commencer son post par une banalité (qu’il est néanmoins toujours utile
de rappeler) pour continuer en s’improvisant expert en sécurité en affirmant que, <em><strong>comme
toutes les autres applications,</strong></em> Wordpress <em><strong>doit</strong></em> stocker
les informations de connexions à la base données en clear text et qu’il est inutile
de vouloir crypter ces informations puisque les clés de cryptage seraient facilement
accessibles puisque stockés sur le système de fichiers… 
<br /><em>Voir </em><a href="http://awurl.com/rROy45oeC"><em>http://awurl.com/rROy45oeC</em></a><em> pour
la citation exacte.</em></p>
        <p align="justify">
Je sais bien que Wordpress est développé en PHP mais bon, ASP.net permet de crypter
des sections de configurations depuis ASP.net 2.0 c’est à dire depuis près de 5 ans,
de plus pour éviter les problèmes d’accès aux clés de cryptage, <a href="http://msdn.microsoft.com/en-us/library/ms998280.aspx">il
est possible d’utiliser DPAPI</a> qui résous complètement ce problème potentiel. 
<br />
Donc bon, peut être que crypter ses chaines de connexions n’est pas aussi inutile
que ça et qu’il est techniquement possible de le mettre en place efficacement…
</p>
        <img width="0" height="0" src="http://patricelamarche.net/aggbug.ashx?id=bafa3b4e-79dd-4f84-84aa-00dbee576f1a" />
      </body>
      <title>Crypter les chaines de connexions est inutile</title>
      <guid isPermaLink="false">http://patricelamarche.net/PermaLink,guid,bafa3b4e-79dd-4f84-84aa-00dbee576f1a.aspx</guid>
      <link>http://patricelamarche.net/2010/04/24/CrypterLesChainesDeConnexionsEstInutile.aspx</link>
      <pubDate>Sat, 24 Apr 2010 09:04:34 GMT</pubDate>
      <description>&lt;p align="justify"&gt;
&lt;img style="display: inline; margin-left: 0px; margin-right: 0px" align="left" src="http://www.netfirms.com/blog/wp-content/uploads/2009/11/wordpress.png" width="240" height="214" /&gt;En
me rendant sur la page d’accueil de la plate-forme Wordpress, je suis tombé sur le
dernier post de blog de l’équipe de développement de ce logiciel. Ce post intitulé
“&lt;a href="http://wordpress.org/development/2010/04/file-permissions/"&gt;Secure File
Permissions Matter&lt;/a&gt;” indique de manière censée qu’il est toujours nécessaire de
configurer les permissions d’accès à vos fichiers afin d’éviter tout problème de sécurit”,
notamment liés à votre hébergeur.
&lt;/p&gt;
&lt;p align="justify"&gt;
Ce qui est plus que surprenant, c’est de voir &lt;a href="http://ma.tt"&gt;Matt Mullenweg&lt;/a&gt; créateur
de Wordpress et &lt;a href="http://awurl.com/LVvZmIFuK"&gt;une des personnes les plus influentes
du web&lt;/a&gt; commencer son post par une banalité (qu’il est néanmoins toujours utile
de rappeler) pour continuer en s’improvisant expert en sécurité en affirmant que, &lt;em&gt;&lt;strong&gt;comme
toutes les autres applications,&lt;/strong&gt;&lt;/em&gt; Wordpress &lt;em&gt;&lt;strong&gt;doit&lt;/strong&gt;&lt;/em&gt; stocker
les informations de connexions à la base données en clear text et qu’il est inutile
de vouloir crypter ces informations puisque les clés de cryptage seraient facilement
accessibles puisque stockés sur le système de fichiers… 
&lt;br /&gt;
&lt;em&gt;Voir &lt;/em&gt;&lt;a href="http://awurl.com/rROy45oeC"&gt;&lt;em&gt;http://awurl.com/rROy45oeC&lt;/em&gt;&lt;/a&gt;&lt;em&gt; pour
la citation exacte.&lt;/em&gt;
&lt;/p&gt;
&lt;p align="justify"&gt;
Je sais bien que Wordpress est développé en PHP mais bon, ASP.net permet de crypter
des sections de configurations depuis ASP.net 2.0 c’est à dire depuis près de 5 ans,
de plus pour éviter les problèmes d’accès aux clés de cryptage, &lt;a href="http://msdn.microsoft.com/en-us/library/ms998280.aspx"&gt;il
est possible d’utiliser DPAPI&lt;/a&gt; qui résous complètement ce problème potentiel. 
&lt;br /&gt;
Donc bon, peut être que crypter ses chaines de connexions n’est pas aussi inutile
que ça et qu’il est techniquement possible de le mettre en place efficacement…
&lt;/p&gt;
&lt;img width="0" height="0" src="http://patricelamarche.net/aggbug.ashx?id=bafa3b4e-79dd-4f84-84aa-00dbee576f1a" /&gt;</description>
      <comments>http://patricelamarche.net/CommentView,guid,bafa3b4e-79dd-4f84-84aa-00dbee576f1a.aspx</comments>
      <category>Astuces</category>
      <category>Framework/ASP.net</category>
    </item>
    <item>
      <trackback:ping>http://patricelamarche.net/Trackback.aspx?guid=7406b8d3-fdfc-4ecc-bcff-47324d60e323</trackback:ping>
      <pingback:server>http://patricelamarche.net/pingback.aspx</pingback:server>
      <pingback:target>http://patricelamarche.net/PermaLink,guid,7406b8d3-fdfc-4ecc-bcff-47324d60e323.aspx</pingback:target>
      <dc:creator>Patrice Lamarche</dc:creator>
      <wfw:comment>http://patricelamarche.net/CommentView,guid,7406b8d3-fdfc-4ecc-bcff-47324d60e323.aspx</wfw:comment>
      <wfw:commentRss>http://patricelamarche.net/SyndicationService.asmx/GetEntryCommentsRss?guid=7406b8d3-fdfc-4ecc-bcff-47324d60e323</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p align="justify">
Le site MSDN de Microsoft indispensable à tous les développeurs est par défaut avec
une mise en page qui donne beaucoup trop d’importance à des éléments annexes aux articles
proposés (arborescence de navigation très large, bandeau rouge trop important, etc.)
Du coup la zone de lecture s’en trouve très diminuée :
</p>
        <p>
          <a href="http://patricelamarche.net/content/binary/WindowsLiveWriter/FaireensortequelesiteMSDNressemblequelqu_DAA2/image_2.png">
            <img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="image" border="0" alt="image" src="http://patricelamarche.net/content/binary/WindowsLiveWriter/FaireensortequelesiteMSDNressemblequelqu_DAA2/image_thumb.png" width="644" height="404" />
          </a>
        </p>
        <p align="justify">
Sachez qu’il est possible d’avoir une mise en page beaucoup plus lisible et “propre”
en sélectionnant l’option “Switch on low bandwith view” présente en haut de chaque
page. On se retrouve avec cette mise en page qui est beaucoup plus agréable à la lecture
:
</p>
        <p>
          <a href="http://patricelamarche.net/content/binary/WindowsLiveWriter/FaireensortequelesiteMSDNressemblequelqu_DAA2/image_4.png">
            <img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="image" border="0" alt="image" src="http://patricelamarche.net/content/binary/WindowsLiveWriter/FaireensortequelesiteMSDNressemblequelqu_DAA2/image_thumb_1.png" width="644" height="404" />
          </a>
        </p>
        <img width="0" height="0" src="http://patricelamarche.net/aggbug.ashx?id=7406b8d3-fdfc-4ecc-bcff-47324d60e323" />
      </body>
      <title>Faire en sorte que le site MSDN ressemble à quelque chose</title>
      <guid isPermaLink="false">http://patricelamarche.net/PermaLink,guid,7406b8d3-fdfc-4ecc-bcff-47324d60e323.aspx</guid>
      <link>http://patricelamarche.net/2009/08/05/FaireEnSorteQueLeSiteMSDNRessemble%c3%80QuelqueChose.aspx</link>
      <pubDate>Wed, 05 Aug 2009 13:33:03 GMT</pubDate>
      <description>&lt;p align="justify"&gt;
Le site MSDN de Microsoft indispensable à tous les développeurs est par défaut avec
une mise en page qui donne beaucoup trop d’importance à des éléments annexes aux articles
proposés (arborescence de navigation très large, bandeau rouge trop important, etc.)
Du coup la zone de lecture s’en trouve très diminuée :
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://patricelamarche.net/content/binary/WindowsLiveWriter/FaireensortequelesiteMSDNressemblequelqu_DAA2/image_2.png"&gt;&lt;img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="image" border="0" alt="image" src="http://patricelamarche.net/content/binary/WindowsLiveWriter/FaireensortequelesiteMSDNressemblequelqu_DAA2/image_thumb.png" width="644" height="404" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p align="justify"&gt;
Sachez qu’il est possible d’avoir une mise en page beaucoup plus lisible et “propre”
en sélectionnant l’option “Switch on low bandwith view” présente en haut de chaque
page. On se retrouve avec cette mise en page qui est beaucoup plus agréable à la lecture
:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://patricelamarche.net/content/binary/WindowsLiveWriter/FaireensortequelesiteMSDNressemblequelqu_DAA2/image_4.png"&gt;&lt;img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="image" border="0" alt="image" src="http://patricelamarche.net/content/binary/WindowsLiveWriter/FaireensortequelesiteMSDNressemblequelqu_DAA2/image_thumb_1.png" width="644" height="404" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://patricelamarche.net/aggbug.ashx?id=7406b8d3-fdfc-4ecc-bcff-47324d60e323" /&gt;</description>
      <comments>http://patricelamarche.net/CommentView,guid,7406b8d3-fdfc-4ecc-bcff-47324d60e323.aspx</comments>
      <category>Astuces</category>
    </item>
    <item>
      <trackback:ping>http://patricelamarche.net/Trackback.aspx?guid=e4a533ea-f2a0-4b7d-bc2e-48bca2a66d8b</trackback:ping>
      <pingback:server>http://patricelamarche.net/pingback.aspx</pingback:server>
      <pingback:target>http://patricelamarche.net/PermaLink,guid,e4a533ea-f2a0-4b7d-bc2e-48bca2a66d8b.aspx</pingback:target>
      <dc:creator>Patrice Lamarche</dc:creator>
      <wfw:comment>http://patricelamarche.net/CommentView,guid,e4a533ea-f2a0-4b7d-bc2e-48bca2a66d8b.aspx</wfw:comment>
      <wfw:commentRss>http://patricelamarche.net/SyndicationService.asmx/GetEntryCommentsRss?guid=e4a533ea-f2a0-4b7d-bc2e-48bca2a66d8b</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p align="justify">
Si vous souhaitez modifier le moteur de blog DasBlog sous Visual Studio 2010 vous
risquez de rencontrer différents problèmes.
</p>
        <p align="justify">
Lors de l’ouverture de la solution 2008, la conversion automatique ne fait pas le
travail tout à fait correctement puisque l’on se retrouve avec le message d’erreur
suivant :  
<br />
C:\Projects\DasBlog\source\newtelligence.DasBlog.Web\newtelligence.DasBlog.Web.csproj(1529,123):
The expression "$("".VSVersion)" cannot be evaluated. Method 'System.String.VSVersion'
not found. 
<br /></p>
        <p>
          <a href="http://patricelamarche.net/content/binary/WindowsLiveWriter/EditerDasBlogsousVisualStudio2010_1413A/image_2.png">
            <img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="image" border="0" alt="image" src="http://patricelamarche.net/content/binary/WindowsLiveWriter/EditerDasBlogsousVisualStudio2010_1413A/image_thumb.png" width="501" height="203" />
          </a>
        </p>
        <p>
Afin de résoudre le problème éditez le fichier csproj et identifiez les lignes suivantes
:
</p>
        <p>
          <a href="http://patricelamarche.net/content/binary/WindowsLiveWriter/EditerDasBlogsousVisualStudio2010_1413A/image_6.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://patricelamarche.net/content/binary/WindowsLiveWriter/EditerDasBlogsousVisualStudio2010_1413A/image_thumb_2.png" width="874" height="71" />
          </a>
        </p>
        <p>
Supprimez-les et remplacez-les  par l’import suivant : 
<br />
&lt;Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets"
/&gt;
</p>
        <p>
Tout devrait alors rentrer dans l’ordre, vous devriez être capable d’éxécuter et modifier
DasBlog afin de l’adapter à vos besoins :
</p>
        <p>
          <a href="http://patricelamarche.net/content/binary/WindowsLiveWriter/EditerDasBlogsousVisualStudio2010_1413A/image_4.png">
            <img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="image" border="0" alt="image" src="http://patricelamarche.net/content/binary/WindowsLiveWriter/EditerDasBlogsousVisualStudio2010_1413A/image_thumb_1.png" width="644" height="418" />
          </a>
        </p>
        <img width="0" height="0" src="http://patricelamarche.net/aggbug.ashx?id=e4a533ea-f2a0-4b7d-bc2e-48bca2a66d8b" />
      </body>
      <title>Editer DasBlog sous Visual Studio 2010</title>
      <guid isPermaLink="false">http://patricelamarche.net/PermaLink,guid,e4a533ea-f2a0-4b7d-bc2e-48bca2a66d8b.aspx</guid>
      <link>http://patricelamarche.net/2009/07/29/EditerDasBlogSousVisualStudio2010.aspx</link>
      <pubDate>Wed, 29 Jul 2009 21:10:45 GMT</pubDate>
      <description>&lt;p align="justify"&gt;
Si vous souhaitez modifier le moteur de blog DasBlog sous Visual Studio 2010 vous
risquez de rencontrer différents problèmes.
&lt;/p&gt;
&lt;p align="justify"&gt;
Lors de l’ouverture de la solution 2008, la conversion automatique ne fait pas le
travail tout à fait correctement puisque l’on se retrouve avec le message d’erreur
suivant :&amp;#160; 
&lt;br /&gt;
C:\Projects\DasBlog\source\newtelligence.DasBlog.Web\newtelligence.DasBlog.Web.csproj(1529,123):
The expression &amp;quot;$(&amp;quot;&amp;quot;.VSVersion)&amp;quot; cannot be evaluated. Method 'System.String.VSVersion'
not found. 
&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://patricelamarche.net/content/binary/WindowsLiveWriter/EditerDasBlogsousVisualStudio2010_1413A/image_2.png"&gt;&lt;img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="image" border="0" alt="image" src="http://patricelamarche.net/content/binary/WindowsLiveWriter/EditerDasBlogsousVisualStudio2010_1413A/image_thumb.png" width="501" height="203" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Afin de résoudre le problème éditez le fichier csproj et identifiez les lignes suivantes
:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://patricelamarche.net/content/binary/WindowsLiveWriter/EditerDasBlogsousVisualStudio2010_1413A/image_6.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://patricelamarche.net/content/binary/WindowsLiveWriter/EditerDasBlogsousVisualStudio2010_1413A/image_thumb_2.png" width="874" height="71" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Supprimez-les et remplacez-les&amp;#160; par l’import suivant : 
&lt;br /&gt;
&amp;lt;Import Project=&amp;quot;$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets&amp;quot;
/&amp;gt;
&lt;/p&gt;
&lt;p&gt;
Tout devrait alors rentrer dans l’ordre, vous devriez être capable d’éxécuter et modifier
DasBlog afin de l’adapter à vos besoins :
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://patricelamarche.net/content/binary/WindowsLiveWriter/EditerDasBlogsousVisualStudio2010_1413A/image_4.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="image" border="0" alt="image" src="http://patricelamarche.net/content/binary/WindowsLiveWriter/EditerDasBlogsousVisualStudio2010_1413A/image_thumb_1.png" width="644" height="418" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://patricelamarche.net/aggbug.ashx?id=e4a533ea-f2a0-4b7d-bc2e-48bca2a66d8b" /&gt;</description>
      <comments>http://patricelamarche.net/CommentView,guid,e4a533ea-f2a0-4b7d-bc2e-48bca2a66d8b.aspx</comments>
      <category>Astuces</category>
      <category>Blog</category>
    </item>
    <item>
      <trackback:ping>http://patricelamarche.net/Trackback.aspx?guid=2d43b63e-de17-40c8-8b11-47ccb6870664</trackback:ping>
      <pingback:server>http://patricelamarche.net/pingback.aspx</pingback:server>
      <pingback:target>http://patricelamarche.net/PermaLink,guid,2d43b63e-de17-40c8-8b11-47ccb6870664.aspx</pingback:target>
      <dc:creator>Patrice Lamarche</dc:creator>
      <wfw:comment>http://patricelamarche.net/CommentView,guid,2d43b63e-de17-40c8-8b11-47ccb6870664.aspx</wfw:comment>
      <wfw:commentRss>http://patricelamarche.net/SyndicationService.asmx/GetEntryCommentsRss?guid=2d43b63e-de17-40c8-8b11-47ccb6870664</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Dans le genre truc à la con que j'oublie à chaque fois, pour parcourir la callstack
durant l'exécution d'un programme - afin de par exemple connaitre la méthode d'appel
- il faut utiliser la classe <a href="http://msdn.microsoft.com/en-us/library/system.diagnostics.stacktrace.aspx" target="_blank">StackTrace</a> présente
dans le namespace <a href="http://msdn.microsoft.com/en-us/library/system.diagnostics.aspx" target="_blank">System.Diagnostics</a> afin
de récupérer les différentes <a href="http://msdn.microsoft.com/en-us/library/system.diagnostics.stackframe.aspx" target="_blank">StackFrame</a> représentant
les différentes frames de votre pile d'appel. La première (indice 0) étant la méthode
actuelle et la seconde représentant la méthode d'appel précédente. Vous pouvez ainsi
remonter jusqu'où bon vous semble.
</p>
        <p>
Exemple rapide de code :<br /></p>
        <div class="wlWriterSmartContent" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:65f48ee6-a4b8-40dc-b473-5c6d51404833" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">
          <pre name="code" class="c#">             static void Main(string[] args)
             {
                    Toto();
             }

             static void Toto()
             {
                    StackTrace trace = new StackTrace();
                    StackFrame frame = trace.GetFrame(1);

                    MethodBase method = frame.GetMethod();

                    Console.WriteLine(frame.GetMethod().Name);
             }
</pre>
        </div>
        <img width="0" height="0" src="http://patricelamarche.net/aggbug.ashx?id=2d43b63e-de17-40c8-8b11-47ccb6870664" />
      </body>
      <title>Parcourir la CallStack via du code</title>
      <guid isPermaLink="false">http://patricelamarche.net/PermaLink,guid,2d43b63e-de17-40c8-8b11-47ccb6870664.aspx</guid>
      <link>http://patricelamarche.net/2009/02/23/ParcourirLaCallStackViaDuCode.aspx</link>
      <pubDate>Mon, 23 Feb 2009 13:13:00 GMT</pubDate>
      <description>&lt;p&gt;
Dans le genre truc à la con que j'oublie à chaque fois, pour parcourir la callstack
durant l'exécution d'un programme - afin de par exemple connaitre la méthode d'appel
- il faut utiliser la classe &lt;a href="http://msdn.microsoft.com/en-us/library/system.diagnostics.stacktrace.aspx" target="_blank"&gt;StackTrace&lt;/a&gt; présente
dans le namespace &lt;a href="http://msdn.microsoft.com/en-us/library/system.diagnostics.aspx" target="_blank"&gt;System.Diagnostics&lt;/a&gt; afin
de récupérer les différentes &lt;a href="http://msdn.microsoft.com/en-us/library/system.diagnostics.stackframe.aspx" target="_blank"&gt;StackFrame&lt;/a&gt; représentant
les différentes frames de votre pile d'appel. La première (indice 0) étant la méthode
actuelle et la seconde représentant la méthode d'appel précédente. Vous pouvez ainsi
remonter jusqu'où bon vous semble.
&lt;/p&gt;
&lt;p&gt;
Exemple rapide de code :&lt;br&gt;
&lt;div class="wlWriterSmartContent" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:65f48ee6-a4b8-40dc-b473-5c6d51404833" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;pre name="code" class="c#"&gt;             static void Main(string[] args)
             {
                    Toto();
             }

             static void Toto()
             {
                    StackTrace trace = new StackTrace();
                    StackFrame frame = trace.GetFrame(1);

                    MethodBase method = frame.GetMethod();

                    Console.WriteLine(frame.GetMethod().Name);
             }
&lt;/pre&gt;
&lt;/div&gt;
&gt;
&lt;img width="0" height="0" src="http://patricelamarche.net/aggbug.ashx?id=2d43b63e-de17-40c8-8b11-47ccb6870664" /&gt;</description>
      <comments>http://patricelamarche.net/CommentView,guid,2d43b63e-de17-40c8-8b11-47ccb6870664.aspx</comments>
      <category>Astuces</category>
      <category>Langages/C#</category>
    </item>
    <item>
      <trackback:ping>http://patricelamarche.net/Trackback.aspx?guid=15ee1135-0906-47f4-868d-ad3d751f08d7</trackback:ping>
      <pingback:server>http://patricelamarche.net/pingback.aspx</pingback:server>
      <pingback:target>http://patricelamarche.net/PermaLink,guid,15ee1135-0906-47f4-868d-ad3d751f08d7.aspx</pingback:target>
      <dc:creator>Patrice Lamarche</dc:creator>
      <wfw:comment>http://patricelamarche.net/CommentView,guid,15ee1135-0906-47f4-868d-ad3d751f08d7.aspx</wfw:comment>
      <wfw:commentRss>http://patricelamarche.net/SyndicationService.asmx/GetEntryCommentsRss?guid=15ee1135-0906-47f4-868d-ad3d751f08d7</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p align="justify">
Si vous êtes éditeur de logiciels et que vous souhaitez avoir des informations détaillées
lorsque vos applications rencontres des problèmes inattendus sachez que vous pouvez
récupérer les rapports envoyés par les utilisateurs lorsqu'ils rencontrent ce message
d'erreur :
</p>
        <p align="center">
          <img src="http://www.ontechnews.com/wp-content/uploads/click-send-error-report.gif" />
        </p>
        <p align="justify">
Si l'OS propose aux utilisateurs d'envoyer des rapports d'erreurs pour toutes les
applications et non pas uniquement pour celle de Microsoft, ce n'est pas à des fins
d'espionnage mais pour permettre aux éditeurs d'améliorer la qualité de leurs logiciels.
Il est en effet possible d'accéder gratuitement à ces rapports d'erreurs via le site <a href="https://winqual.microsoft.com" target="_blank">Windows
Quality Online Services</a>. Il suffit pour cela de s'inscrire et de s'identifier
de manière formelle en tant qu'éditeur de logiciels via un certificat Verisign.
</p>
        <p align="center">
          <a href="http://patricelamarche.net/content/binary/WindowsLiveWriter/Rcuprerlesrapportsderreurdevoslogiciels_C875/image_2.png">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="441" alt="image" src="http://patricelamarche.net/content/binary/WindowsLiveWriter/Rcuprerlesrapportsderreurdevoslogiciels_C875/image_thumb.png" width="675" border="0" />
          </a>
        </p>
        <p>
En savoir plus :<br /><a href="https://winqual.microsoft.com/" target="_blank">Windows Quality Online Services</a></p>
        <img width="0" height="0" src="http://patricelamarche.net/aggbug.ashx?id=15ee1135-0906-47f4-868d-ad3d751f08d7" />
      </body>
      <title>Récupérer les rapports d'erreur de vos logiciels</title>
      <guid isPermaLink="false">http://patricelamarche.net/PermaLink,guid,15ee1135-0906-47f4-868d-ad3d751f08d7.aspx</guid>
      <link>http://patricelamarche.net/2009/02/19/R%c3%a9cup%c3%a9rerLesRapportsDerreurDeVosLogiciels.aspx</link>
      <pubDate>Thu, 19 Feb 2009 11:58:56 GMT</pubDate>
      <description>&lt;p align="justify"&gt;
Si vous êtes éditeur de logiciels et que vous souhaitez avoir des informations détaillées
lorsque vos applications rencontres des problèmes inattendus sachez que vous pouvez
récupérer les rapports envoyés par les utilisateurs lorsqu'ils rencontrent ce message
d'erreur :
&lt;/p&gt;
&lt;p align="center"&gt;
&lt;img src="http://www.ontechnews.com/wp-content/uploads/click-send-error-report.gif"&gt;
&lt;/p&gt;
&lt;p align="justify"&gt;
Si l'OS propose aux utilisateurs d'envoyer des rapports d'erreurs pour toutes les
applications et non pas uniquement pour celle de Microsoft, ce n'est pas à des fins
d'espionnage mais pour permettre aux éditeurs d'améliorer la qualité de leurs logiciels.
Il est en effet possible d'accéder gratuitement à ces rapports d'erreurs via le site &lt;a href="https://winqual.microsoft.com" target="_blank"&gt;Windows
Quality Online Services&lt;/a&gt;. Il suffit pour cela de s'inscrire et de s'identifier
de manière formelle en tant qu'éditeur de logiciels via un certificat Verisign.
&lt;/p&gt;
&lt;p align="center"&gt;
&lt;a href="http://patricelamarche.net/content/binary/WindowsLiveWriter/Rcuprerlesrapportsderreurdevoslogiciels_C875/image_2.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="441" alt="image" src="http://patricelamarche.net/content/binary/WindowsLiveWriter/Rcuprerlesrapportsderreurdevoslogiciels_C875/image_thumb.png" width="675" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
En savoir plus :&lt;br&gt;
&lt;a href="https://winqual.microsoft.com/" target="_blank"&gt;Windows Quality Online Services&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://patricelamarche.net/aggbug.ashx?id=15ee1135-0906-47f4-868d-ad3d751f08d7" /&gt;</description>
      <comments>http://patricelamarche.net/CommentView,guid,15ee1135-0906-47f4-868d-ad3d751f08d7.aspx</comments>
      <category>Astuces</category>
    </item>
    <item>
      <trackback:ping>http://patricelamarche.net/Trackback.aspx?guid=e8bdf8b5-fbab-4b40-ab67-9207b22e6456</trackback:ping>
      <pingback:server>http://patricelamarche.net/pingback.aspx</pingback:server>
      <pingback:target>http://patricelamarche.net/PermaLink,guid,e8bdf8b5-fbab-4b40-ab67-9207b22e6456.aspx</pingback:target>
      <dc:creator>Patrice Lamarche</dc:creator>
      <wfw:comment>http://patricelamarche.net/CommentView,guid,e8bdf8b5-fbab-4b40-ab67-9207b22e6456.aspx</wfw:comment>
      <wfw:commentRss>http://patricelamarche.net/SyndicationService.asmx/GetEntryCommentsRss?guid=e8bdf8b5-fbab-4b40-ab67-9207b22e6456</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Windows permet de récupérer très simplement le texte affiché dans une boite de dialogue. 
</p>
        <p>
Exemple : 
</p>
        <p>
          <a href="http://patricelamarche.net/content/binary/WindowsLiveWriter/AstuceCopierCollerletexteduneboitededial_1430E/clip_image002_2.jpg">
            <img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="145" alt="clip_image002" src="http://patricelamarche.net/content/binary/WindowsLiveWriter/AstuceCopierCollerletexteduneboitededial_1430E/clip_image002_thumb.jpg" width="244" border="0" />
          </a>
        </p>
        <p>
Pour cela, quand la boite de dialogue a le focus, il suffit de faire un traditionnel
Ctrl+C puis Ctrl+V ce qui va donner le résultat suivant : 
</p>
        <p>
--------------------------- 
</p>
        <p>
Titre 
</p>
        <p>
--------------------------- 
</p>
        <p>
Message de la boite de dialogue 
</p>
        <p>
--------------------------- 
</p>
        <p>
OK   
</p>
        <p>
---------------------------
</p>
        <img width="0" height="0" src="http://patricelamarche.net/aggbug.ashx?id=e8bdf8b5-fbab-4b40-ab67-9207b22e6456" />
      </body>
      <title>[Astuce] Copier Coller le texte d'une boite de dialogue</title>
      <guid isPermaLink="false">http://patricelamarche.net/PermaLink,guid,e8bdf8b5-fbab-4b40-ab67-9207b22e6456.aspx</guid>
      <link>http://patricelamarche.net/2008/11/17/AstuceCopierCollerLeTexteDuneBoiteDeDialogue.aspx</link>
      <pubDate>Mon, 17 Nov 2008 04:00:11 GMT</pubDate>
      <description>&lt;p&gt;
Windows permet de récupérer très simplement le texte affiché dans une boite de dialogue. 
&lt;p&gt;
Exemple : 
&lt;p&gt;
&lt;a href="http://patricelamarche.net/content/binary/WindowsLiveWriter/AstuceCopierCollerletexteduneboitededial_1430E/clip_image002_2.jpg"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="145" alt="clip_image002" src="http://patricelamarche.net/content/binary/WindowsLiveWriter/AstuceCopierCollerletexteduneboitededial_1430E/clip_image002_thumb.jpg" width="244" border="0"&gt;&lt;/a&gt; 
&lt;p&gt;
Pour cela, quand la boite de dialogue a le focus, il suffit de faire un traditionnel
Ctrl+C puis Ctrl+V ce qui va donner le résultat suivant : 
&lt;p&gt;
--------------------------- 
&lt;p&gt;
Titre 
&lt;p&gt;
--------------------------- 
&lt;p&gt;
Message de la boite de dialogue 
&lt;p&gt;
--------------------------- 
&lt;p&gt;
OK&amp;nbsp;&amp;nbsp; 
&lt;p&gt;
---------------------------
&lt;/p&gt;
&lt;img width="0" height="0" src="http://patricelamarche.net/aggbug.ashx?id=e8bdf8b5-fbab-4b40-ab67-9207b22e6456" /&gt;</description>
      <comments>http://patricelamarche.net/CommentView,guid,e8bdf8b5-fbab-4b40-ab67-9207b22e6456.aspx</comments>
      <category>Astuces</category>
    </item>
    <item>
      <trackback:ping>http://patricelamarche.net/Trackback.aspx?guid=04302857-7baa-4795-8b44-b15a2388884d</trackback:ping>
      <pingback:server>http://patricelamarche.net/pingback.aspx</pingback:server>
      <pingback:target>http://patricelamarche.net/PermaLink,guid,04302857-7baa-4795-8b44-b15a2388884d.aspx</pingback:target>
      <dc:creator>Patrice Lamarche</dc:creator>
      <wfw:comment>http://patricelamarche.net/CommentView,guid,04302857-7baa-4795-8b44-b15a2388884d.aspx</wfw:comment>
      <wfw:commentRss>http://patricelamarche.net/SyndicationService.asmx/GetEntryCommentsRss?guid=04302857-7baa-4795-8b44-b15a2388884d</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Si vous donnez régulièrement des formations ou des présentations ceci peut vous intéresser
: 
</p>
        <p>
Il existe plusieurs méthodes pour changer la taille de la police dans Visual Studio
: 
</p>
        <p>
La méthode j’ai le temps de prendre un café qui consiste à faire un Tools\Options\Environment\Font
and colors et changer manuellement la taille de la police. 
</p>
        <p>
La méthode j'aime me simplifier la vie qui consiste à créér  une macro qui permet
d’avoir le résultat escompté instantanément.
</p>
        <pre>Imports System

Imports EnvDTE

Imports EnvDTE80

Imports EnvDTE90

Imports System.Diagnostics

Public Module Presentation

Public Sub DemoConfig()

        DTE.Properties("FontsAndColors", "TextEditor").Item("FontSize").Value = 16

End Sub

Public Sub WorkingConfig()

        DTE.Properties("FontsAndColors", "TextEditor").Item("FontSize").Value = 10

End Sub

Public Sub Bigger()

        DTE.Properties("FontsAndColors", "TextEditor").Item("FontSize").Value += 1

End Sub

Public Sub Smaller()

        DTE.Properties("FontsAndColors", "TextEditor").Item("FontSize").Value -= 1

End Sub

End Module</pre>
        <p>
Il ne vous reste plus qu’à mettre quelques boutons dans votre barre d’outil afin d’appeler
d’un simple clic ces macros. : <a href="http://patricelamarche.net/images/WindowsLiveWriter/AstucesChangerlatailledelapolicedansVisu_13385/clip_image002_2.jpg"><img height="56" alt="clip_image002" src="http://patricelamarche.net/images/WindowsLiveWriter/AstucesChangerlatailledelapolicedansVisu_13385/clip_image002_thumb.jpg" width="214" border="0" /></a></p>
        <p>
Vous avez donc accès à un mode présentation qui met la police en gros, un mode travail
qui réduit la taille de la police, et même la possibilité d’incrémenter/décrémenter
la taille manuellement.
</p>
        <img width="0" height="0" src="http://patricelamarche.net/aggbug.ashx?id=04302857-7baa-4795-8b44-b15a2388884d" />
      </body>
      <title>[Astuces] Changer la taille de la police dans Visual Studio</title>
      <guid isPermaLink="false">http://patricelamarche.net/PermaLink,guid,04302857-7baa-4795-8b44-b15a2388884d.aspx</guid>
      <link>http://patricelamarche.net/2008/05/20/AstucesChangerLaTailleDeLaPoliceDansVisualStudio.aspx</link>
      <pubDate>Tue, 20 May 2008 19:52:10 GMT</pubDate>
      <description>&lt;p&gt;
Si vous donnez régulièrement des formations ou des présentations ceci peut vous intéresser
: 
&lt;p&gt;
Il existe plusieurs méthodes pour changer la taille de la police dans Visual Studio
: 
&lt;p&gt;
La méthode j’ai le temps de prendre un café qui consiste à faire un Tools\Options\Environment\Font
and colors et changer manuellement la taille de la police. 
&lt;p&gt;
La méthode j'aime me simplifier la vie qui consiste à créér&amp;nbsp; une macro qui permet
d’avoir le résultat escompté instantanément.&lt;pre&gt;Imports System

Imports EnvDTE

Imports EnvDTE80

Imports EnvDTE90

Imports System.Diagnostics

Public Module Presentation

Public Sub DemoConfig()

        DTE.Properties("FontsAndColors", "TextEditor").Item("FontSize").Value = 16

End Sub

Public Sub WorkingConfig()

        DTE.Properties("FontsAndColors", "TextEditor").Item("FontSize").Value = 10

End Sub

Public Sub Bigger()

        DTE.Properties("FontsAndColors", "TextEditor").Item("FontSize").Value += 1

End Sub

Public Sub Smaller()

        DTE.Properties("FontsAndColors", "TextEditor").Item("FontSize").Value -= 1

End Sub

End Module&lt;/pre&gt;
&lt;p&gt;
Il ne vous reste plus qu’à mettre quelques boutons dans votre barre d’outil afin d’appeler
d’un simple clic ces macros. : &lt;a href="http://patricelamarche.net/images/WindowsLiveWriter/AstucesChangerlatailledelapolicedansVisu_13385/clip_image002_2.jpg"&gt;&lt;img height="56" alt="clip_image002" src="http://patricelamarche.net/images/WindowsLiveWriter/AstucesChangerlatailledelapolicedansVisu_13385/clip_image002_thumb.jpg" width="214" border="0"&gt;&lt;/a&gt; 
&lt;p&gt;
Vous avez donc accès à un mode présentation qui met la police en gros, un mode travail
qui réduit la taille de la police, et même la possibilité d’incrémenter/décrémenter
la taille manuellement.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://patricelamarche.net/aggbug.ashx?id=04302857-7baa-4795-8b44-b15a2388884d" /&gt;</description>
      <comments>http://patricelamarche.net/CommentView,guid,04302857-7baa-4795-8b44-b15a2388884d.aspx</comments>
      <category>Astuces</category>
    </item>
    <item>
      <trackback:ping>http://patricelamarche.net/Trackback.aspx?guid=25bbb35e-74c3-4a40-8d93-af3c819fb84a</trackback:ping>
      <pingback:server>http://patricelamarche.net/pingback.aspx</pingback:server>
      <pingback:target>http://patricelamarche.net/PermaLink,guid,25bbb35e-74c3-4a40-8d93-af3c819fb84a.aspx</pingback:target>
      <dc:creator>Patrice Lamarche</dc:creator>
      <wfw:comment>http://patricelamarche.net/CommentView,guid,25bbb35e-74c3-4a40-8d93-af3c819fb84a.aspx</wfw:comment>
      <wfw:commentRss>http://patricelamarche.net/SyndicationService.asmx/GetEntryCommentsRss?guid=25bbb35e-74c3-4a40-8d93-af3c819fb84a</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Si vous activez les mises à jours automatiques via Windows Update sous ce merveilleux
OS qu'est Windows Vista, il se peut qu'un beau jour votre Word 2007 ne fonctionne
plus correctement. les symptômes que vous êtes susceptibles de rencontrer sont les
suivants : 
</p>
        <ul>
          <li>
La souris ne fonctionne plus dans vos documents Word, impossible de faire de la sélection,
etc. 
</li>
          <li>
La souris ne fonctionne plus dans la scroll bar, impossible de naviguer 
</li>
          <li>
vous n'arrivez plus à ouvrir de fichier en double cliquant sur un document Word, cela
ouvre Word mais n'ouvre pas le fichier (vous êtes obligés de l'ouvrir manuellement
via Fichier/Ouvrir) 
</li>
          <li>
et pour compléter le tout Word plante lamentablement à chaque fois que vous souhaitez
le fermer 
</li>
        </ul>
        <p>
Et bien c'est ce qui vient de m'arriver ce matin en arrivant en formation (vous imaginez
dans quelle humeur cela me met...). 
</p>
        <p>
Sachez que tout cela est "normal" connu depuis plusieurs mois et que vous avez la
solution à ce problème indiquée sur le site du support Microsoft à cette adresse : 
<br /><a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;940791">http://support.microsoft.com/default.aspx?scid=kb;en-us;940791</a></p>
        <img width="0" height="0" src="http://patricelamarche.net/aggbug.ashx?id=25bbb35e-74c3-4a40-8d93-af3c819fb84a" />
      </body>
      <title>[Astuce] La souris ne fonctionne plus dans Word 2007</title>
      <guid isPermaLink="false">http://patricelamarche.net/PermaLink,guid,25bbb35e-74c3-4a40-8d93-af3c819fb84a.aspx</guid>
      <link>http://patricelamarche.net/2008/03/13/AstuceLaSourisNeFonctionnePlusDansWord2007.aspx</link>
      <pubDate>Thu, 13 Mar 2008 16:01:52 GMT</pubDate>
      <description>&lt;p&gt;
Si vous activez les mises à jours automatiques via Windows Update sous ce merveilleux
OS qu'est Windows Vista, il se peut qu'un beau jour votre Word 2007 ne fonctionne
plus correctement. les symptômes que vous êtes susceptibles de rencontrer sont les
suivants : 
&lt;ul&gt;
&lt;li&gt;
La souris ne fonctionne plus dans vos documents Word, impossible de faire de la sélection,
etc. 
&lt;li&gt;
La souris ne fonctionne plus dans la scroll bar, impossible de naviguer 
&lt;li&gt;
vous n'arrivez plus à ouvrir de fichier en double cliquant sur un document Word, cela
ouvre Word mais n'ouvre pas le fichier (vous êtes obligés de l'ouvrir manuellement
via Fichier/Ouvrir) 
&lt;li&gt;
et pour compléter le tout Word plante lamentablement à chaque fois que vous souhaitez
le fermer 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Et bien c'est ce qui vient de m'arriver ce matin en arrivant en formation (vous imaginez
dans quelle humeur cela me met...). 
&lt;p&gt;
Sachez que tout cela est "normal" connu depuis plusieurs mois et que vous avez la
solution à ce problème indiquée sur le site du support Microsoft à cette adresse : 
&lt;br&gt;
&lt;a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;940791"&gt;http://support.microsoft.com/default.aspx?scid=kb;en-us;940791&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://patricelamarche.net/aggbug.ashx?id=25bbb35e-74c3-4a40-8d93-af3c819fb84a" /&gt;</description>
      <comments>http://patricelamarche.net/CommentView,guid,25bbb35e-74c3-4a40-8d93-af3c819fb84a.aspx</comments>
      <category>Astuces</category>
    </item>
  </channel>
</rss>