473,395 Members | 1,568 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

WCF service behaves differently when called from localhost, why?

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
3 2337
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

23
by: Adam Clauss | last post by:
I have a C# Windows Service running as the NetworkService account because it needs to access a network share. As part of the service's initialization, I want the service to terminate, if an...
1
by: Sunil Sabir | last post by:
Dear All, I have written a Web Service which is called from ASPX file(Web Form). It works fine on the local machine. On the local machine I am using the following command wsdl.exe /l:cs...
1
by: Justin Crossley | last post by:
I'm having a type mismatch problem when trying to pass a typed dataset to a web service. My code is: CLIENT CODE I have a dataset schema file called MainData.xsd containing a table called...
6
by: Picho | last post by:
Hi all. I have a webservice and a windows app. both of them reference the same class library called WebServiceTest.Core that defines a class called Class1. the webservice exposes a method...
1
by: TonyJ | last post by:
Hello! I have created a web service that is working on my localhost using IIS. If I enter the asmx file in this way http://localhost/webcalc/webcalc.asmx for the web service in the Internet...
20
by: =?Utf-8?B?cmtibmFpcg==?= | last post by:
I was executing the steps given in http://suppor.microsoft.com/kb/308359 for testing a sample web service application. However, the following line gives a compilation error: localhost.Service1...
0
by: g-forsmo | last post by:
Hi! I am trying to implement a web service after a wsdl generated from BEA Web logic. I have used a tool called WSCF - Schema-Based Contract- First Web Services to generate a web service from a...
4
by: dlc9s | last post by:
Hi All, I have a JSR 168 portlet that I need to call a J2EE 1.4 JAX-RPC Web Service. I'm using Oracle 10g JDeveloper. (I don't have a choice about this). It works when I call the sync method, but...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.