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. Seeemingly unable to create multiple endpoints

Seeemingly unable to create multiple endpoints

Scheduled Pinned Locked Moved WCF and WF
csharpwcfhelpwpfwinforms
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.
  • N Offline
    N Offline
    Nathan Gloyn
    wrote on last edited by
    #1

    I am currently creating a service that allows files to be streamed to it, which works fine, the issue I have is that there are other short running tasks such as IsServiceAvailable that just return a bool and I would like to use non-streaming binding. When I test the service I have no issues streaming files but as soon as I try to connect to the non-streaming endpoint I get the following error:

    An error occurred while receiving the HTTP response to
    http://localhost:3215/Standard. This could be due to the service endpoint binding not using the HTTP protocol.
    This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down).
    See server logs for more details.

    If I then look at the inner exception I find the following:

    Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.

    Which in turn has the inner exception:

    An existing connection was forcibly closed by the remote host

    I am a bit mystified by this since at the point I am calling the service no other connections are in existence, as far as I know. I have included my service config below and I hope somebody can spot why I keep getting the error as I'm scratching my head here. Its probably something obvious but I just can't see it. This is a WCF Application project with a WinForms test harness running in VS2008 professional using the inbuilt dev web server on .Net 3.5 framework.

    <system.serviceModel>
    <services>
    <service behaviorConfiguration="standard" name="FileService.FileTransfer">
    <endpoint address="mex" binding="mexHttpBinding" bindingConfiguration=""
    name="mex" contract="FileService.IFileTransfer" />
    <endpoint address="http://localhost:3215/FileTransfer" binding="basicHttpBinding"
    bindingConfiguration="httpStream" name="Transfer" contract="FileService.IFileTransfer" />
    <endpoint address="http://localhost:3215/Standard" binding="basicHttpBinding"
    bindingConfiguration="Standard" name="Standard" contract="FileService.IFileTransfer" />
    <host>
    <baseAddresses>
    <add baseAddress="http://localhost:3215/Standard" />
    <add baseAddress="http://localhost:3215/FileTransfer" />
    </baseAddresses>
    </host>
    </service>
    </services>
    <bindings>
    <basicHttpBinding>
    <binding name

    M 1 Reply Last reply
    0
    • N Nathan Gloyn

      I am currently creating a service that allows files to be streamed to it, which works fine, the issue I have is that there are other short running tasks such as IsServiceAvailable that just return a bool and I would like to use non-streaming binding. When I test the service I have no issues streaming files but as soon as I try to connect to the non-streaming endpoint I get the following error:

      An error occurred while receiving the HTTP response to
      http://localhost:3215/Standard. This could be due to the service endpoint binding not using the HTTP protocol.
      This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down).
      See server logs for more details.

      If I then look at the inner exception I find the following:

      Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.

      Which in turn has the inner exception:

      An existing connection was forcibly closed by the remote host

      I am a bit mystified by this since at the point I am calling the service no other connections are in existence, as far as I know. I have included my service config below and I hope somebody can spot why I keep getting the error as I'm scratching my head here. Its probably something obvious but I just can't see it. This is a WCF Application project with a WinForms test harness running in VS2008 professional using the inbuilt dev web server on .Net 3.5 framework.

      <system.serviceModel>
      <services>
      <service behaviorConfiguration="standard" name="FileService.FileTransfer">
      <endpoint address="mex" binding="mexHttpBinding" bindingConfiguration=""
      name="mex" contract="FileService.IFileTransfer" />
      <endpoint address="http://localhost:3215/FileTransfer" binding="basicHttpBinding"
      bindingConfiguration="httpStream" name="Transfer" contract="FileService.IFileTransfer" />
      <endpoint address="http://localhost:3215/Standard" binding="basicHttpBinding"
      bindingConfiguration="Standard" name="Standard" contract="FileService.IFileTransfer" />
      <host>
      <baseAddresses>
      <add baseAddress="http://localhost:3215/Standard" />
      <add baseAddress="http://localhost:3215/FileTransfer" />
      </baseAddresses>
      </host>
      </service>
      </services>
      <bindings>
      <basicHttpBinding>
      <binding name

      M Offline
      M Offline
      Mark Salsbery
      wrote on last edited by
      #2

      I don't immediately notice anything... What happens if you change the addressing in the service configuration to

      <service behaviorConfiguration="standard" name="FileService.FileTransfer">
      <endpoint address="mex" binding="mexHttpBinding" bindingConfiguration=""
      name="mex" contract="FileService.IFileTransfer" />
      <endpoint address="FileTransfer" binding="basicHttpBinding"
      bindingConfiguration="httpStream" name="Transfer" contract="FileService.IFileTransfer" />
      <endpoint address="Standard" binding="basicHttpBinding"
      bindingConfiguration="Standard" name="Standard" contract="FileService.IFileTransfer" />
      <host>
      <baseAddresses>
      <add baseAddress="http://localhost:3215/" />
      </baseAddresses>
      </host>
      </service>

      ? Mark

      Mark Salsbery Microsoft MVP - Visual C++ :java:

      N 1 Reply Last reply
      0
      • M Mark Salsbery

        I don't immediately notice anything... What happens if you change the addressing in the service configuration to

        <service behaviorConfiguration="standard" name="FileService.FileTransfer">
        <endpoint address="mex" binding="mexHttpBinding" bindingConfiguration=""
        name="mex" contract="FileService.IFileTransfer" />
        <endpoint address="FileTransfer" binding="basicHttpBinding"
        bindingConfiguration="httpStream" name="Transfer" contract="FileService.IFileTransfer" />
        <endpoint address="Standard" binding="basicHttpBinding"
        bindingConfiguration="Standard" name="Standard" contract="FileService.IFileTransfer" />
        <host>
        <baseAddresses>
        <add baseAddress="http://localhost:3215/" />
        </baseAddresses>
        </host>
        </service>

        ? Mark

        Mark Salsbery Microsoft MVP - Visual C++ :java:

        N Offline
        N Offline
        Nathan Gloyn
        wrote on last edited by
        #3

        Thanks for that Mark, works a treat. Knew it must have been something simple I was missing.

        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