使用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>