Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8934315
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:45:32+00:00 2026-06-15T09:45:32+00:00

I have a MTOM response on the disk and I am trying to load

  • 0

I have a MTOM response on the disk and I am trying to load and parse the response.
While creating an MTOM reader I keep getting the error.

Invalid MIME content-type header encountered on read.

Is this a bug or does the header for content-type really means that Visual Studio cannot understand the content type?

MIME-Version: 1.0
Content-Type: Multipart/Related;boundary=DeltaSync91ABCB4AF5D24B8F988B77ED7A19733D?MTOM;
    type="application/xop+xml";
    start="<DeltaSyncMTOMFetchResponse@mail.services.live.com>";

    --DeltaSync91ABCB4AF5D24B8F988B77ED7A19733D?MTOM
    content-transfer-encoding: binary
    content-type: application/xop+xml; charset=utf-8; type="application/xop+xml"
    content-id: <DeltaSyncMTOMFetchResponse@mail.services.live.com>

    <ItemOperations xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:B="HMMAIL:" xmlns:D="HMSYNC:" xmlns="ItemOperations:"><Status>1</Status><Responses><Fetch><ServerId>E631966A-9439-11E1-8E7B-00215AD9A7B8</ServerId><Status>1</Status><Message><xop:Include href="cid:1.634715231374437235@example.org" /></Message></Fetch></Responses></ItemOperations>
    --DeltaSync91ABCB4AF5D24B8F988B77ED7A19733D?MTOM
    content-transfer-encoding: binary
    content-type: application/octet-stream
    content-id: <1.634715231374437235@example.org>

Here is the simple code to create the MTOM reader.

XmlDictionaryReader mtomReader = XmlDictionaryReader.CreateMtomReader
            (
             fStream,
             Encoding.UTF8,
             XmlDictionaryReaderQuotas.Max
            );
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T09:45:33+00:00Added an answer on June 15, 2026 at 9:45 am

    There are several problems in your data:

    • You need to encode boundary string in your Content-Type header because it contains ? character.
    • Lines 5 to end are indented – you need to remove the leading spaces
    • You are missing the ending boundary string

    Here is the modified content that worked for me:

    MIME-Version: 1.0
    Content-Type: Multipart/Related;boundary="DeltaSync91ABCB4AF5D24B8F988B77ED7A19733D?MTOM"";
        type="application/xop+xml"";
        start="<DeltaSyncMTOMFetchResponse@mail.services.live.com>"";
    
    --DeltaSync91ABCB4AF5D24B8F988B77ED7A19733D?MTOM
    content-transfer-encoding: binary
    content-type: application/xop+xml; charset=utf-8; type="application/xop+xml""
    content-id: <DeltaSyncMTOMFetchResponse@mail.services.live.com>
    
    <ItemOperations xmlns:xop="http://www.w3.org/2004/08/xop/include"" xmlns:B=""HMMAIL:"" xmlns:D=""HMSYNC:"" xmlns=""ItemOperations:""><Status>1</Status><Responses><Fetch><ServerId>E631966A-9439-11E1-8E7B-00215AD9A7B8</ServerId><Status>1</Status><Message><xop:Include href=""cid:1.634715231374437235@example.org"" /></Message></Fetch></Responses></ItemOperations>
    --DeltaSync91ABCB4AF5D24B8F988B77ED7A19733D?MTOM
    content-transfer-encoding: binary
    content-type: application/octet-stream
    content-id: <1.634715231374437235@example.org>
    --DeltaSync91ABCB4AF5D24B8F988B77ED7A19733D?MTOM--
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Have a painfully simple blog Post creator, and I'm trying to check if the
have a nice day. I got problem when trying to create an image from
We have an MTOM-enabled web service that is published with Grails and the Metro
I have created WCF and I have used wsHttpBinding and MTOM as message transport
When using JAX-WS @MTOM to transfer a file, does it have a build-in file
I have WCF service library with this config: <basicHttpBinding> <binding name=httpLargeMessageStream maxReceivedMessageSize=2147483647 messageEncoding=Mtom transferMode=Streamed
Does Java XML Validation Support MTOM enabled Messages? The following error has been thrown
So i have this new Axis2 MTOM Webservice serving correctly to a java based
I have been using some code to create MTOM by using code from MSDN
How do I configure custom binding and MTOM encoding? I have a custom binding

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.