ResponseSoapContext.Current is null
使用WSE传输附件可ResponseSoapContext.Current一直为NULL。不是很理解,望高人指教!
DocAttachment docInfo = _controller.GetDocInfo(sendAttId);
Stream ms = new MemoryStream(docInfo.Content);
SoapContext respContext = ResponseSoapContext.Current;
DimeAttachment dimeAttach = new DimeAttachment(
"image/jpg", TypeFormat.MediaType, ms);//image/jpg
respContext.Attachments.Add(dimeAttach);
return docInfo.Extension;
webcofig已添加
<webServices>--------------------编程问答-------------------- 没人帮帮我吗? --------------------编程问答-------------------- 不会,帮顶
<soapExtensionTypes>
<add type="Microsoft.Web.Services2.WebServicesExtension, Microsoft.Web.Services2, Version=2.0.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" priority="1" group="0"/>
</soapExtensionTypes>
</webServices>
补充:.NET技术 , Web Services