难!!在线等!!跪求高手帮助!!!!!!!!!!

pencil001 2004-05-05 03:25:37
public override Stream ChainStream(Stream stream)
{
oldStream = stream;
newStream = new MemoryStream();
return newStream;
}
我使用soap extension想对soap消息进行操作。
在BeforeDeserialize阶段,oldStream是HTTPInputStream,而且数据接收正常
但是在AfterSerialize阶段,oldStream接受到的stream是下面这种情况

stream:{System.Web.Services.Protocols.SoapExtensionStream}
System.MarshalByRefObject:{System.Web.Services.Protocols.SoapExtensionStream} System.MarshalByRefObject
CanRead:<error: an exception of type: {System.InvalidOperationException} occurred> bool
CanSeek:<error: an exception of type: {System.InvalidOperationException} occurred> bool
CanWrite:<error: an exception of type: {System.InvalidOperationException} occurred> bool
Length:<error: an exception of type: {System.InvalidOperationException} occurred> long
Null:{System.IO.Stream.NullStream} System.IO.Stream
Position:<error: an exception of type: {System.InvalidOperationException} occurred> long

从而我在AfterSerialize阶段触发的事件中,就无法在oldStream中写入任何数据,请高手指明名路啊!!!!!!!

以上都在web service服务段运行!!
如果不是单步执行,则客户端报错:The root element is missing
...全文
25 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
pencil001 2004-05-05
  • 打赏
  • 举报
回复
再顶
pencil001 2004-05-05
  • 打赏
  • 举报
回复
为什么!!
pencil001 2004-05-05
  • 打赏
  • 举报
回复
真得很难吗?
widespread 2004-05-05
  • 打赏
  • 举报
回复
看不懂,帮你顶一下

110,533

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧