<?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 de Nico-pyright(c) &#187; IIS</title>
	<atom:link href="https://blog.developpez.com/nico-pyright/pcategory/iis/feed" rel="self" type="application/rss+xml" />
	<link>https://blog.developpez.com/nico-pyright</link>
	<description></description>
	<lastBuildDate>Mon, 08 Apr 2013 09:26:35 +0000</lastBuildDate>
	<language>fr-FR</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.1.42</generator>
	<item>
		<title>[IIS][Certificat] Utiliser OpenSSL pour créer un certificat .CER ou .PFX à partir du certificat public et de la clé privée</title>
		<link>https://blog.developpez.com/nico-pyright/p8636/web-services/iis_certificat_utiliser_openssl_pour_cre</link>
		<comments>https://blog.developpez.com/nico-pyright/p8636/web-services/iis_certificat_utiliser_openssl_pour_cre#comments</comments>
		<pubDate>Mon, 15 Feb 2010 20:15:56 +0000</pubDate>
		<dc:creator><![CDATA[nico-pyright(c)]]></dc:creator>
				<category><![CDATA[Certificat]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[Web services]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Vous avez recu un certicat sous la forme texte suivante ? &#8212;&#8211;BEGIN CERTIFICATE&#8212;&#8211; [&#8230;]Plein de chiffres et de lettres[&#8230;] &#8212;&#8211;END CERTIFICATE&#8212;&#8211; &#8212;&#8211;BEGIN RSA PRIVATE KEY&#8212;&#8211; [&#8230;]Plein de chiffres et de lettres[&#8230;] &#8212;&#8211;END RSA PRIVATE KEY&#8212;&#8211; Il s&#8217;agit du format PEM sauf que votre IIS attend un .PFX ou un .CER &#8230; Comment créer un certificat à partir de ce texte ? Tout d&#8217;abord, il va falloir créer 2 fichiers textes, un contenant le certificat (de [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Vous avez recu un certicat sous la forme texte suivante ?</p>
<blockquote><p>&#8212;&#8211;BEGIN CERTIFICATE&#8212;&#8211;<br />
[&#8230;]Plein de chiffres et de lettres[&#8230;]<br />
&#8212;&#8211;END CERTIFICATE&#8212;&#8211;</p>
<p>&#8212;&#8211;BEGIN RSA PRIVATE KEY&#8212;&#8211;<br />
[&#8230;]Plein de chiffres et de lettres[&#8230;]<br />
&#8212;&#8211;END RSA PRIVATE KEY&#8212;&#8211;</p></blockquote>
<p>Il s&rsquo;agit du format <a href="http://en.wikipedia.org/wiki/Privacy_Enhanced_Mail">PEM </a><br />
sauf que votre IIS attend un <a href="http://en.wikipedia.org/wiki/PKCS12">.PFX</a> ou un .CER &#8230; </p>
<p>Comment créer un certificat à partir de ce texte ?</p>
<p><span id="more-119"></span></p>
<p>Tout d&rsquo;abord, il va falloir créer 2 fichiers textes, un contenant le certificat (de &#8212;&#8211;BEGIN CERTIFICATE&#8212;&#8211; à &#8212;&#8211;END CERTIFICATE&#8212;&#8211;) et un autre contenant la clé privée (de &#8212;&#8211;BEGIN RSA PRIVATE KEY&#8212;&#8211; à &#8212;&#8211;END RSA PRIVATE KEY&#8212;&#8211;).</p>
<p>Ensuite grâce à <a href="http://www.openssl.org/">openssl</a> &#8211; et notamment <a href="http://www.slproweb.com/products/Win32OpenSSL.html">l&rsquo;exécutable win32</a> -, on pourra utiliser la commande : </p>
<blockquote><p>openssl pkcs12 -export -out moncertficat.p12 -in certificat.txt -inkey cle.txt</p></blockquote>
<p>Il ne restera plus qu&rsquo;à l&rsquo;importer dans la console MMC pour l&rsquo;utiliser.</p>
<p>Notez que j&rsquo;ai déjà rencontré des erreurs, par exemple une impossibilité de trouver la clé privée (unable to load private key) ou clé invalide (private key doesn&rsquo;t match with the certificate), vérifiez le format du fichier texte et recommencez la séparation en 2 fichiers si besoin avec un bon éditeur de texte.</p>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[IIS][WCF] Quelques infos (difficilement) trouvées sur le net pour configurer IIS7 et déployer des Web services WCF</title>
		<link>https://blog.developpez.com/nico-pyright/p8570/c/iis_wcf_quelques_infos_difficilement_tro</link>
		<comments>https://blog.developpez.com/nico-pyright/p8570/c/iis_wcf_quelques_infos_difficilement_tro#comments</comments>
		<pubDate>Fri, 29 Jan 2010 19:11:00 +0000</pubDate>
		<dc:creator><![CDATA[nico-pyright(c)]]></dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[WCF]]></category>
		<category><![CDATA[Web services]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Après quelques jours à arracher les cheveux de mon navigateur préféré, voici quelques infos trouvées qui j&#8217;espère vous aideront en cas de difficultés à configurer IIS7 pour déployer des WebServices dans un environnement de production. Une des premières choses est qu&#8217;on voit beaucoup de choses sur le net et dans les livres avec du localhost partout. Jamais de conditions réelles&#8230; Comment fait-on alors quand on a une ip publique ? ou un nom de domaine [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Après quelques jours à arracher les cheveux de mon navigateur préféré, voici quelques infos trouvées qui j&rsquo;espère vous aideront en cas de difficultés à configurer IIS7 pour déployer des WebServices dans un environnement de production.</p>
<p>Une des premières choses est qu&rsquo;on voit beaucoup de choses sur le net et dans les livres avec du localhost partout. Jamais de conditions réelles&#8230;</p>
<p>Comment fait-on alors quand on a une ip publique ? ou un nom de domaine ?</p>
<p>1) De ma maigre expérience, ca devient tout de suite plus facile avec un nom de domaine&#8230; Dans ce cas, il ne faut pas oublier de le renseigner dans les bindings du site :</p>
<p><a href="http://blog.developpez.com/media/140/WindowsLiveWriter/IISWCFQuelquesinfosdifficilementtrouvess_813B/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://blog.developpez.com/media/140/WindowsLiveWriter/IISWCFQuelquesinfosdifficilementtrouvess_813B/image_thumb.png" width="364" height="199" /></a> </p>
<p>2) Et si on doit faire de l&rsquo;https ?</p>
<p>Ajoutons un binding https me direz vous ? </p>
<p><a href="http://blog.developpez.com/media/140/WindowsLiveWriter/IISWCFQuelquesinfosdifficilementtrouvess_813B/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://blog.developpez.com/media/140/WindowsLiveWriter/IISWCFQuelquesinfosdifficilementtrouvess_813B/image_thumb_1.png" width="353" height="190" /></a>  </p>
<p>Oui, mais ce n&rsquo;est pas suffisant.</p>
<p>On ne peut pas renseigner le nom du domaine &#8230; Dans ce cas, il va falloir avoir recourt à une formule magique en ligne de commande :</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; height: 32px; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> C:\Windows\System32\inetsrv&gt;appcmd.exe set site /site.name:<span style="color: #006080">&quot;MonSite&quot;</span> /+bindings.[protocol=<span style="color: #006080">'https'</span>,bindingInformation=<span style="color: #006080">'*:443:mon.domaine.com'</span>]</pre>
</p></div>
</div>
<p>on devra ensuite ouvrir le fichier C:\Windows\System32\inetsrv\config\applicationHost.config et supprimer la ligne : </p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; height: 38px; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> <span style="color: #0000ff">&lt;</span><span style="color: #800000">binding</span> <span style="color: #ff0000">protocol</span><span style="color: #0000ff">=&quot;https&quot;</span> <span style="color: #ff0000">bindingInformation</span><span style="color: #0000ff">=&quot;*:443:&quot;</span> <span style="color: #0000ff">/&gt;</span></pre>
</p></div>
</div>
<p>3) Si vous travaillez avec des certificats, n’oubliez pas d’accorder les droits adéquats à ceux-ci dans la console MMC : (manage private keys)</p>
<p><a href="http://blog.developpez.com/media/140/WindowsLiveWriter/IISWCFQuelquesinfosdifficilementtrouvess_813B/image_6.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://blog.developpez.com/media/140/WindowsLiveWriter/IISWCFQuelquesinfosdifficilementtrouvess_813B/image_thumb_2.png" width="427" height="143" /></a> </p>
<p>Il faut qu&rsquo;ils correspondent au process défini dans la configuration avancée de l&rsquo;application pool, disons NetworkService : </p>
<p><a href="http://blog.developpez.com/media/140/WindowsLiveWriter/IISWCFQuelquesinfosdifficilementtrouvess_813B/image_8.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://blog.developpez.com/media/140/WindowsLiveWriter/IISWCFQuelquesinfosdifficilementtrouvess_813B/image_thumb_3.png" width="376" height="92" /></a> </p>
<p>4) Si le wsdl génère le nom de la machine à la place du nom du domaine, normalement le binding avec nom de domaine défini au 1) suffit.</p>
<p>Si ca ne suffit pas, une solution est d’utiliser l’attribut factory du fichier svc et d’instancier un custom service host avec quelque chose du genre :</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> &lt;%@ ServiceHost Language=<span style="color: #006080">&quot;C#&quot;</span> Debug=<span style="color: #006080">&quot;true&quot;</span> Service=<span style="color: #006080">&quot;Service...&quot;</span> Factory=<span style="color: #006080">&quot;CustomHostFactory&quot;</span> %&gt;</pre>
</div>
</div>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">class</span> CustomHostFactory : System.ServiceModel.Activation.ServiceHostFactory</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span> {</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3">   3:</span>     <span style="color: #0000ff">protected</span> <span style="color: #0000ff">override</span> ServiceHost CreateServiceHost(Type serviceType, Uri[] baseAddresses)</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4">   4:</span>     {</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5">   5:</span>         CustomHost customServiceHost = <span style="color: #0000ff">new</span> CustomHost(serviceType, baseAddresses);</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6">   6:</span>         <span style="color: #0000ff">return</span> customServiceHost;</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7">   7:</span>     }</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8">   8:</span> }</pre>
</p></div>
</div>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">class</span> CustomHost : ServiceHost</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span> {</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3">   3:</span>     <span style="color: #0000ff">public</span> CustomHost(Type serviceType, <span style="color: #0000ff">params</span> Uri[] baseAddresses)</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4">   4:</span>&#160; </pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5">   5:</span>         : <span style="color: #0000ff">base</span>(serviceType, GetBaseAddresses())</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6">   6:</span>     { }</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7">   7:</span>&#160; </pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8">   8:</span>&#160; </pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum9">   9:</span>     <span style="color: #0000ff">private</span> <span style="color: #0000ff">static</span> Uri[] GetBaseAddresses()</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum10">  10:</span>     {</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum11">  11:</span>         List&lt;Uri&gt; addresses = <span style="color: #0000ff">new</span> List&lt;Uri&gt;();</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum12">  12:</span>         AddBaseAddress(addresses);</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum13">  13:</span>         <span style="color: #0000ff">return</span> addresses.ToArray();</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum14">  14:</span>     }</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum15">  15:</span>&#160; </pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum16">  16:</span>     <span style="color: #0000ff">private</span> <span style="color: #0000ff">static</span> <span style="color: #0000ff">void</span> AddBaseAddress(List&lt;Uri&gt; addresses)</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum17">  17:</span>     {</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum18">  18:</span>&#160; </pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum19">  19:</span>         <span style="color: #0000ff">string</span> address = <span style="color: #006080">&quot;http://mon.domaine.com/MonService.svc&quot;</span>;</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum20">  20:</span>         addresses.Add(<span style="color: #0000ff">new</span> Uri(address));</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum21">  21:</span>     }</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum22">  22:</span> }</pre>
</p></div>
</div>
<p>Par contre, tout ceci ne fonctionnera correctement qu’avec le port 80 … En effet, avec un autre port, le wsdl généré contiendra le numéro de port. S’il est ouvert depuis l’extérieur, tout va bien …</p>
<p>5) Sinon, on se retrouve dans une configuration classique de déploiement.</p>
<p>Un client accède à un nom de domaine : <a href="http://mon.domaine.com">http://mon.domaine.com</a>, une translation NAT est faite pour aller sur une machine interne <a href="http://MaMachine">http://MaMachine</a>, et redirigée vers un port précis : <a href="http://MaMachine:12345">http://MaMachine:12345</a>.</p>
<p>Un Web service est hébergé sur cette machine.</p>
<p>Dans ce cas, le wsdl généré contient des adresses avec le numéro de port, qui est bloqué. Qu’à cela ne tienne, on va définir explicitement que l’adresse du endpoint (dans le web config ou dans la factory) est l’adresse sans le numéro de port. Et là, une magnifique erreur, du genre :</p>
<p><i>No protocol binding matches the given address &lsquo;http://mon.domaine.com:12345/MonService.svc&rsquo;. Protocol bindings are configured at the Site level in IIS or WAS configuration.</i></p>
<p>Pour résoudre ce bug, j’ai nommé le correctif : <a title="http://support.microsoft.com/kb/977420" href="http://support.microsoft.com/kb/977420">http://support.microsoft.com/kb/977420</a>. Notez qu’il vous faudra installer le framework 3.5 SP1. (attention, différents correctifs existent en fonction des versions de son windows).</p>
<p>Et voilà pour ces quelques infos. En espérant que ca puisse vous aider.</p>
<p></p>
<p>Loin de moi l’idée de vous faire croire que je suis un expert IIS, au contraire. Je tiens à préciser que d’une manière générale, les informations sont plutôt difficile à trouver. Mais je tiens quand même à reconnaitre que les progrès entre IIS6 et IIS7 sont indéniables, rien que dans la gestion des utilisateurs … </p>
<p>Gageons que la prochaine version d’IIS sera encore plus complète.</p>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
