Hi all! We are writing a Silverlight 3 management interface for our appliance. A soap client request is made every 5 seconds to update the on-screen runtime values. But with every request Silverlight is writing an XCP*.tmp file of 20.971.520 bytes (20MB!) to
the temp folder. Can somebody please explain why Silverlight 3 is creating these huge XCP tmp files in the %temp% folder? And perhaps provide a solution to prevent this from happening? Regards, Erik
For the safety consideration, Silverlight cannot access to the client folders/drivers except the
Isolated Storage. Its default size 1M and we can extend it.
Best regards,
Jonathan
Please mark the replies as answers if they help or unmark if not.
If you have any feedback about my replies, please contact msdnmg@microsoft.com.
Microsoft One Code Framework
I don't thing this has anything to do with Isolated Storage or accessing client folders/drives. When creating a soap request and setting the MaxBufferSize of the Binding to a large value (ex. 20MB) causes Silverlight to write XCP*.tmp files in the %temp% folder
for each and every request without cleaning it up until the Silverlight control closes. So if you have 100 requests to update your runtime values UI it easily eats up your hard drive space. Does someone have a solution?
I am making frequent SOAP calls in the same way for the same reason as you and I'm seeing the same problem. I am not setting MaxBufferSize to a large value but I am setting
MaxReceivedMessageSize on the binding to 1024000.
The idea that a SOAP call in a silverlight app can chew up that much disk space on the users machine (completely ignoring any browser temporary file cache limits) is pretty scary. I can't believe someone from Microsoft hasn't come back with
more information. The replies to date have not been helpful.
I did find one workaround that helps. I was creating a binding and using it to initialize the SoapClient object making the calls. I would then reuse the SoapClient object. I found that destroying the SoapClient object and recreating it for each call
instead of reusing it causes the tmp files to eventually be destroyed, probably as the SoapClient object or the binding is garbage collected.
Hi Friends, I am Cine and I have read your site in a very deep and I would like to appreciate you on this brilliant effort. You have provided some thing so much different that I can't have words for thanks.
I thank you for giving these tips to the readers. There are a lot of people who are not familiar with these kind of things. I know many of us will appreciate this article. Thanks for sharing this.
erikloman
0 Points
4 Posts
Silverlight 3 creates a lot of XCP temp files (20MB each)
Oct 12, 2009 08:29 PM | LINK
Jonathan She...
All-Star
50156 Points
4951 Posts
Microsoft
Re: Silverlight 3 creates a lot of XCP temp files (20MB each)
Oct 19, 2009 10:24 AM | LINK
Hi Erikloman,
For the safety consideration, Silverlight cannot access to the client folders/drivers except the Isolated Storage. Its default size 1M and we can extend it.
Best regards,
Jonathan
If you have any feedback about my replies, please contact msdnmg@microsoft.com.
Microsoft One Code Framework
erikloman
0 Points
4 Posts
Re: Silverlight 3 creates a lot of XCP temp files (20MB each)
Oct 19, 2009 05:35 PM | LINK
dgonth
Member
4 Points
4 Posts
Re: Silverlight 3 creates a lot of XCP temp files (20MB each)
Nov 11, 2009 07:17 PM | LINK
I am making frequent SOAP calls in the same way for the same reason as you and I'm seeing the same problem. I am not setting MaxBufferSize to a large value but I am setting MaxReceivedMessageSize on the binding to 1024000.
The idea that a SOAP call in a silverlight app can chew up that much disk space on the users machine (completely ignoring any browser temporary file cache limits) is pretty scary. I can't believe someone from Microsoft hasn't come back with more information. The replies to date have not been helpful.
I did find one workaround that helps. I was creating a binding and using it to initialize the SoapClient object making the calls. I would then reuse the SoapClient object. I found that destroying the SoapClient object and recreating it for each call instead of reusing it causes the tmp files to eventually be destroyed, probably as the SoapClient object or the binding is garbage collected.
c1johnj
Member
2 Points
1 Post
Re: Silverlight 3 creates a lot of XCP temp files (20MB each)
Nov 12, 2009 07:22 PM | LINK
Another workaround is to call GC.Collect() directly at the end of your async event handler. This will clean up the previously created temp file.
phobos7
Member
4 Points
8 Posts
Re: Silverlight 3 creates a lot of XCP temp files (20MB each)
Feb 05, 2010 12:46 PM | LINK
I've tested this, reproduced the problem, and proven that calling:
does appear to clear up the XCP files.
I've written up my brief findings in a blog post.
jony11
Member
2 Points
1 Post
Re: Silverlight 3 creates a lot of XCP temp files (20MB each)
Jul 14, 2010 10:01 AM | LINK
Hi Friends, I am Cine and I have read your site in a very deep and I would like to appreciate you on this brilliant effort. You have provided some thing so much different that I can't have words for thanks.
Poonamsingh
Member
2 Points
1 Post
Re: Silverlight 3 creates a lot of XCP temp files (20MB each)
Dec 29, 2011 05:13 AM | LINK
I thank you for giving these tips to the readers. There are a lot of people who are not familiar with these kind of things. I know many of us will appreciate this article. Thanks for sharing this.
Furniture Shops In Bangalore | Furniture Stores In Bangalore