thanks, that is one solution, but I found another solution using DIME
Main Topics
Browse All TopicsHi,
I am writing both the windows service and the web service.
The windows service is supposed to transfer a large amount of data to the web service. I would like to stream data if possible. How can I do this?
Both services will be written in VB.NET.
Thanks
K
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: samittPosted on 2004-09-20 at 12:46:03ID: 12105855
With an HTTP Post you could stream upto 1 GB of data. Here's an example ws Service******************* *******/
) )
.aspx"
)
tRequestSt ream())
etResponse Stream())
*******/
iles.Count & ": Files Received")
ng)
s)
/********************Windo
Private Sub btnPost_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPost.Click
Dim xDoc = New XmlDocument
Dim mywriter As StreamWriter
Try
Dim input, ip As String
Dim s_strURL As String
Dim strRead As StreamReader = File.OpenText("C:\ABC.txt"
Dim strR As StreamReader = File.OpenText("C:\ABC.txt"
s_strURL = "http://........./WebForm1
Dim bojRequest As HttpWebRequest = WebRequest.Create(s_strURL
bojRequest.Method = "POST"
'input = strRead.ReadToEnd
ip = strR.ReadToEnd
bojRequest.ContentLength = ip.Length
bojRequest.ContentType = "text/text"
Try
mywriter = New StreamWriter(bojRequest.Ge
input = strRead.ReadLine
While Not input Is Nothing
mywriter.Write(input)
input = strRead.ReadLine
End While
'mywriter.Write(input)
mywriter.Close()
Catch ex As Exception
MsgBox(ex.Message())
End Try
Dim objResponse As HttpWebResponse = bojRequest.GetResponse()
Dim sr As StreamReader
sr = New StreamReader(objResponse.G
result = sr.ReadToEnd
MsgBox(result)
Catch ex As Exception
MsgBox(ex.Message())
End Try
End Sub
/******************Web Form (or Service)******************
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
''Response.Write(Request.F
Dim str As Stream, strmContents As String
Dim counter, strLen, strRead As Integer
str = Request.InputStream
strLen = CInt(str.Length)
Dim strArr(strLen) As Byte
strRead = str.Read(strArr, 0, strLen)
For counter = 0 To strLen - 1
strmContents = strmContents & Chr(strArr(counter).ToStri
Next counter
Response.Write(strmContent
End Sub