Solved

maxconnection for .NET applications

Posted on 2011-03-17
2
835 Views
Last Modified: 2013-11-27
i have a potential problem with a .NET (2.0) web application that calls a web service on another server. the call can be spawned by every client page request, and i have encountered a "deadlock" error in the event log a few times, MS recommended increasing the value of "maxconnection" for such applications.

i was browsing a question about where can you change the value of "maxconnection" parameter, and the answer was to do in machine.config, using this section:


<system.net>
  <connectionManagement>
   <add address="*" maxconnection="10"/>
  </connectionManagement>
 </system.net>

my questions regarding that:

1) does it have to be in machine.config? can I create it for one specific app, using its web.config?

2) how do i  know (programmaticaly) that .NET is actually using the value i set?

3) MS declares that you can add multiple maxconnection, example:
   <add address="*" maxconnection="2"/>
   <add address="http://10.0.0.0" maxconnection="12"/>

in this case would there be a way for me to know that .NET is actually using the value i set for that specific address?


0
Comment
Question by:structuredweb
2 Comments
 
LVL 28

Accepted Solution

by:
strickdd earned 250 total points
ID: 35164565
Yes, web.configs are inherited from the highest level down to the current level. The precedence starts in the machine.config and the machine's web.config then to the website's root web.config and finally the web.config if the folder your code it running in. This means if you set it in a web.config for the website it will only affect that website.

As far as testing and verifying, that would probably take some network sniffing tools. You may also want to consider setting the value to 0 or 1 and load testing and compare that to a load test of the value being 100. That should give you an idea when you see the response times. Other than that, trust in microsoft.

To test which address you're pointing at, you can record incoming connections to the address you specify.
0
 
LVL 1

Author Closing Comment

by:structuredweb
ID: 35165375
no specific answer to a programatic interface, but maybe there isn't ..
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This video discusses moving either the default database or any database to a new volume.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now