WSE 2.0 DIME Streaming Problem

D

David Talbot

I'm attempting to use the WSE 2.0 DimeReader/DimeWriter extensions to
implmenent a file server service for importing/exporting large files from our
data warehousing application. Obviously transferring 500mb+ files can't be
done in huge chunks buffered entirely in memory therefore I came across WSE's
promised capabililty of DIME Streaming using DimeReader/DimeWriter.
Unfortunetely if I'm to believe google, I could well be the only person to
ever actually use this API, there is almost no information out there on it
and what does exist is incomplete.

The problem at this point is I'm using the function "WriteToDime" and
"ReadFromDime" as specificed in apparently the only article on the net about
it
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwse/html/wsedime.asp

But it doesn't say exactly when to call these. Before or after the web
service request? How? I've tried both and I'm persistently getting the
following error:
WSE343: The DimeWriter cannot write to the specified stream.

Google is no help, I've searched on both WSE343 and the error message itself
and nothing... Help?
 
G

Georgi Vajarov

I ran into the same problem so I reverted back to the good old HTTPRequest
object. I understand that this is not the approach u wanted to take but it
works - I am uploading 200M+ file to a web service using this method.
Here is a code snippet:

HttpWebRequest request = WebRequest.Create(_svc.Url) as HttpWebRequest;
request.Method = "POST";
request.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services
Client Protocol 1.1.4322.2032)";
request.Timeout = 4000000; // approx. 1hour
request.ContentType = "text/xml; charset=utf-8";
request.Headers.Add(action);
request.AllowWriteStreamBuffering = false;
request.SendChunked = true;

Of a particular interest are the last two properties of the request obj.
This will make sure you are submitting the chunks without buffering them
first.
Also, I added the following in the web.config file of the webservice:
<configuration>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,740
Latest member
AdolphBig6

Latest Threads

Top