<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>blog.carnould.com</title>
	<atom:link href="http://blog.carnould.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.carnould.com</link>
	<description>Analyste Développeur en .Net</description>
	<lastBuildDate>Wed, 30 Jun 2010 13:52:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Sélectionner tous ses mails non lus sur Gmail</title>
		<link>http://blog.carnould.com/2010/06/selectionner-tous-ses-mails-non-lus-sur-gmail/</link>
		<comments>http://blog.carnould.com/2010/06/selectionner-tous-ses-mails-non-lus-sur-gmail/#comments</comments>
		<pubDate>Wed, 30 Jun 2010 13:52:08 +0000</pubDate>
		<dc:creator>ranouf</dc:creator>
				<category><![CDATA[Non classé]]></category>
		<category><![CDATA[Astuces]]></category>
		<category><![CDATA[Gmail]]></category>

		<guid isPermaLink="false">http://blog.carnould.com/?p=371</guid>
		<description><![CDATA[Voila une astuce assez intéressante (en tout cas pour ceux qui en ont besoin), pour afficher tous les messages non lus de sa boite Gmail, faite la recherche suivante: in:all is:unread No related posts.


No related posts.]]></description>
			<content:encoded><![CDATA[<p>Voila une astuce assez intéressante (en tout cas pour ceux qui en ont besoin), pour afficher tous les messages non lus de sa boite Gmail, faite la recherche suivante:</p>
<pre>
in:all is:unread
</pre>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.carnould.com/2010/06/selectionner-tous-ses-mails-non-lus-sur-gmail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Comment utiliser d&#8217;autres fonts sur son site</title>
		<link>http://blog.carnould.com/2010/06/comment-utiliser-dautres-fonts-sur-son-site/</link>
		<comments>http://blog.carnould.com/2010/06/comment-utiliser-dautres-fonts-sur-son-site/#comments</comments>
		<pubDate>Thu, 03 Jun 2010 15:11:45 +0000</pubDate>
		<dc:creator>ranouf</dc:creator>
				<category><![CDATA[Non classé]]></category>
		<category><![CDATA[Astuces]]></category>
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://blog.carnould.com/?p=354</guid>
		<description><![CDATA[Fonts disponibles en standard La majorité des sites internet utilisent les fonts suivantes: Arial / Helvetica Courier New / Courier Times New Roman / Times Ces fonts ont l&#8217;avantage d&#8217;être multiplateformes, Windows, Mac et Linux sauront affichés ces sites web sans problème. D&#8217;autres fonts de ce type existent mais sont moins utilisées: Avant Garde Bookman


No related posts.]]></description>
			<content:encoded><![CDATA[<h2>Fonts disponibles en standard</h2>
<p>La majorité des sites internet utilisent les fonts suivantes:
<ul>
<li>Arial / Helvetica</li>
<li>Courier New / Courier</li>
<li>Times New Roman / Times</li>
</ul>
<p>Ces fonts ont l&#8217;avantage d&#8217;être multiplateformes, Windows, Mac et Linux sauront affichés ces sites web sans problème. D&#8217;autres fonts de ce type existent mais sont moins utilisées:</p>
<ul>
<li>Avant Garde </li>
<li>Bookman</li>
<li>Garamond</li>
<li>Palatino</li>
</ul>
<p>Windows et Mac proposent d&#8217;autre fonts encore qui ne sont pas gérés par Linux:</p>
<ul>
<li>Arial Black</li>
<li>Comic Sans MS</li>
<li>Impact</li>
<li>Georgia</li>
<li>Trebuchet MS</li>
<li>Verdana</li>
</ul>
<p>Mais qu&#8217;en est il, lorsqu&#8217;on veut pouvoir ajouter ses propres polices sur son site web?</p>
<h2>Utiliser des fonts non standards</h2>
<p>La solution à ce problème se trouver dans l&#8217;utilisation de <b>@font-face</b> dans votre fichier CSS, exemple:

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p354code2'); return false;">View Code</a> CSS</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p3542"><td class="code" id="p354code2"><pre class="css" style="font-family:monospace;"><span style="color: #a1a100;">@font-face {</span>
	<span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">'MyFont'</span><span style="color: #00AA00;">;</span>
	src<span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'MyFont.eot'</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #a1a100;">@font-face {</span>
	<span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">'MyFont'</span><span style="color: #00AA00;">;</span>
	src<span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'MyFont.ttf'</span><span style="color: #00AA00;">&#41;</span> format<span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'truetype'</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
body<span style="color: #00AA00;">,</span>html <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span><span style="color: #ff0000;">&quot;MyFont&quot;</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>La partie avec la font :</p>
<ul>
<li>&laquo;&nbsp;.eot&nbsp;&raquo; est pour IE</li>
<li>&laquo;&nbsp;.ttf&nbsp;&raquo; est pour les autres navigateurs</li>
</ul>
<p>Votre site utilise maintenant d&#8217;autres fonts que celles disponibles par défaut.</p>
<h2>Sites utiles</h2>
<ul>
<li><a href="http://onlinefontconverter.com/" target="_blank">http://onlinefontconverter.com/</a>: site permettant de convertir n&#8217;importe quelle font dans n&#8217;importe quel format,</li>
<li><a href="http://www.dafont.com/" target="_blank">http://www.dafont.com/</a>: site regroupant énormément de fonts.</li>
</ul>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.carnould.com/2010/06/comment-utiliser-dautres-fonts-sur-son-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Comment gérer les exceptions en Asp.net</title>
		<link>http://blog.carnould.com/2010/05/comment-gerer-les-exceptions-en-asp-net/</link>
		<comments>http://blog.carnould.com/2010/05/comment-gerer-les-exceptions-en-asp-net/#comments</comments>
		<pubDate>Thu, 27 May 2010 17:31:54 +0000</pubDate>
		<dc:creator>ranouf</dc:creator>
				<category><![CDATA[Non classé]]></category>
		<category><![CDATA[Asp.Net]]></category>
		<category><![CDATA[Astuces]]></category>

		<guid isPermaLink="false">http://blog.carnould.com/?p=340</guid>
		<description><![CDATA[<p>Quand on met son site en ligne, on a parfois des erreurs qu'on n'a pas su gérer, ce qu'on appelle une exception, par exemple la base de données qui ne répond pas.</p>
<p>Pour comprendre comment elles ont eu lieu, il faut pouvoir logguer ces exceptions.</p>
<p>Pour corriger le problème rapidement, le site enverra un email à l'administrateur.<p>


Related posts:<ol><li><a href='http://blog.carnould.com/2010/04/comment-gerer-plusieurs-web-config-facilement/' rel='bookmark' title='Permanent Link: Comment gérer plusieurs web.config facilement?'>Comment gérer plusieurs web.config facilement?</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<h2>Situation</h2>
<p>Quand on met son site en ligne, on a parfois des erreurs qu&#8217;on n&#8217;a pas su gérer, ce qu&#8217;on appelle une exception, par exemple la base de données qui ne répond pas.</p>
<p>Pour comprendre comment elles ont eu lieu, il faut pouvoir logguer ces exceptions.</p>
<p>Pour corriger le problème rapidement, le site enverra un email à l&#8217;administrateur.<br />
<h2>Elmah</h2>
<p><a href="http://code.google.com/p/elmah/" targer="_blank">Elmah</a> permet de répondre à tous ces besoins.</p>
<p>Voici la procédure a faire pour intégrer <a href="http://code.google.com/p/elmah/" targer="_blank">Elmah</a> à votre projet :</p>
<h3>1e étape: Télécharger Elmah</h3>
<p>Pour cela cliquer <a href="http://code.google.com/p/elmah/downloads/list" target="_blank">ici</a>, la version que j&#8217;utilise présentement est la <b>version 1.1</b>.</p>
<h3>2e étape: Ajouter la référence à votre projet</h3>
<p>Menu <b>Project / Add Reference</b>, puis ajouter Elmah.dll</p>
<h3>3e étape: Modifier la web.config</h3>
<p>Ajouter dans la section <b>ConfigSections</b>:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p340code3'); return false;">View Code</a> CONFIG</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p3403"><td class="code" id="p340code3"><pre class="config" style="font-family:monospace;">    &lt;sectionGroup name=&quot;elmah&quot;&gt;
      &lt;section name=&quot;security&quot; requirePermission=&quot;false&quot; type=&quot;Elmah.SecuritySectionHandler, Elmah&quot; /&gt;
      &lt;section name=&quot;errorLog&quot; requirePermission=&quot;false&quot; type=&quot;Elmah.ErrorLogSectionHandler, Elmah&quot; /&gt;
      &lt;section name=&quot;errorMail&quot; requirePermission=&quot;false&quot; type=&quot;Elmah.ErrorMailSectionHandler, Elmah&quot; /&gt;
      &lt;section name=&quot;errorFilter&quot; requirePermission=&quot;false&quot; type=&quot;Elmah.ErrorFilterSectionHandler, Elmah&quot; /&gt;
    &lt;/sectionGroup&gt;</pre></td></tr></table></div>

<p>Ajouter dans la section <b>HttpHandlers</b>:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p340code4'); return false;">View Code</a> CONFIG</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p3404"><td class="code" id="p340code4"><pre class="config" style="font-family:monospace;">&lt;add verb=&quot;POST,GET,HEAD&quot; path=&quot;elmah.axd&quot; type=&quot;Elmah.ErrorLogPageFactory, Elmah&quot; /&gt;</pre></td></tr></table></div>

<p>Ajouter dans la section <b>HttpModules</b>:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p340code5'); return false;">View Code</a> CONFIG</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p3405"><td class="code" id="p340code5"><pre class="config" style="font-family:monospace;">&lt;add name=&quot;ErrorLog&quot; type=&quot;Elmah.ErrorLogModule, Elmah&quot; /&gt;
&lt;add name=&quot;ErrorMail&quot; type=&quot;Elmah.ErrorMailModule, Elmah&quot; /&gt;
&lt;add name=&quot;ErrorFilter&quot; type=&quot;Elmah.ErrorFilterModule, Elmah&quot;/&gt;</pre></td></tr></table></div>

<p>Configurer le serveur SMTP, si ce n&#8217;est pas déjà fait:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p340code6'); return false;">View Code</a> CONFIG</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p3406"><td class="code" id="p340code6"><pre class="config" style="font-family:monospace;">  &lt;system.net&gt;
    &lt;mailSettings&gt;
      &lt;smtp deliveryMethod=&quot;Network&quot; from=&quot;DoNotReply@XXX.com&quot;&gt;
        &lt;network host=&quot;smtp.XXX.com&quot; defaultCredentials=&quot;true&quot; userName=&quot;X&quot; password=&quot;X&quot; /&gt;
      &lt;/smtp&gt;
    &lt;/mailSettings&gt;
  &lt;/system.net&gt;</pre></td></tr></table></div>

<p>Ajouter la section <b>elmah</b> dans la section <b>Configuration</b>:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p340code7'); return false;">View Code</a> CONFIG</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p3407"><td class="code" id="p340code7"><pre class="config" style="font-family:monospace;">  &lt;elmah&gt;
    &lt;security allowRemoteAccess=&quot;0&quot; /&gt;
    &lt;errorLog type=&quot;Elmah.XmlFileErrorLog, Elmah&quot; logPath=&quot;C:\Temp&quot; /&gt;
    &lt;errorMail from=&quot;error@XXXX.com&quot; to=&quot;administrator@XXXX.com&quot; priority=&quot;High&quot; /&gt;
  &lt;/elmah&gt;</pre></td></tr></table></div>

<p>Ajouter la section <b>location </b> dans la section <b>Configuration</b>:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p340code8'); return false;">View Code</a> CONFIG</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p3408"><td class="code" id="p340code8"><pre class="config" style="font-family:monospace;">  &lt;location path=&quot;elmah.axd&quot;&gt;
    &lt;system.web&gt;
      &lt;authorization&gt;
        &lt;deny users=&quot;?&quot; /&gt;
      &lt;/authorization&gt;
    &lt;/system.web&gt;
  &lt;/location&gt;</pre></td></tr></table></div>

<h3>4e étape: Tester</h3>
<p>Ajouter le code suivant dans le Page_Load de la page:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p340code9'); return false;">View Code</a> VB</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p3409"><td class="code" id="p340code9"><pre class="vb" style="font-family:monospace;">Throw <span style="color: #000080;">New</span> Exception(<span style="color: #800000;">&quot;This is a test&quot;</span>)</pre></td></tr></table></div>

<p>Compiler et ré-afficher la page.</p>
<p>Une exception est détectée, un mail est envoyé et une entrée dans le fichier xml a été ajoutée.</p>
<h2>Allons plus loin</h2>
<h3>Filtrer les erreurs</h3>
<p>Elmah permet de filtrer les erreurs interceptées.</p>
<p>Ainsi on ne voudra pas logguer les erreurs 404 ou encore les exceptions de Type FieldAccessException par exemple. Pour cela, il faut modifier la section <b>elmah</b> dans la web.config de la manière suivante:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p340code10'); return false;">View Code</a> CONFIG</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p34010"><td class="code" id="p340code10"><pre class="config" style="font-family:monospace;">&lt;pre lang=&quot;config&quot;&gt;
  &lt;elmah&gt;
    &lt;security allowRemoteAccess=&quot;0&quot; /&gt;
    &lt;errorLog type=&quot;Elmah.XmlFileErrorLog, Elmah&quot; logPath=&quot;C:\Temp&quot; /&gt;
    &lt;errorFilter&gt;
      &lt;test&gt;
        &lt;or&gt;
          &lt;equal binding=&quot;HttpStatusCode&quot; value=&quot;404&quot; type=&quot;Int32&quot; /&gt;
          &lt;is-type binding=&quot;BaseException&quot; type=&quot;System.FieldAccessException&quot; /&gt;
        &lt;/or&gt;
      &lt;/test&gt;
    &lt;/errorFilter&gt;
    &lt;errorMail from=&quot;error@XXXX.com&quot; to=&quot;administrator@XXXX.com&quot; priority=&quot;High&quot; /&gt;
  &lt;/elmah&gt;</pre></td></tr></table></div>

</pre>
<h3>Visionner les erreurs</h3>
<p> Elmah offre une interface web pour visionner les exceptions, pour cela ouvre la page <b>http://localhost/elmah.axd</b>, voici un exemple du rendu:</p>
<p><a href="http://blog.carnould.com/wp-content/uploads/2010/05/Elmah.jpg" rel="lightbox[340]"><img src="http://blog.carnould.com/wp-content/uploads/2010/05/Elmah-300x45.jpg" title="Elmah"  class="aligncenter size-medium wp-image-345" /></a></p>


<p>Related posts:<ol><li><a href='http://blog.carnould.com/2010/04/comment-gerer-plusieurs-web-config-facilement/' rel='bookmark' title='Permanent Link: Comment gérer plusieurs web.config facilement?'>Comment gérer plusieurs web.config facilement?</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.carnould.com/2010/05/comment-gerer-les-exceptions-en-asp-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Comment gérer plusieurs web.config facilement?</title>
		<link>http://blog.carnould.com/2010/04/comment-gerer-plusieurs-web-config-facilement/</link>
		<comments>http://blog.carnould.com/2010/04/comment-gerer-plusieurs-web-config-facilement/#comments</comments>
		<pubDate>Mon, 26 Apr 2010 17:19:57 +0000</pubDate>
		<dc:creator>ranouf</dc:creator>
				<category><![CDATA[Non classé]]></category>
		<category><![CDATA[Asp.Net]]></category>
		<category><![CDATA[Astuces]]></category>

		<guid isPermaLink="false">http://blog.carnould.com/?p=301</guid>
		<description><![CDATA[Situation Quand on développe des sites internet on a souvent des configurations différentes. Il devient vite difficile de s&#8217;y retrouver. Pour me faciliter la vie j&#8217;ai trouvé une solution simple et efficace qui ne demande l&#8217;installation d&#8217;aucun add-on supplémentaire. Prenons pour exemple la situation suivante: Debug: configuration par défaut utilisé sur le poste du développeur,


Related posts:<ol><li><a href='http://blog.carnould.com/2010/05/comment-gerer-les-exceptions-en-asp-net/' rel='bookmark' title='Permanent Link: Comment gérer les exceptions en Asp.net'>Comment gérer les exceptions en Asp.net</a></li>
<li><a href='http://blog.carnould.com/2010/03/comment-se-connecter-a-un-fichier-microsoft-excel-sous-sql-server-2005/' rel='bookmark' title='Permanent Link: Comment se connecter à un fichier Microsoft Excel sous SQL Server 2005'>Comment se connecter à un fichier Microsoft Excel sous SQL Server 2005</a></li>
<li><a href='http://blog.carnould.com/2010/06/comment-utiliser-dautres-fonts-sur-son-site/' rel='bookmark' title='Permanent Link: Comment utiliser d&#8217;autres fonts sur son site'>Comment utiliser d&#8217;autres fonts sur son site</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<h2>Situation</h2>
<p>Quand on développe des sites internet on a souvent des configurations différentes. Il devient vite difficile de s&#8217;y retrouver. Pour me faciliter la vie j&#8217;ai trouvé une solution simple et efficace qui ne demande l&#8217;installation d&#8217;aucun add-on supplémentaire.</p>
<p>Prenons pour exemple la situation suivante:</p>
<ul>
<li><strong>Debug</strong>: configuration par défaut utilisé sur le poste du développeur,</li>
<li><strong>Deploy</strong>: configuration du serveur de développement,</li>
<li><strong>Release</strong>: configuration du serveur de production.</li>
</ul>
<h2>Ajouter une nouvelle solution de configuration</h2>
<p>Tout d&#8217;abord on ajouter la nouvelle solution de configuration nommée <strong>Release</strong> (disponible dans le menu <strong>build/ConfigurationManager</strong>). </p>
<p>On aura ainsi dans la liste déroulante 3 solutions de configuration : </p>
<p><a href="http://blog.carnould.com/wp-content/uploads/2010/04/ConfigurationManager.jpg" rel="lightbox[301]"><img src="http://blog.carnould.com/wp-content/uploads/2010/04/ConfigurationManager-300x192.jpg" title="Configuration Manager" width="300" height="192" class="aligncenter size-medium wp-image-316" /></a>
</p>
<h2>Créer les fichiers de configuration</h2>
<p>Copier trois fois la configuration actuelle dans le répertoire du projet, puis nommer les de la manière suivante:</p>
<ul>
<li>web.debug.config</li>
<li>web.deploy.config</li>
<li>web.release.config</li>
</ul>
<h2>Ligne de commande</h2>
<p>Ensuite dans l&#8217;onglet <b>Compile</b> des propriétés du Projet, ajoutez la ligne suivante dans <b>Pre-build event command line</b>:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p301code13'); return false;">View Code</a> CONFIG</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p30113"><td class="code" id="p301code13"><pre class="config" style="font-family:monospace;">copy &quot;$(ProjectDir)\web.$(ConfigurationName).config&quot; &quot;$(ProjectDir)\web.config&quot; /y</pre></td></tr></table></div>

</p>
<p>Cette ligne de commande remplacera le fichier web.config par le fichier de configuration correspondant à la solution de configuration choisie.</p>
<h2>Les nice to have</h2>
<h3>Un fichier de backup</h3>
<p>Vous venez de modifier le fichier web.config, vous compilez et malheur vous vous rendez compte que votre configuration a été effacée.</p>
<p>Pour remédier à ce problème, j&#8217;ai modifiier la ligne de commande de la manière suivante:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p301code14'); return false;">View Code</a> CONFIG</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p30114"><td class="code" id="p301code14"><pre class="config" style="font-family:monospace;">copy &quot;$(ProjectDir)\web.config&quot; &quot;$(ProjectDir)\web.config.bak&quot; /y
copy &quot;$(ProjectDir)\web.$(ConfigurationName).config&quot; &quot;$(ProjectDir)\web.config&quot; /y</pre></td></tr></table></div>

</p>
<p>
Ainsi a chaque compilation, une copie de web.config est faite dans le fichier web.config.bak.
</p>
<h3>Personnaliser votre barre d&#8217;outils</h3>
<p>Pour faciliter votre vie de développeur, Visual Studio permet de personnaliser la barre d&#8217;outils.</p>
<p>Pour cela, faites un clic droit sur la barre d&#8217;outils et cliquez sur <b>Customize</b> puis sur l&#8217;onglet <b>Commands</b>, sélectionnez la catégorie <b>Build</b> puis ajoutez à votre barre d&#8217;outils la command <b>Solution Configurations<b></p>


<p>Related posts:<ol><li><a href='http://blog.carnould.com/2010/05/comment-gerer-les-exceptions-en-asp-net/' rel='bookmark' title='Permanent Link: Comment gérer les exceptions en Asp.net'>Comment gérer les exceptions en Asp.net</a></li>
<li><a href='http://blog.carnould.com/2010/03/comment-se-connecter-a-un-fichier-microsoft-excel-sous-sql-server-2005/' rel='bookmark' title='Permanent Link: Comment se connecter à un fichier Microsoft Excel sous SQL Server 2005'>Comment se connecter à un fichier Microsoft Excel sous SQL Server 2005</a></li>
<li><a href='http://blog.carnould.com/2010/06/comment-utiliser-dautres-fonts-sur-son-site/' rel='bookmark' title='Permanent Link: Comment utiliser d&#8217;autres fonts sur son site'>Comment utiliser d&#8217;autres fonts sur son site</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.carnould.com/2010/04/comment-gerer-plusieurs-web-config-facilement/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Comment se connecter à un fichier Microsoft Excel sous SQL Server 2005</title>
		<link>http://blog.carnould.com/2010/03/comment-se-connecter-a-un-fichier-microsoft-excel-sous-sql-server-2005/</link>
		<comments>http://blog.carnould.com/2010/03/comment-se-connecter-a-un-fichier-microsoft-excel-sous-sql-server-2005/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 16:12:03 +0000</pubDate>
		<dc:creator>ranouf</dc:creator>
				<category><![CDATA[Non classé]]></category>
		<category><![CDATA[Astuces]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Server 2005]]></category>

		<guid isPermaLink="false">http://blog.carnould.com/?p=284</guid>
		<description><![CDATA[1e méthode : Le fichier Excel Pour se connecter à un fichier Microsoft Excelle sous SQL Server 2005, vous pouvez utiliser la requête suivante : ?View Code SQLSELECT * FROM OPENDATASOURCE&#40;'Microsoft.Jet.OLEDB.4.0', 'Data Source=C:\Datasources\Test.xls;Extended Properties=EXCEL 5.0'&#41;...&#91;Sheet1$&#93; ; À noter que le fichier &#171;&#160;Test.xls&#160;&#187; doit être enregistré sur le serveur SQL dans le répertoire &#171;&#160;C:\Datasources&#160;&#187;. 2e méthode


Related posts:<ol><li><a href='http://blog.carnould.com/2010/04/comment-gerer-plusieurs-web-config-facilement/' rel='bookmark' title='Permanent Link: Comment gérer plusieurs web.config facilement?'>Comment gérer plusieurs web.config facilement?</a></li>
<li><a href='http://blog.carnould.com/2010/05/comment-gerer-les-exceptions-en-asp-net/' rel='bookmark' title='Permanent Link: Comment gérer les exceptions en Asp.net'>Comment gérer les exceptions en Asp.net</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<h2>1e méthode : Le fichier Excel</h2>
<p>Pour se connecter à un fichier Microsoft Excelle sous SQL Server 2005, vous pouvez utiliser la requête suivante :</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p284code18'); return false;">View Code</a> SQL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p28418"><td class="code" id="p284code18"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <span style="color: #993333; font-weight: bold;">FROM</span> OPENDATASOURCE<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'Microsoft.Jet.OLEDB.4.0'</span><span style="color: #66cc66;">,</span>
<span style="color: #ff0000;">'Data Source=C:<span style="color: #000099; font-weight: bold;">\D</span>atasources<span style="color: #000099; font-weight: bold;">\T</span>est.xls;Extended Properties=EXCEL 5.0'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">...</span><span style="color: #66cc66;">&#91;</span>Sheet1$<span style="color: #66cc66;">&#93;</span> ;</pre></td></tr></table></div>

<p>À noter que le fichier &laquo;&nbsp;Test.xls&nbsp;&raquo; doit être enregistré sur le serveur SQL dans le répertoire &laquo;&nbsp;C:\Datasources&nbsp;&raquo;.</p>
<h2>2e méthode : Le fichier CSV</h2>
<p>Cette fois on enregistre le fichier Excel en fichier CSV ayant pour délimiteur le point-virgule.<br />
On crée un fichier &laquo;&nbsp;schema.ini&nbsp;&raquo; dans le même répertoire dans lequel on a le code suivant:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p284code19'); return false;">View Code</a> CONFIG</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p28419"><td class="code" id="p284code19"><pre class="config" style="font-family:monospace;">[text.csv]
ColNameHeader=True
Format=Delimited(;)
MaxScanRows=5
CharacterSet=ANSI</pre></td></tr></table></div>

<p>On peut alors exécuter la requête SQL suivante :</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p284code20'); return false;">View Code</a> SQL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p28420"><td class="code" id="p284code20"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <span style="color: #993333; font-weight: bold;">FROM</span> OpenRowset<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'MSDASQL'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'Driver={Microsoft Text Driver (*.txt; *.csv)}; DefaultDir=D:<span style="color: #000099; font-weight: bold;">\D</span>atasources<span style="color: #000099; font-weight: bold;">\;</span>'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'select * FROM test.csv'</span><span style="color: #66cc66;">&#41;</span> ;</pre></td></tr></table></div>



<p>Related posts:<ol><li><a href='http://blog.carnould.com/2010/04/comment-gerer-plusieurs-web-config-facilement/' rel='bookmark' title='Permanent Link: Comment gérer plusieurs web.config facilement?'>Comment gérer plusieurs web.config facilement?</a></li>
<li><a href='http://blog.carnould.com/2010/05/comment-gerer-les-exceptions-en-asp-net/' rel='bookmark' title='Permanent Link: Comment gérer les exceptions en Asp.net'>Comment gérer les exceptions en Asp.net</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.carnould.com/2010/03/comment-se-connecter-a-un-fichier-microsoft-excel-sous-sql-server-2005/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
