Hi
My application consists of a database, WebService and web application. The
web application reads and writes data to the database via the WebService. I
also want to be able to upload/download files via the WebService because my
WebService handles security.
My question is - how can this best be done? After some googleing a solution
I found was to stream bytes in a method like this:
<WebMethod()> _
Public Function UploadFile(ByVal docbinaryarray As Byte(), ByVal docname
As String) As Boolean
Dim strdocPath As String
strdocPath = "C:\Inetpub\wwwroot\FileUploadDownloadSvc\temp \" +
docname
Dim objfilestream = New System.IO.FileStream(strdocPath,
System.IO.FileMode.Create, System.IO.FileAccess.ReadWrite)
objfilestream.Write(docbinaryarray, 0, docbinaryarray.Length)
objfilestream.Close()
Return True
End Function
Will this handle large files? Is this the best way to do it or is there
another better solution?
Many thanks!
Julia Beresford