<?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>Florent Clairambault &#187; WebService</title>
	<atom:link href="http://florent.clairambault.fr/tag/webservice/feed" rel="self" type="application/rss+xml" />
	<link>http://florent.clairambault.fr</link>
	<description></description>
	<lastBuildDate>Sat, 04 Feb 2012 19:56:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4-alpha-19719</generator>
		<item>
		<title>MapPoint WebService authentification with Mono</title>
		<link>http://florent.clairambault.fr/mappoint-webservice-authentification-with-mono?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mappoint-webservice-authentification-with-mono</link>
		<comments>http://florent.clairambault.fr/mappoint-webservice-authentification-with-mono#comments</comments>
		<pubDate>Mon, 19 May 2008 11:39:59 +0000</pubDate>
		<dc:creator>Florent Clairambault</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[.Net]]></category>
		<category><![CDATA[Mono]]></category>
		<category><![CDATA[WebService]]></category>

		<guid isPermaLink="false">http://florent.clairambault.com/?p=7</guid>
		<description><![CDATA[Recently, I was faced with a little problem. I built a .net program which calls a MapPoint WebService. It worked fine on Windows but failed on Mono/Linux with a &#8220;401 Unauthorized&#8221; error. As it really made no sense, I decided to listen to the network communication. It did it with wireshark on my computer and [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, I was faced with a little problem. I built a .net program which calls a MapPoint WebService. It worked fine on Windows but failed on Mono/Linux with a &#8220;401  Unauthorized&#8221; error.</p>
<p>As it really made no sense, I decided to listen to the network communication. It did it with wireshark on my computer and tcpdump on the Mono/Linux host. And by looking at the header of the HTTP request, I noticed they were some slight differences.</p>
<p>I solved the problem by specifying some credentials and by using a particular host name for these credentials, here is the code :</p>

<div class="wp_codebox"><table><tr id="p72"><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code" id="p7code2"><pre class="csharp" style="font-family:monospace;">var cred <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> <span style="color: #000000;">System.<span style="color: #0000FF;">Net</span></span><span style="color: #008000;">.</span><span style="color: #0000FF;">NetworkCredential</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;---user---&quot;</span>, <span style="color: #666666;">&quot;---password---&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
_credCache <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> CredentialCache<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
_credCache<span style="color: #008000;">.</span><span style="color: #0000FF;">Add</span><span style="color: #008000;">&#40;</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> Uri<span style="color: #008000;">&#40;</span> <span style="color: #666666;">&quot;http://findv3.staging.mappoint.net&quot;</span> <span style="color: #008000;">&#41;</span>, <span style="color: #666666;">&quot;Digest&quot;</span>, cred <span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
_finder <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> FindServiceSoap<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
_finder<span style="color: #008000;">.</span><span style="color: #0000FF;">Credentials</span> <span style="color: #008000;">=</span> _credCache<span style="color: #008000;">;</span>
_finder<span style="color: #008000;">.</span><span style="color: #0000FF;">PreAuthenticate</span> <span style="color: #008000;">=</span> <span style="color: #0600FF; font-weight: bold;">true</span><span style="color: #008000;">;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://florent.clairambault.fr/mappoint-webservice-authentification-with-mono/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 1/17 queries in 0.005 seconds using disk: basic
Object Caching 360/381 objects using disk: basic

Served from: florent.clairambault.fr @ 2012-02-04 23:12:59 -->
