<?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>Phil Leggetter - Real-Time Web Software and Technology Evangelist &#187; csharp</title>
	<atom:link href="http://www.leggetter.co.uk/tag/csharp/feed" rel="self" type="application/rss+xml" />
	<link>http://www.leggetter.co.uk</link>
	<description>Real-Time Web, Real-Time Data and Social Media Software and Technology Evangelist and Consultant</description>
	<lastBuildDate>Sun, 29 Jan 2012 05:00:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Silverlight uses XCP tmp files for Web Requests</title>
		<link>http://www.leggetter.co.uk/2010/02/05/silverlight-uses-xcp-tmp-files-for-web-requests.html</link>
		<comments>http://www.leggetter.co.uk/2010/02/05/silverlight-uses-xcp-tmp-files-for-web-requests.html#comments</comments>
		<pubDate>Fri, 05 Feb 2010 13:41:48 +0000</pubDate>
		<dc:creator>Phil Leggetter</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[csharp]]></category>
		<category><![CDATA[fiddler]]></category>
		<category><![CDATA[httpwebrequest]]></category>
		<category><![CDATA[silverlight]]></category>

		<guid isPermaLink="false">http://www.leggetter.co.uk/?p=691</guid>
		<description><![CDATA[<p>It would appear that the Silverlight runtime <a href="http://forums.silverlight.net/forums/p/135096/301578.aspx">creates a file named XCP*.tmp of around 20MB within a users %temp% directory</a> (where * can be replaced by random characters). This file would appear to be used in some way by the Silverlight runtime for web requests. If you refresh your Silverlight application then this file is [...]
Related posts:<ol>
<li><a href='http://www.leggetter.co.uk/2009/10/30/using-fiddler-to-trick-silverlight-into-allowing-a-crossdomain-web-request.html' rel='bookmark' title='Using Fiddler to trick Silverlight into allowing a crossdomain Web Request'>Using Fiddler to trick Silverlight into allowing a crossdomain Web Request</a></li>
<li><a href='http://www.leggetter.co.uk/2008/10/24/how-to-make-a-cross-domain-web-request-with-silverlight-2.html' rel='bookmark' title='How to make a cross domain web request with SilverLight 2'>How to make a cross domain web request with SilverLight 2</a></li>
<li><a href='http://www.leggetter.co.uk/2010/05/10/kwwika-silverlight-api-chat-example.html' rel='bookmark' title='Kwwika Silverlight API &#8211; Chat Example'>Kwwika Silverlight API &#8211; Chat Example</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>It would appear that the Silverlight runtime <a  href="http://forums.silverlight.net/forums/p/135096/301578.aspx">creates a file named XCP*.tmp of around 20MB within a users %temp% directory</a> (where * can be replaced by random characters). This file would appear to be used in some way by the Silverlight runtime for web requests. If you refresh your Silverlight application then this file is cleaned up. However, if your web request is interrupted in some way then the file can be left in your %temp% directory slowly but surely eating up disk space.</p>
<p>This is particularly noticeable and reproducible if you are using the HttpWebRequest class to stream data (for more <a  href="http://www.leggetter.co.uk/2010/01/03/msdn-e-book-and-podcast.html">information on streaming data from Silverlight you can listen to my podcast and read my article in a free MSDN book</a>). You can then reproduce the loss of connection using <a  href="http://www.fiddler2.com/fiddler2/">Fiddler</a> (which seriously rocks and is becoming more and more useful) by right-clicking on the streaming connection and selecting &#8220;Abort Session&#8221;.</p>
<div id="attachment_695" class="wp-caption alignnone" style="width: 539px"><a  href="http://www.leggetter.co.uk/wp-content/uploads/2010/02/FiddlerAbortSession.png" class="thickbox no_icon" rel="gallery-691" title="Fiddler - Abort Session"><img class="size-full wp-image-695 " title="Fiddler - Abort Session" src="http://www.leggetter.co.uk/wp-content/uploads/2010/02/FiddlerAbortSession.png" alt="" width="529" height="294" /></a><p class="wp-caption-text">Fiddler - Abort Session</p></div>
<p>The best solution to resolve this that I&#8217;ve found is to manually invoke the garbage collector whenever you detect the connection loss.</p>
<pre class="brush: csharp; title: ; notranslate">
// Manually invoke Garbage collection
GC.Collect();
</pre>
<p>Related posts:<ol>
<li><a href='http://www.leggetter.co.uk/2009/10/30/using-fiddler-to-trick-silverlight-into-allowing-a-crossdomain-web-request.html' rel='bookmark' title='Using Fiddler to trick Silverlight into allowing a crossdomain Web Request'>Using Fiddler to trick Silverlight into allowing a crossdomain Web Request</a></li>
<li><a href='http://www.leggetter.co.uk/2008/10/24/how-to-make-a-cross-domain-web-request-with-silverlight-2.html' rel='bookmark' title='How to make a cross domain web request with SilverLight 2'>How to make a cross domain web request with SilverLight 2</a></li>
<li><a href='http://www.leggetter.co.uk/2010/05/10/kwwika-silverlight-api-chat-example.html' rel='bookmark' title='Kwwika Silverlight API &#8211; Chat Example'>Kwwika Silverlight API &#8211; Chat Example</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.leggetter.co.uk/2010/02/05/silverlight-uses-xcp-tmp-files-for-web-requests.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced
Database Caching 23/42 queries in 0.027 seconds using disk: basic

Served from: www.leggetter.co.uk @ 2012-02-04 20:20:42 -->
