Seeemingly unable to create multiple endpoints
-
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 -
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 nameI 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:
-
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:
Thanks for that Mark, works a treat. Knew it must have been something simple I was missing.