我在收到此错误之前所做的修改。我在所有课程中都已更改byte[]
为。Stream
System.ServiceModel.CommunicationException: The underlying connection was closed: The connection was closed unexpectedly. ---> System.Net.WebException: The underlying connection was closed: The connection was closed unexpectedly.
at System.Net.HttpWebRequest.GetResponse()
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
--- End of inner exception stack trace ---
Server stack trace:
at System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException webException, HttpWebRequest request, HttpAbortReason abortReason)
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at MyWCFServiceTest.MyWCFService.ICommonService.UploadDocument(UploadDocumentRequest request)
at MyWCFServiceTest.MyWCFService.MyServiceClient.MyWCFServiceTest.MyWCFService.ICommonService.UploadDocument(UploadDocumentRequest request) in C:\Users\KishoreJangid\Desktop\ChangeSAPTransactionStatus\MyWCFServiceTest - Copy\MyWCFServiceTest\Service References\MyWCFService\Reference.cs:line 2376
at MyWCFServiceTest.MyWCFService.MyServiceClient.UploadDocument(RequestHeader UploadDocumentReqHdr, Byte[]& UploadDocumentContent) in C:\Users\KishoreJangid\Desktop\ChangeSAPTransactionStatus\MyWCFServiceTest - Copy\MyWCFServiceTest\Service References\MyWCFService\Reference.cs:line 2383
at MyWCFService.Form1.DocumentUpload_Click(Object sender, EventArgs e) in C:\Users\KishoreJangid\Desktop\ChangeSAPTransactionStatus\MyWCFServiceTest - Copy\MyWCFServiceTest\Form1.cs:line 88