Not Found error downloading XAPs OOB

Topics: Prism v4 - Silverlight 4
Mar 29, 2011 at 11:47 PM

I've got an in and OOB Silverlight/Unity Prism app going.

I'm using Damain Schenkelman's CachingXapModuleTypeLoader to get the XAPs into ISO. (

My modules are loaded according to a webservice, and I have a scheme worked out that if the webservice tells me the version is greater than the one I have in ISO, I delete and re-download it. I also do this ALL the time if running localhost so that developers don't have to continually clear ISO to get their updated modules to run.

All this has been tested extensively and works just perfect In Browser.

OOB is a different story, I might not get any modules, or I might get them all. Generally, however, I am one or two short. Logging shows me that it is failing on a WebClient_OpenReadCompleted call with the error telling me the XAP was not found. The full name of the XAP is correct, and the message is bogus since the next time I run it may load.

Anybody have any thoughts on why I would be having trouble downloading XAPs to ISO while OOB? -- remember, IN browser it works perfectly, and sometimes does as well OOB... just not reliably.

Any help would be wonderful!



Mar 30, 2011 at 2:25 PM
Edited Mar 30, 2011 at 2:26 PM

Hi Dave,

We've been reported this previously in the following thread:

Intermittent NotFound error with Prism Modules +MEF when running Silverlight out of browser

After researching the issue further, we've found that the problem is related to Silverlight. When loading modules from a XAP file, Prism internally uses a WebClient request, which intermittently fails in certain scenarios in Silverlight OOB applications. We've reproduced this behavior when hosting the solution in Cassini, but you could try hosting it in IIS to see if you still experience this problem.

As a workaround, you could load your xap files sequentially (that is to say, download a xap file on-demand after the other has been loaded, and so forth), since the problem only seems to occur when processing two simultaneous WebClient requests.

I hope you find this helpful.

Guido Leandro Maliandi