Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. cannot process the message because the content type 'application/soap+xml charset=utf-8 was not the expected type text/xml

cannot process the message because the content type 'application/soap+xml charset=utf-8 was not the expected type text/xml

Scheduled Pinned Locked Moved ASP.NET
csharphelpwcfxmldotnet
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Member 13443768
    wrote on last edited by
    #1

    Nothing I've read about this error seems to be the problem, because the problem is not the code. My co-worker created a solution in Visual Studio 2019 that has a web application and a WCF web service. He had it working on his machine, then he put it into our source repository. I checked it out of the source repository and made NO CHANGES to it. When I tried to update/configure the service reference with the address on my machine, I got the above-mentioned error message. We're thinking it must be some option or setting in Visual Studio 2019 that is different on our machines. We both have .Net Framework 4.8. Can anyone help?

    A 1 Reply Last reply
    0
    • M Member 13443768

      Nothing I've read about this error seems to be the problem, because the problem is not the code. My co-worker created a solution in Visual Studio 2019 that has a web application and a WCF web service. He had it working on his machine, then he put it into our source repository. I checked it out of the source repository and made NO CHANGES to it. When I tried to update/configure the service reference with the address on my machine, I got the above-mentioned error message. We're thinking it must be some option or setting in Visual Studio 2019 that is different on our machines. We both have .Net Framework 4.8. Can anyone help?

      A Offline
      A Offline
      Afzaal Ahmad Zeeshan
      wrote on last edited by
      #2

      The difference in the data that you are sending to the service. Service is expecting text/xml, but you are sending over a SOAP based message. Check if sending a plain XML document works in this case. Since we do not have the access to the code, there is not much that we can do to help you here. See this maybe, [wcf - Content Type application/soap+xml; charset=utf-8 was not supported by service - Stack Overflow](https://stackoverflow.com/questions/15559056/content-type-application-soapxml-charset-utf-8-was-not-supported-by-service)

      The shit I complain about It's like there ain't a cloud in the sky and it's raining out - Eminem ~! Firewall !~

      M 1 Reply Last reply
      0
      • A Afzaal Ahmad Zeeshan

        The difference in the data that you are sending to the service. Service is expecting text/xml, but you are sending over a SOAP based message. Check if sending a plain XML document works in this case. Since we do not have the access to the code, there is not much that we can do to help you here. See this maybe, [wcf - Content Type application/soap+xml; charset=utf-8 was not supported by service - Stack Overflow](https://stackoverflow.com/questions/15559056/content-type-application-soapxml-charset-utf-8-was-not-supported-by-service)

        The shit I complain about It's like there ain't a cloud in the sky and it's raining out - Eminem ~! Firewall !~

        M Offline
        M Offline
        Member 13443768
        wrote on last edited by
        #3

        After a lot of digging, we found that the problem apparently was in the code, after all. When I checked the solution back into source, and my co-worker checked it out, he then received the same error message as I received. We don't really know why his worked initially, because we had compared our web.config files, and they looked the same. We were finally able to resolve this by adding

        behaviorConfiguration="serviceBehavior"

        to the service item in the web.config. Thank you for your response.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups