cannot process the message because the content type 'application/soap+xml charset=utf-8 was not the expected type text/xml
-
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?
-
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?
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 !~
-
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 !~
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.