Solved

maxconnection for .NET applications

Posted on 2011-03-17
2
858 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

792 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