Re: Can someone help me



Chi wrote:
> what is the "unable to write data to the transport connection"

That's hard to say with no information about where you're getting it,
or under what situation.

> I use the oreilly , programming c#

So was this code taken directly from the book, or is that just what
you're learning from?

One thing which concerns me is that your OnReadComplete assumes that
whenever you've successfully read a piece of data, that it must contain
a complete filename. What happens if a long filename is sent which is
split over multiple packets, for instance?

Treat it as a stream of data, with no end other than when the
connection is dropped. If you need to signal one piece of data, either
have something saying when it's ended, or specify to start with how
long that piece of data is.

Jon

.



Relevant Pages

  • Re: AppendChunk method resulting in wrong data
    ... ' load binary contents of into stream ... ' assumes FileName is the name of an existing file ... ' set position to beginning of stream ... ' insert a row (or otherwise position record pointer) ...
    (microsoft.public.vb.database.ado)
  • Re: ImageList for Console Application
    ... I don't know if this will work with a stream from the resource..but here is ... public string WriteToTempFile ... System.IO.StreamWriter writer = null; ... fileName = System.IO.Path.GetTempFileName; ...
    (microsoft.public.dotnet.general)
  • Re: Browse for File Question - File Name Combo Box
    ... Doug Steele, Microsoft Access MVP ... We're running Windows XP here in our office. ... combo box to a specific filename through VBA code. ... so my programming options are ...
    (microsoft.public.access.modulesdaovba)
  • Re: HOWTO: Force the SaveAs Dialog Box For Downloads
    ... then stream the content to the client. ... >> The following code should work, according to Microsoft, but downloads ... >> Dim Contents ... >> FileName = Request.QueryString ...
    (microsoft.public.inetserver.asp.general)
  • Re: context.Response.OutputStream.Write(buffer, 0, count) questions
    ... And it worked except for the crazy filename in the dialog box. ... Dim size As PhotoSize = PhotoSize.Original ... Dim stream As IO.Stream = Nothing ... Dim count As Integer = stream.Read(buffer, 0, buffersize) ...
    (microsoft.public.dotnet.framework.aspnet)