TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Bo Wiklund
NA
23
0
Web Service and loading images from/to a Web Site
Oct 27 2003 4:21 PM
I have created an XML Web Service that interacts with Web Site (a Web Shop). I want to upload (and download) images from the Web Site to the Web Service client. The problem is that File.OpenRead("myURI") is not supporting URI as parameter in the server. Otherwise it works OK (with a normal filename). Is there any method to access a file through the browser and stream it like with a normal file access? My code is something like: (It works if "myURI" is a local folder) Client (invoke): byte[] result = new Byte[]{}; result = wsInvoke.sendBytesToClient("myURI"); Stream outputStream = File.OpenWrite("myLocalFolder"); outputStream.Write(result,0,result.Length); outputStream.Close(); Server (response): Stream inputStream = File.OpenRead("myURI"); byte[] byteArray = new byte[inputStream.Length]; inputStream.Read(byteArray,0,(int)inputStream.Length); inputStream.Close(); return byteArray;
Reply
Answers (
0
)
Can't change Autolog Property
using existing assemblies in a WS