[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Robin Prosch via .NET 247

6/5/2004 9:37:00 PM

Hi All

I am creating webservice DocManager to store documents.I have a method
public void Uploadfile(string path,Stream instream)
where path is path of file on server and stream is stream of document.
I am able to compile it but when i write code to access it in client and compile the client it gives compile time error
Cannot convert from system.io.stream to DocManager.Stream
I feel the webservice exposes a stream object which is contradicting with it.I chnaged the function to
public void Uploadfile(string path,System.IO.Stream instream)
but it is still giving same error.

I have made some changes in reference.cs file to remove conflict.
Now i am getting the error.
System.Web.HttpInputStream is inaccessible due to its protection level. Only public types can be processed

How to solve this issue if someone has idea?
or is there a better approach to pass a file to webservice?



--------------------------------
From: deepak Arjun

-----------------------
Posted by a user from .NET 247 (http://www.dotn...)

<Id>slDbwccmt0Og4iGl+MBgUA==</Id>
1 Answer

Jan Tielens

6/7/2004 7:55:00 AM

0

You may want to check out following article:
http://www.dotnetextreme.com/code/binary...

If you still have problems, can you post more of your code?

--
Greetz
Jan
________________
Read my weblog: http://weblogs.a...


"deepak Arjun via .NET 247" <anonymous@dotnet247.com> schreef in bericht
news:%23DT7SSzSEHA.2988@TK2MSFTNGP09.phx.gbl...
> Hi All
>
> I am creating webservice DocManager to store documents.I have a method
> public void Uploadfile(string path,Stream instream)
> where path is path of file on server and stream is stream of document.
> I am able to compile it but when i write code to access it in client and
compile the client it gives compile time error
> Cannot convert from system.io.stream to DocManager.Stream
> I feel the webservice exposes a stream object which is contradicting with
it.I chnaged the function to
> public void Uploadfile(string path,System.IO.Stream instream)
> but it is still giving same error.
>
> I have made some changes in reference.cs file to remove conflict.
> Now i am getting the error.
> System.Web.HttpInputStream is inaccessible due to its protection level.
Only public types can be processed
>
> How to solve this issue if someone has idea?
> or is there a better approach to pass a file to webservice?
>
>
>
> --------------------------------
> From: deepak Arjun
>
> -----------------------
> Posted by a user from .NET 247 (http://www.dotn...)
>
> <Id>slDbwccmt0Og4iGl+MBgUA==</Id>