Forum Discussion

rekasambath's avatar
rekasambath
New Contributor
7 years ago

MIME part with Content-ID 'cid:xxxxx' not found. What does that mean? Any help appreciated. Thanks

Below is my soap request

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
<soapenv:Header>
<tem:documentName>hello</tem:documentName>
<tem:UserName>test</tem:UserName>
<tem:Password>test123</tem:Password>
</soapenv:Header>
<soapenv:Body>
<tem:DocumentUpload>
<tem:data>cid:859375762160</tem:data>
</tem:DocumentUpload>
</soapenv:Body>
</soapenv:Envelope>

 

And I am getting an error in the response. The error occurs at the place where stream is read.

 

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<s:Fault>
<faultcode xmlns:a="http://schemas.microsoft.com/net/2005/12/windowscommunicationfoundation/dispatcher">a:InternalServiceFault</faultcode>
<faultstring xml:lang="en-US">An exception has been thrown when reading the stream.</faultstring>
<detail>
<ExceptionDetail xmlns="http://schemas.datacontract.org/2004/07/System.ServiceModel" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<HelpLink i:nil="true"/>
<InnerException>
<HelpLink i:nil="true"/>
<InnerException i:nil="true"/>
<Message>MIME part with Content-ID 'cid:859375762160' not found.</Message>
<StackTrace>at System.Xml.XmlMtomReader.ReadMimePart(String uri)
at System.Xml.XmlMtomReader.Read()
at System.Xml.XmlReader.ReadStartElement(String localname, String ns)
at System.ServiceModel.Dispatcher.StreamFormatter.MessageBodyStream.Read(Byte[] buffer, Int32 offset, Int32 count)</StackTrace>
<Type>System.Xml.XmlException</Type>
</InnerException>
<Message>An exception has been thrown when reading the stream.</Message>
<StackTrace>at System.ServiceModel.Dispatcher.StreamFormatter.MessageBodyStream.Read(Byte[] buffer, Int32 offset, Int32 count)
at WcfService1.Service1.UploadFile(DocumentUpload request) in \\hcldc\users$\rekasambath\documents\visual studio 2015\Projects\WcfService1\WcfService1\Service1.svc.cs:line 25
at SyncInvokeUploadFile(Object , Object[] , Object[] )
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]&amp; outputs)
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc&amp; rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc&amp; rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc&amp; rpc)
at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)</StackTrace>
<Type>System.IO.IOException</Type>
</ExceptionDetail>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>

 

What does this error mean? Am I missing something? Any Help appreciated. Thanks

2 Replies

  • nmrao's avatar
    nmrao
    Champion Level 3
    Have you attached the file to the request and selected the part number?
    • rekasambath's avatar
      rekasambath
      New Contributor

      It is working now. 

      Updating the part number(cid:part Number) in soap message didn't work for me. 

      I updated cid:Content-ID in the soap message and it is working fine.

       

      Thanks for your help.