开发者

WCF streaming on asmx?

开发者 https://www.devze.com 2022-12-31 07:04 出处:网络
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:

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.GetStrea开发者_运维问答m(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 ?


Sorry, no, ASMX web services don't support streaming.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号