<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Suddenelfilio's Weblog &#187; .net Compact Framework</title>
	<atom:link href="http://blog.suddenelfilio.net/category/net-compact-framework/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.suddenelfilio.net</link>
	<description>Passionate about .net</description>
	<lastBuildDate>Tue, 23 Feb 2010 15:31:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='blog.suddenelfilio.net' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/6246d2f8813362b3e258dd7b00ed3a41?s=96&#038;d=http://s2.wp.com/i/buttonw-com.png</url>
		<title>Suddenelfilio's Weblog &#187; .net Compact Framework</title>
		<link>http://blog.suddenelfilio.net</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://blog.suddenelfilio.net/osd.xml" title="Suddenelfilio&#039;s Weblog" />
	<atom:link rel='hub' href='http://blog.suddenelfilio.net/?pushpress=hub'/>
		<item>
		<title>Compact framework WCF, Disco files, netcfsvcutil</title>
		<link>http://blog.suddenelfilio.net/2008/11/06/compact-framework-wcf-disco-files-netcfsvcutil/</link>
		<comments>http://blog.suddenelfilio.net/2008/11/06/compact-framework-wcf-disco-files-netcfsvcutil/#comments</comments>
		<pubDate>Thu, 06 Nov 2008 14:24:25 +0000</pubDate>
		<dc:creator>suddenelfilio</dc:creator>
				<category><![CDATA[.net 3.5]]></category>
		<category><![CDATA[.net Compact Framework]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[WCF]]></category>

		<guid isPermaLink="false">http://suddenelfilio.wordpress.com/2008/11/06/compact-framework-wcf-disco-files-netcfsvcutil/</guid>
		<description><![CDATA[When using the 3.5 version of the compact framework it is possible to connect with wcf services. This is because the CF 3.5 contains a limited subset of the wcf technology. There are several blog posts listing the wcf capabilities in CF e.g.: http://blogs.msdn.com/andrewarnottms/archive/2007/08/21/the-wcf-subset-supported-by-netcf.aspx We were researching for a mobile client to connect to a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.suddenelfilio.net&blog=1463725&post=164&subd=suddenelfilio&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>When using the 3.5 version of the compact framework it is possible to connect with wcf services. This is because the CF 3.5 contains a limited subset of the wcf technology. There are several blog posts listing the wcf capabilities in CF e.g.: <a href="http://blogs.msdn.com/andrewarnottms/archive/2007/08/21/the-wcf-subset-supported-by-netcf.aspx">http://blogs.msdn.com/andrewarnottms/archive/2007/08/21/the-wcf-subset-supported-by-netcf.aspx</a></p>
<p>We were researching for a mobile client to connect to a wcf service running at one of our servers. The requirement is that transport is secured by using HTTPS protocol. </p>
<p>The first problem was creating a client side proxy. Since the SvcUtil doesn’t work for the CF we had to look for an alternative. After some googling we found the netCFSvcUtil which is basically the same as the svcutil, but it generates a proxy specifically for CF. You can find it as part of the Power Toys for .NET Compact Framework 3.5. For more on this you can read <a href="http://64.233.183.104/search?q=cache:6BHoqVDFuz8J:blogs.msdn.com/andrewarnottms/archive/2007/09/13/calling-wcf-services-from-netcf-3-5-using-compact-wcf-and-netcfsvcutil-exe.aspx+netcfsvcutil&amp;hl=nl&amp;ct=clnk&amp;cd=2&amp;gl=be" target="_blank">this excellent blog post by Andrew Arnott</a></p>
<p>When you get this generated client proxy there is another problem. It expects that you are using HTTP. Since we need HTTP<strong>S </strong>that’s a problem. Thanks to <a href="http://developers.de/blogs/damir_dobric/archive/2008/08/23/creating-default-bindings-on-compact-framework.aspx" target="_blank">Damir Dobric</a> we found how to make the proxy use https instead of http.</p>
<pre>System.ServiceModel.Channels.CustomBinding binding = <span style="color:#0000ff;">new</span>
    System.ServiceModel.Channels.CustomBinding();
binding.Elements.Add(<span style="color:#0000ff;">new</span> System.ServiceModel.Channels.TextMessageEncodingBindingElement
   (System.ServiceModel.Channels.MessageVersion.Soap11, System.Text.Encoding.UTF8));
System.ServiceModel.Channels.HttpsTransportBindingElement https =
   <span style="color:#0000ff;">new</span> System.ServiceModel.Channels.HttpsTransportBindingElement(); </pre>
<pre>https.RequireClientCertificate = <span style="color:#0000ff;">false</span>;
binding.Elements.Add(https);</pre>
<pre>&nbsp;</pre>
<p>This way your client proxy is now HTTPS enabled. </p>
<p>&nbsp;</p>
<p>Another problem we had was that the disco file was downloaded from the “wrong” location. We have a wildcard certificate in place for our HTTPS like *.domain.com. We were accessing the service using <a href="https://laptop1.domain.com/wcf/service.svc">https://laptop1.domain.com/wcf/service.svc</a>. Although this url works fine when we browsed to it, there was an issue when we tried to generate a client proxy. It seemed that both svcutil as netcfsvcutil were trying to download the DISCO file from <a href="https://laptop1/wcf/service.svc?Disco">https://laptop1/wcf/service.svc?Disco</a>. When we browsed to this link it worked just fine. The problem is in the url and the wildcard certificate. Since the disco url didn’t include the domain.com part in its url the utils were not able to establish a trust relationship over ssl with the web server. This is perfectly normal since it does not correspond with our wildcard certificate. </p>
<p>The solution is to update the https binding in IIS by giving it a host header. Now this is something you can’t do in the IIS control panel. There are 2 ways of doing this: Using <a href="http://blogs.msdn.com/drnick/archive/2008/07/09/configuring-ssl-host-headers.aspx" target="_blank">scripting</a> or using the metabase explorer that can be found in the IIS 6.0 resource toolkit<a href="http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/993a8a36-5761-448f-889e-9ae58d072c09.mspx?mfr=true" target="_blank">http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/993a8a36-5761-448f-889e-9ae58d072c09.mspx?mfr=true</a></p>
<p>&nbsp;</p>
<p>A last advice don’t fall into the same trap by thinking that a wshttpbinding is required to do HTTPS, it’s perfectly possible by using a basichttpbinding where the security mode is set to transport.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/suddenelfilio.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/suddenelfilio.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/suddenelfilio.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/suddenelfilio.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/suddenelfilio.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/suddenelfilio.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/suddenelfilio.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/suddenelfilio.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/suddenelfilio.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/suddenelfilio.wordpress.com/164/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.suddenelfilio.net&blog=1463725&post=164&subd=suddenelfilio&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.suddenelfilio.net/2008/11/06/compact-framework-wcf-disco-files-netcfsvcutil/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d2a314ead18f2575eff4c6880639dc3a?s=96&#38;d=" medium="image">
			<media:title type="html">suddenelfilio</media:title>
		</media:content>
	</item>
		<item>
		<title>FileBrowser Control For Windows Mobile 6.0 Released</title>
		<link>http://blog.suddenelfilio.net/2007/05/12/filebrowser-control-for-windows-mobile-60-released/</link>
		<comments>http://blog.suddenelfilio.net/2007/05/12/filebrowser-control-for-windows-mobile-60-released/#comments</comments>
		<pubDate>Sat, 12 May 2007 22:12:08 +0000</pubDate>
		<dc:creator>suddenelfilio</dc:creator>
				<category><![CDATA[.net 2.0]]></category>
		<category><![CDATA[.net Compact Framework]]></category>
		<category><![CDATA[Visual Studio .Net 2005]]></category>

		<guid isPermaLink="false">http://suddenelfilio.wordpress.com/2007/05/12/filebrowser-control-for-windows-mobile-60-released/</guid>
		<description><![CDATA[I&#8217;ve released the source code of the FileBrowser Control. Check the projects section!<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.suddenelfilio.net&blog=1463725&post=85&subd=suddenelfilio&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://suddenelfilio.net/wp/wp-content/uploads/2007/05/WindowsLiveWriter/FileBrowserControlForWindowsMo.0Released_28E/FileBrowser%5B2%5D.jpg"><img align="bottom" style="border:0 none;" src="http://suddenelfilio.net/wp/wp-content/uploads/2007/05/WindowsLiveWriter/FileBrowserControlForWindowsMo.0Released_28E/FileBrowser_thumb.jpg" /></a></p>
<div align="center">I&#8217;ve released the source code of the FileBrowser Control. Check the projects section!</div>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/suddenelfilio.wordpress.com/85/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/suddenelfilio.wordpress.com/85/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/suddenelfilio.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/suddenelfilio.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/suddenelfilio.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/suddenelfilio.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/suddenelfilio.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/suddenelfilio.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/suddenelfilio.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/suddenelfilio.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/suddenelfilio.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/suddenelfilio.wordpress.com/85/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.suddenelfilio.net&blog=1463725&post=85&subd=suddenelfilio&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.suddenelfilio.net/2007/05/12/filebrowser-control-for-windows-mobile-60-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d2a314ead18f2575eff4c6880639dc3a?s=96&#38;d=" medium="image">
			<media:title type="html">suddenelfilio</media:title>
		</media:content>

		<media:content url="http://suddenelfilio.net/wp/wp-content/uploads/2007/05/WindowsLiveWriter/FileBrowserControlForWindowsMo.0Released_28E/FileBrowser_thumb.jpg" medium="image" />
	</item>
	</channel>
</rss>