简体   繁体   English

在asmx上的WCF流?

[英]WCF streaming on asmx?

I've got wcf service for wcf straming. 我有用于wcf分层的wcf服务。 I works. 我工作 But I must integrate it with our webserice. 但是我必须将其与我们的网络服务集成。

is there any way, to have webmethod like this: 有什么办法可以使webmethod像这样:

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

I service is a class which I copy from WCF service to my asmx. 我服务的是一个类,我从WCF服务复制到我的asmx。

And is there any way to integrate App.config from wcf with web.config ? 还有什么方法可以将wcf中的App.config与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. 就像约翰·桑德斯(John Saunders)所说的那样:Web服务不支持它。 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. 这是设计使然的行为:数据被序列化为与平台/语言无关且人类可读的xml数据包,并在接收方进行发送和反序列化。 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. 但是,滥用这样的Web服务确实没有任何意义,而且您还在带宽处理时间上增加了巨大的开销。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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