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. General Programming
  3. WCF and WF
  4. BasicHttpBinding with WCF client

BasicHttpBinding with WCF client

Scheduled Pinned Locked Moved WCF and WF
wcfcsharpxmlhelpwpf
3 Posts 2 Posters 10 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.
  • K Offline
    K Offline
    Kanjinghat
    wrote on last edited by
    #1

    Dearc All, i have a set of WCF services self-hosted. I have a WCF client too that access all these service. When i use WSHttpBinding then vs2003 applications are not able to acess these services, so changed the binding to BasicHttpBinding. now the WCF client fails to access the services. WSHttpBinding is not working with previous version client BasicHttpBinding is not working with the WCF client WSHttpBinding _WCFSampleServiceHost.AddServiceEndpoint(typeof(ISampleService1), new WSHttpBinding(), "SampleService1");_ ServiceMetadataBehavior WCFsmb = new ServiceMetadataBehavior(); WCFsmb.HttpGetEnabled = true; WCFSampleServiceHost.Description.Behaviors.Add(WCFsmb); BasicHttpBinding _WCFSampleServiceHost.AddServiceEndpoint(typeof(ISampleService1), new BasicHttpBinding(),"SampleService1");_ ServiceMetadataBehavior WCFsmb = new ServiceMetadataBehavior(); WCFsmb.HttpGetEnabled = true; WCFSampleServiceHost.Description.Behaviors.Add(WCFsmb); Given below the error message Content Type application/soap+xml; charset=utf-8 was not supported by service http://dev678/WCFSampleService1/SampleService1. The client and service bindings may be mismatched. ---> System.Net.WebException: The remote server returned an error: (415) Cannot process the message because the content type 'application/soap+xml; charset=utf-8' was not the expected type 'text/xml; charset=utf-8'.. Can any body help me With thanks and regards,

    Ramesh.Kanjinghat

    J 1 Reply Last reply
    0
    • K Kanjinghat

      Dearc All, i have a set of WCF services self-hosted. I have a WCF client too that access all these service. When i use WSHttpBinding then vs2003 applications are not able to acess these services, so changed the binding to BasicHttpBinding. now the WCF client fails to access the services. WSHttpBinding is not working with previous version client BasicHttpBinding is not working with the WCF client WSHttpBinding _WCFSampleServiceHost.AddServiceEndpoint(typeof(ISampleService1), new WSHttpBinding(), "SampleService1");_ ServiceMetadataBehavior WCFsmb = new ServiceMetadataBehavior(); WCFsmb.HttpGetEnabled = true; WCFSampleServiceHost.Description.Behaviors.Add(WCFsmb); BasicHttpBinding _WCFSampleServiceHost.AddServiceEndpoint(typeof(ISampleService1), new BasicHttpBinding(),"SampleService1");_ ServiceMetadataBehavior WCFsmb = new ServiceMetadataBehavior(); WCFsmb.HttpGetEnabled = true; WCFSampleServiceHost.Description.Behaviors.Add(WCFsmb); Given below the error message Content Type application/soap+xml; charset=utf-8 was not supported by service http://dev678/WCFSampleService1/SampleService1. The client and service bindings may be mismatched. ---> System.Net.WebException: The remote server returned an error: (415) Cannot process the message because the content type 'application/soap+xml; charset=utf-8' was not the expected type 'text/xml; charset=utf-8'.. Can any body help me With thanks and regards,

      Ramesh.Kanjinghat

      J Offline
      J Offline
      Joachim Kerschbaumer
      wrote on last edited by
      #2

      do you have a config file? if yes, could you post its content?

      K 1 Reply Last reply
      0
      • J Joachim Kerschbaumer

        do you have a config file? if yes, could you post its content?

        K Offline
        K Offline
        Kanjinghat
        wrote on last edited by
        #3

        I located what the actual problem is. i am configured basicHttpBinding at server side and wsHttpBinding at client side. i have changed the client side binding to basicHttpBinding and it is working fine now. Thanks for your concern Joachim

        Ramesh.Kanjinghat

        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