Hi zorhel,
First of all, I would like to confirm my understanding of your issue. From
your description, I understand that when you're creating an array of
WebBrowser, the session count only grows by 2. If there is any
misunderstandin g, please feel free to let me know.
Based on my research, there are some mistakes in the code you have provided.
1. A class cannot be declared as private explicitly. Because it is private
by default.
2. The WebBrowser array hasn't been initialized. So if you run the code, a
NullReferenceEx ception will be thrown.
3. The index of an array in C# is zero-based. So the index of the array is
0 to 99.
Here I have made some changes to the code
class Test
{
private WebBrowser[] _browser;
private void OpenBrowser()
{
this._browser = new WebBrowswer[100];
for(int i=0; i<100; i++)
{
_browser[i] = new WebBrowser();
_browser[i].Navigate(
http://localhost/Tests/WebEvents/main.aspx);
}
}
}
With this code, we can see session count grows by 10 to 20 on the
performance monitor. This is because IE does cache on the client side, so
not each request is send to the IIS server.
HTH.
Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."