C# Web Service

I have a console application in Visual Studio 2012. The console is supposed to run a web service that moves data between databases. When I run it, it appears to work until it gets to the web service. Once it tries to connect, it errors out. This is some of the error I get:
Error: The content type application/xml; charset=utf-8 of the response message does not match the content type of the binding (application/soap+xml; charset=utf-8)

Any ideas what I am missing or am doing wrong?
dodgerfanAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jonnidipCommented:
Are you getting some kind of error message from the WebService page itself?
What if you try to open that page in Internet Explorer?
0
Bob LearnedCommented:
What type of web service are you working with, and how did you add a reference to the web service?
0
Monica PSoftware DeveloperCommented:
Hi

the client expects a SOAP XML message (content type: application/soap+xml; charset=utf-8), the server-side endpoint is a REST endpoint which returns plain XML (content type: application/xml; charset=utf-8)

Make sure both the client and the server endpoint used are in sync with regards to bindings and configuration!

or
Try to make binding"  service with the service behaviour
 
<serviceBehaviors>
        <behavior name="YourBehaviourNameHere">
                      ----set of tags goes here
   </behavior>
      </serviceBehaviors>

and

<services>
     <service name="WCFservice behaviourConfiguration="YourBehaviourNameHere">
              ----set of tags goes here
 </service>
    </services>
0
Monica PSoftware DeveloperCommented:
To fix install the WCF non-HTTP activation components

Click the Start button, and then click Control Panel.

Click Programs, and then click Programs and Features.

On the Tasks menu, click Turn Windows features on or off.

Find the .NET Framework 3.0 node, select and then expand it.

Select the WCF Non-Http Activation Components box and save the setting.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Services

From novice to tech pro — start learning today.