VBAHole22 Posted December 8, 2003 Posted December 8, 2003 How many different kinds of data can a VB.NET windows service accept? I have written those that accept simple things like int and string and double. And I have one that accepts a dataset. But what are some other types? What if I want to pass a whole file, like a small text file or csv? Quote Wanna-Be C# Superstar
Mehyar Posted December 9, 2003 Posted December 9, 2003 I believe you can, I dont know what you mean by accept, but I have accessed and parsed several files (text,xml, etc ..) using a windows service. Quote Dream as if you'll live forever, live as if you'll die today
VBAHole22 Posted December 10, 2003 Author Posted December 10, 2003 Okay cool. So you have a text file, say text.txt, and you want to send it across time and space to a web service. How do you go about that? <Web Method>_ Public Function GetFile as File Quote Wanna-Be C# Superstar
Administrators PlausiblyDamp Posted December 10, 2003 Administrators Posted December 10, 2003 Easiest way is read it into either a string or a byte array depending on it's contents and return that to the client. Saving the file to disk (or whatever else) is then the clients problem. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Mehyar Posted December 11, 2003 Posted December 11, 2003 You cannot return Files through a web service You can do as PlausiblyDamp told you if you are talking about small files, but I think if you are planning to transfer huge files then you are better of with downloading or uploading files (FTP for example might do you good), However , to use FTP you will have to use third party utilities. It is not directly supported in .NET Hope this helps... Quote Dream as if you'll live forever, live as if you'll die today
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.