简体   繁体   中英

WCF streaming on asmx?

I've got wcf service for wcf straming. I works. But I must integrate it with our webserice.

is there any way, to have webmethod like this:

[webmethod]
public Stream GetStream(string path)
{
  return Iservice.GetStream(path);
}

I service is a class which I copy from WCF service to my asmx.

And is there any way to integrate App.config from wcf with web.config ?

抱歉,不,ASMX Web服务不支持流传输。

What is the bigger picture here, what are you trying to archieve with this stream?

Like John Saunders already said: Webservices dont support it. This is behaviour by design: Data is serialized into a platform/language independent and human readable xml packet, sent and deserialized on the receiver side. Of course you could go and split up your stream into chunks and send it piece for piece. But it wouldnt really make sense to misuse webservices like that, plus you are adding huge overhead in bandwidth and processing time.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM