Skip to main content

Microsoft Silverlight

Answered Question AssemblyPart.Load needs a seekable streamRSS Feed

(0)

br1
br1

Member

Member

4 points

25 Posts

AssemblyPart.Load needs a seekable stream

Silverlight crashes when calling AssemblyPart.Load with a stream with CanSeek==false. This should be documented or work-arounded.

ksleung
ksleung

Contributor

Contributor

5366 points

1,028 Posts

Answered Question

Re: AssemblyPart.Load needs a seekable stream

The workaround is to create a memory stream, read the whole non-seekable stream into it, and call AssemblyPart.Load() with the memory stream.  I can see why AssemblyPart.Load() needs a seekable stream, and even if SL supports non-seekable, it will be done by doing some internal buffering using a similar mechanism anyway...

But I agree with your point about documentation...  SL needs better documentation, as well as better messages when exception happens.

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities