By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,537 Members | 1,750 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,537 IT Pros & Developers. It's quick & easy.

WCF service behaves differently when called from localhost, why?

P: n/a
Hello

I have running WCF service (config below) hosting in just console
application - because I've used InstanceContextMode.Single and
ConcurrencyMode.Multiple and no Throttling I expect that 10 simultaneous
requests will create 10 threads. Indeed it's true when calling service from
the same machine - from localhost.

However making remote call to exactly the same instance of service will
cause ServiceHost to give _only_ 2 threads to process requests; so in one
time only two threads is working and 8 requests are waiting.

I haven't found how to distinguish configuration wheter it's remote or not.

My service just sleeps for several seconds, framework 3.5B2, Vista 64, Intel
2 Duo

<system.serviceModel>
<services>
<service behaviorConfiguration="myBehConfig"
name="MySampleService.MySampleServiceImp">
<endpoint address="http://localhost:6001/MyService"
behaviorConfiguration=""
binding="basicHttpBinding"
name="HttpEndpoint"
contract="MySampleService.MySampleContract1"
/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="myBehConfig">
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
Thanks for any information.
Aug 23 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
maciek,

This is a guess, but I am guessing that http.sys (the service side) or
the client proxy is determining that the request is from the local client
machine, and not placing a limit on the number of connections.

From what I recall, however, the HTTP specification says that only two
connections should be made at a time to a domain, and that could be why you
see only two requests processed at the same time.

If you change the binding to use tcpip, do you still see the same
behavior?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"maciek kanski" <ni***********@sie.mailawrote in message
news:sl**************************@mak.ant.pl...
Hello

I have running WCF service (config below) hosting in just console
application - because I've used InstanceContextMode.Single and
ConcurrencyMode.Multiple and no Throttling I expect that 10 simultaneous
requests will create 10 threads. Indeed it's true when calling service
from
the same machine - from localhost.

However making remote call to exactly the same instance of service will
cause ServiceHost to give _only_ 2 threads to process requests; so in one
time only two threads is working and 8 requests are waiting.

I haven't found how to distinguish configuration wheter it's remote or
not.

My service just sleeps for several seconds, framework 3.5B2, Vista 64,
Intel
2 Duo

<system.serviceModel>
<services>
<service behaviorConfiguration="myBehConfig"
name="MySampleService.MySampleServiceImp">
<endpoint address="http://localhost:6001/MyService"
behaviorConfiguration=""
binding="basicHttpBinding"
name="HttpEndpoint"
contract="MySampleService.MySampleContract1"
/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="myBehConfig">
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
Thanks for any information.

Aug 23 '07 #2

P: n/a
On Thu, 23 Aug 2007 13:07:29 -0400, Nicholas Paldino [.NET/C# MVP] wrote:
If you change the binding to use tcpip, do you still see the same
behavior?
Well, netTcpBinding works as expected. So I'll try to live without
basicHttpBinding (and probably other bindings dependent on http.sys as You
said)

Thanks Nicholas for help.
Aug 24 '07 #3

P: n/a
maciek,

It's not anything that depends on http.sys. I mentioned that because it
is used on the server side by services that use the http bindings which are
not hosted in IIS. It should be any binding that uses HTTP as a transport
protocol.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"maciek kanski" <ni***********@sie.mailawrote in message
news:sl**************************@mak.ant.pl...
On Thu, 23 Aug 2007 13:07:29 -0400, Nicholas Paldino [.NET/C# MVP] wrote:
> If you change the binding to use tcpip, do you still see the same
behavior?
Well, netTcpBinding works as expected. So I'll try to live without
basicHttpBinding (and probably other bindings dependent on http.sys as You
said)

Thanks Nicholas for help.

Aug 24 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.