<?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>..::\\ www.christiano.ch //::.. &#187; WCF</title>
	<atom:link href="http://www.christiano.ch/wordpress/tag/wcf/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.christiano.ch/wordpress</link>
	<description>christiano.ch blog - personal knowledge base, news, memoires et cetera</description>
	<lastBuildDate>Fri, 06 Jan 2012 15:28:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<meta xmlns="http://www.w3.org/1999/xhtml" name="robots" content="noindex,follow" />
		<item>
		<title>WCF: Configuring HTTP / HTTPS to host a System.ServiceModel WCF Service</title>
		<link>http://www.christiano.ch/wordpress/2010/03/11/wcf-configuring-http-https-to-host-a-system-servicemodel-wcf-service/</link>
		<comments>http://www.christiano.ch/wordpress/2010/03/11/wcf-configuring-http-https-to-host-a-system-servicemodel-wcf-service/#comments</comments>
		<pubDate>Thu, 11 Mar 2010 06:17:32 +0000</pubDate>
		<dc:creator>christian</dc:creator>
				<category><![CDATA[Windows Communication Foundation]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[WCF]]></category>

		<guid isPermaLink="false">http://www.christiano.ch/wordpress/2010/03/11/wcf-configuring-http-https-to-host-a-system-servicemodel-wcf-service/</guid>
		<description><![CDATA[Using Windows Communication Foundation (WCF) over HTTP either requires the use of a host, such as Internet Information Services (IIS), or manual configuration of the HTTP settings through the HTTP Server API. This post describes how to manually configure WCF &#8230; <a href="http://www.christiano.ch/wordpress/2010/03/11/wcf-configuring-http-https-to-host-a-system-servicemodel-wcf-service/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<table border="0" cellspacing="0" cellpadding="2" width="675">
<tbody>
<tr>
<td valign="top" width="546">Using Windows Communication Foundation (WCF) over HTTP either requires the use of a host, such as Internet Information Services (IIS), or manual configuration of the HTTP settings through the HTTP Server API. This post describes how to manually configure WCF when using HTTP and HTTPS.</td>
<td valign="top" width="128"><a href="http://www.christiano.ch/wordpress/wp-content/uploads/2010/03/Logo_WCF.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Logo_WCF" border="0" alt="Logo_WCF" src="http://www.christiano.ch/wordpress/wp-content/uploads/2010/03/Logo_WCF_thumb.png" width="160" height="80" /></a> </td>
</tr>
</tbody>
</table>
<p> <span id="more-891"></span>
<p>The tool used to configure HTTP settings depends on the operating system the computer is running. </p>
<p>When running Windows Server 2003 or Windows XP, use the <strong><em>HttpCfg.exe</em></strong> tool. With Windows Server 2003 this tool is installed. With Windows XP, you can download the tool at <a href="http://go.microsoft.com/fwlink/?LinkId=88606" target="_blank">Windows XP Service Pack 2 Support Tools</a>. For more information, see <a href="http://go.microsoft.com/fwlink/?LinkId=88605" target="_blank">Httpcfg Overview</a>. </p>
<p>With Windows Vista, you configure these settings with the <strong><em>Netsh.exe</em></strong> tool. </p>
<p>However, before you try running a Console Application or Windows Service application that hosts a WCF service with <em>basicHttpBinding </em>or <em>wsHttpBinding</em>, see <a title="MSDN article about &quot;Configuring HTTP and HTTPS&quot;" href="http://msdn.microsoft.com/en-us/library/ms733768.aspx">this MSDN article about &quot;Configuring HTTP and HTTPS&quot;</a>. If you are WAS-hosted or Web App-hosted, the urlacl entries are made on your behalf.</p>
<p>You can view the current entries with &quot;netsh http show urlacl&quot;. To make the changes, you&#8217;ll need to &quot;Run as Administrator&quot; when going into your Command Prompt.</p>
<p>I decided to use the following command: </p>
<p> <code>netsh http add urlacl url=http://+:8080/ user=\Everyone </code>
<p>You should adjust the ports and/or path as necessary for your situation:</p>
<p> <code>netsh http add urlacl url=http://+:8080/MyConsoleAppHostedService user=DOMAIN\user netsh http add urlacl url=http://+:8091/MyWindowsServiceHostedService user=\SYSTEM </code>
<p>to delete an urlacl do:</p>
<p> <code>delete urlacl url=https://*:8172/</code>
<p><strong></strong></p>
<p><strong>Links</strong></p>
<p><a title="Configuring HTTP and HTTPS on Microsoft MSDN" href="http://msdn.microsoft.com/en-us/library/ms733768.aspx" target="_blank">Configuring HTTP and HTTPS on Microsoft MSDN</a></p>
<p><a title="Netsh Commands for Hypertext Transfer Protocol on Microsoft Technet" href="http://technet.microsoft.com/en-us/library/cc725882%28WS.10%29.aspx" target="_blank">Netsh Commands for Hypertext Transfer Protocol on Microsoft Technet</a></p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=WCF%3A+Configuring+HTTP+%2F+HTTPS+to+host+a+System.ServiceModel+WCF+Service+http%3A%2F%2Fchristiano.ch%2Fwordpress%2F%3Fp%3D891" title="Post to Twitter"><img class="nothumb" src="http://www.christiano.ch/wordpress/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/intent/tweet?text=WCF%3A+Configuring+HTTP+%2F+HTTPS+to+host+a+System.ServiceModel+WCF+Service+http%3A%2F%2Fchristiano.ch%2Fwordpress%2F%3Fp%3D891" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.christiano.ch/wordpress/2010/03/11/wcf-configuring-http-https-to-host-a-system-servicemodel-wcf-service/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WCF Service: Adding a reference results in: System.BadImageFormatException</title>
		<link>http://www.christiano.ch/wordpress/2010/02/20/wcf-service-adding-a-reference-results-in-system-badimageformatexception/</link>
		<comments>http://www.christiano.ch/wordpress/2010/02/20/wcf-service-adding-a-reference-results-in-system-badimageformatexception/#comments</comments>
		<pubDate>Sat, 20 Feb 2010 12:57:24 +0000</pubDate>
		<dc:creator>christian</dc:creator>
				<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>
		<category><![CDATA[Service Reference]]></category>
		<category><![CDATA[WCF]]></category>
		<category><![CDATA[Winform]]></category>

		<guid isPermaLink="false">http://www.christiano.ch/wordpress/2010/02/20/wcf-service-adding-a-reference-results-in-system-badimageformatexception/</guid>
		<description><![CDATA[I have a Solution with a WCF Service Project, a few Classes in projects and a Winform Project. When trying to add a Service Reference from within the Winform Project i always got the Microsoft WCF Service Host &#8211; ‘System.BadImageFormatException: &#8230; <a href="http://www.christiano.ch/wordpress/2010/02/20/wcf-service-adding-a-reference-results-in-system-badimageformatexception/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<table border="0" cellspacing="0" cellpadding="2" width="675">
<tbody>
<tr>
<td valign="top" width="672">I have a Solution with a WCF Service Project, a few Classes in projects and a Winform Project. When trying to add a Service Reference from within the Winform Project i always got the <em>Microsoft WCF Service Host &#8211; ‘System.BadImageFormatException: Could not load file or assembly &#8216;file’..</em></td>
<td valign="top" width="10"><a href="http://www.christiano.ch/wordpress/wp-content/uploads/2010/02/Logo_Visual_Studio_20101.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Logo Microsoft Visual Studio" border="0" alt="Logo Microsoft Visual Studio" src="http://www.christiano.ch/wordpress/wp-content/uploads/2010/02/Logo_Visual_Studio_2010_thumb1.jpg" width="165" height="64" /></a> </td>
</tr>
</tbody>
</table>
<p> <span id="more-873"></span>
<p>An explanation or better, a direction I’ve found at <a href="http://www.atalasoft.com/kb/article.aspx?id=10165" target="_blank">Atalasoft Knowledgebase Q10165</a>.</p>
<p>I just changed the <strong><em>Platform target </em></strong>from <strong><em>x86 </em></strong>to <strong><em>Any CPU</em></strong>, recompiled both projects in the solution and since then, i can add a service reference. Who knows why.. you? drop me a mail/comment!</p>
<p><strong><em>Error Message i got: </em></strong></p>
<p><em>System.BadImageFormatException: Could not load file or assembly &#8216;file:///D:\Development\WCFTestService.SQL.2010\Media.Manager.SQL.Services.WCF\bin\Debug\Media.Manager.SQL.Services.WCF.exe&#8217; or one of its dependencies. An attempt was made to load a program with an incorrect format.     <br />File name: &#8216;file:///D:\Development\WCFTestService.SQL.2010\Media.Manager.SQL.Services.WCF\bin\Debug\Media.Manager.SQL.Services.WCF.exe&#8217;      <br />&#160;&#160; at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark&amp; stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)      <br />&#160;&#160; at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark&amp; stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks)      <br />&#160;&#160; at System.Reflection.Assembly.Load(AssemblyName assemblyRef)      <br />&#160;&#160; at Microsoft.Tools.SvcHost.ServiceHostHelper.LoadServiceAssembly(String svcAssemblyPath) </em></p>
<p><em>WRN: Assembly binding logging is turned OFF.     <br />To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.      <br />Note: There is some performance penalty associated with assembly bind failure logging.      <br />To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].</em></p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=WCF+Service%3A+Adding+a+reference+results+in%3A+System.BadImageFormatException+http%3A%2F%2Fchristiano.ch%2Fwordpress%2F%3Fp%3D873" title="Post to Twitter"><img class="nothumb" src="http://www.christiano.ch/wordpress/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/intent/tweet?text=WCF+Service%3A+Adding+a+reference+results+in%3A+System.BadImageFormatException+http%3A%2F%2Fchristiano.ch%2Fwordpress%2F%3Fp%3D873" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.christiano.ch/wordpress/2010/02/20/wcf-service-adding-a-reference-results-in-system-badimageformatexception/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VS.NET: Add Service Reference, Discover Service does not work</title>
		<link>http://www.christiano.ch/wordpress/2010/02/20/vs-net-add-service-reference-discover-service-does-not-work/</link>
		<comments>http://www.christiano.ch/wordpress/2010/02/20/vs-net-add-service-reference-discover-service-does-not-work/#comments</comments>
		<pubDate>Sat, 20 Feb 2010 12:35:01 +0000</pubDate>
		<dc:creator>christian</dc:creator>
				<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>
		<category><![CDATA[Service Reference]]></category>
		<category><![CDATA[WCF]]></category>

		<guid isPermaLink="false">http://www.christiano.ch/wordpress/2010/02/20/vs-net-add-service-reference-discover-service-does-not-work/</guid>
		<description><![CDATA[Trying to add a Service Reference in Visual Studio using the Discover Services in Solution and the Wizard can’t find the Service in the Solution? In order to use the &#34;Discover services in solution&#34; functionality, the service projects must be &#8230; <a href="http://www.christiano.ch/wordpress/2010/02/20/vs-net-add-service-reference-discover-service-does-not-work/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<table border="0" cellspacing="0" cellpadding="2" width="675">
<tbody>
<tr>
<td valign="top" width="668">Trying to add a Service Reference in Visual Studio using the Discover Services in Solution and the Wizard can’t find the Service in the Solution?</td>
<td valign="top" width="10"><a href="http://www.christiano.ch/wordpress/wp-content/uploads/2010/02/Logo_Visual_Studio_2010.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Logo Microsoft Visual Studio" border="0" alt="Logo Microsoft Visual Studio" src="http://www.christiano.ch/wordpress/wp-content/uploads/2010/02/Logo_Visual_Studio_2010_thumb.jpg" width="165" height="64" /></a> </td>
</tr>
</tbody>
</table>
<p> <span id="more-870"></span>
<p>In order to use the &quot;Discover services in solution&quot; functionality, the service projects must be based on one of the WCF project templates.   <br /> If you want to alter your existing project(s) so that they will be identified as projects containing WCF service(s), do the following:</p>
<ul>
<li> Right-click on the project in the Solution Explorer, and select Unload project</li>
<li>Right-click the project again (this time the node will end in (unavailable) ) and choose Edit xxxxx.csproj</li>
<li>In the first &lt;PropertyGroup&gt; section, add the following line:     <br /><b>&lt;ProjectTypeGuids&gt;{3D9AD99F-2412-4246-B90B-4EAA41C64699};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}&lt;/ProjectTypeGuids&gt;</b></li>
<li>Save and close the file </li>
<li>Reload the project by right-clicking it again and choose Reload.</li>
</ul>
<p>&#160; You should then be able to use the &quot;Discover services in solution&quot; functionality.</p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=VS.NET%3A+Add+Service+Reference%2C+Discover+Service+does+not+work+http%3A%2F%2Fchristiano.ch%2Fwordpress%2F%3Fp%3D870" title="Post to Twitter"><img class="nothumb" src="http://www.christiano.ch/wordpress/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/intent/tweet?text=VS.NET%3A+Add+Service+Reference%2C+Discover+Service+does+not+work+http%3A%2F%2Fchristiano.ch%2Fwordpress%2F%3Fp%3D870" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.christiano.ch/wordpress/2010/02/20/vs-net-add-service-reference-discover-service-does-not-work/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

