473,387 Members | 1,588 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Issue with returning MemoryStream from WCF service method

I have WCF application. In my service there is method..

Expand|Select|Wrap|Line Numbers
  1. [OperationContract]
  2. Stream GetStream()
  3. {
  4. return new FileInfo("....").OpenRead();
  5. }
But when i use this method in my client and want to get Length property I got the following exception..

"The specified method is not supported".
Jun 1 '10 #1
1 3903
Plater
7,872 Expert 4TB
I am not sure you can pass Streams through network/service calls like that due to the nature of streams.
You may need to read the data into a byte[] first?
Jun 1 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: SQLReporter | last post by:
Hi, I am trying to access a webservice method from a vbscript. I have a .cs file generated for my webservice. I am not sure how to proceed from this point onwards.... I have tried generating .dll...
2
by: raymond | last post by:
Hi, Is it possible to create a proxy client class or a web service method by VS.NET without using wsdl? My stupid client is using a xml schema (.xsd) to describe all their web service methods...
1
by: Kalyani | last post by:
Hi, I have a web service method which needs to return a hashtable.But it gives errror as, The type System.Collections.Hashtable is not supported because it implements IDictionary. Is there...
0
by: dpp | last post by:
Hi I am calling a method of a .NET component from both win forms and web service applications. Strangly, it is working fine from win forms application, but when i call the same method (same...
1
by: Andy | last post by:
Hi, I created a sample web service and tried calling it from my VBScript. Here it is: ---------------------------------------------------------------------------- --------------- '-- Declare...
2
by: SM | last post by:
Hi, I have a web service method developed in .Net 1.1 where both http get and post protocols are enabled. the problem is that , when i access my web method from ie window like...
4
by: Abhi | last post by:
Hi All, I have a web service method which works fine when called from my local machine i.e. from localhost but when I publish the web services to a remote machine it throws an invalid cast soap...
0
by: Matteo | last post by:
Hi everybody, can anyone tell me how to pass an XMLNode to a web service method? While using structs as response of the web service all works fine, but there's a certain difficulty with XML...
4
by: Joseph Geretz | last post by:
I don't get it. A DataTable can't be returned, but a DataSet can. Yet a DataSet contains one or more DataTables. So obviously a DataTable must be serializable. So why not just let me return a...
1
by: vaskarbasak | last post by:
Hi All, 1.Why do we override the doGet and/or doPost methods instead of the service method? 2. We shouldn't synchronize the service method. but what will happen if we do so, except from the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.