473,657 Members | 2,586 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem : Client request is processed simultaneously by two threads !

I have a problem with an ASP.NET 2.0 Application.
A client request is processed in parrallel by two threads.
After further analysis, it appears that :
- There is 2 disctinct session for the request (Session_Start in
global.asax)
- One of the session ends (Session_End in global.asax).
- The ramining session is used for subsequent requests, and everything works
fine.
- This is happening primarily when the application is started for the first
time, but sometimes it is on a simple page request. No page in particular is
concerned, and I can't reproduce it myself.
My application generates a log file, and the facts exposed here are clearly
visible in that file.
The IIS log file shows that only one request is comming from the client.
Take a look at the following :

Line |Thread Id| Date| Hour|Delta|
Category|Text

------------------------------------------------------------------------------------------

28387| 00000007|05/09/2007|13:35:33.6 11| + |
Hit|Session starting from [196.201.XX.XXX]...|

28388| 00000007|05/09/2007|13:35:33.6 11| 0|
Browsers|Browse r is : [IE] Version [6.0] on [WinXP]|

28393| 00000001|05/09/2007|13:35:33.6 11| 0|
Hit|Session starting from [196.201.XX.XXX]...|

28394| 00000001|05/09/2007|13:35:33.6 11| 0|
Browsers|Browse r is : [IE] Version [6.0] on [WinXP]|

28396| 00000007|05/09/2007|13:35:33.7 83| 172|Client Language
Preferences|Pre fered Language is [fr] LCID -12|

28397| 00000001|05/09/2007|13:35:33.7 83| 0|Client Language
Preferences|Pre fered Language is [fr] LCID -12|

28398| 00000001|05/09/2007|13:35:33.7 98| 15|
|AcquireRequest State|

28399| 00000001|05/09/2007|13:35:33.7 98| 0| |No
Cookie with prefered language. Browser languages will be analysed (english
is default) !|

28400| 00000001|05/09/2007|13:35:33.7 98| 0|
|Selected runtime culture is [fr]|

28401| 00000001|05/09/2007|13:35:33.7 98| 0| ||

28402| 00000007|05/09/2007|13:35:33.7 98| 0|
|AcquireRequest State|

28406| 00000001|05/09/2007|13:35:34.5 33| 735|
StartEndFunctio n|Page [/members/Web/SendFax.aspx] is requested for the first
time.|

28407| 00000007|05/09/2007|13:35:34.5 33| 0|
StartEndFunctio n|Page [/members/Web/SendFax.aspx] is requested for the first
time.|

28408| 00000001|05/09/2007|13:35:34.5 64| 31|
StartEndFunctio n|Entering InitSessionUser Id()|

28409| 00000001|05/09/2007|13:35:34.5 64| 0|
|Time zone offset (GMT) cookie value is [0]|

28410| 00000007|05/09/2007|13:35:34.5 64| 0|
StartEndFunctio n|Entering InitSessionUser Id()|

28411| 00000007|05/09/2007|13:35:34.5 64| 0|
|Time zone offset (GMT) cookie value is [0]|

28412| 00000001|05/09/2007|13:35:35.1 89| 625|
|********* TEMP : GetRoles() : User is
[54************* *************** *************** @yahoo.fr] *********|

28413| 00000007|05/09/2007|13:35:35.2 04| 15|
|********* TEMP : GetRoles() : User is
[54************* *************** *************** @yahoo.fr] *********|

28414| 00000007|05/09/2007|13:35:35.2 51| 47|
RTEFBLDAPUser|F inding existing user [xx************@ yahoo.fr] in []...|

28415| 00000001|05/09/2007|13:35:35.2 51| 0|
RTEFBLDAPUser|F inding existing user [xx************@ yahoo.fr] in []...|

28416| 00000001|05/09/2007|13:35:35.2 67| 16|
DirectoryHelper |DetectDirector y [LDAP://rcs.private]|

28417| 00000007|05/09/2007|13:35:35.2 67| 0|
DirectoryHelper |DetectDirector y [LDAP://rcs.private]|

28418| 00000001|05/09/2007|13:35:35.2 67| 0|
DirectoryHelper |Directory is detected as [ActiveDirectory]|

28419| 00000001|05/09/2007|13:35:35.2 67| 0|
DirectoryHelper |Naming context from RootDSE is [DC=rcs,DC=priva te]|

28420| 00000007|05/09/2007|13:35:35.2 67| 0|
DirectoryHelper |Directory is detected as [ActiveDirectory]|

28421| 00000007|05/09/2007|13:35:35.2 67| 0|
DirectoryHelper |Naming context from RootDSE is [DC=rcs,DC=priva te]|

28422| 00000001|05/09/2007|13:35:35.2 67| 0|
DirectoryHelper |GetDefaultCont ainer
[LDAP://rcs.private/ou=XXXXXXXXXXXX XXX,OU=XXXXXXXX XX,DC=rcs,DC=pr ivate] with
user [RCS\rw.gofaxbox] and AuthenticationT ypes [Secure] |

28423| 00000007|05/09/2007|13:35:35.2 67| 0|
DirectoryHelper |GetDefaultCont ainer
[LDAP://rcs.private/ou=XXXXXXXXXXXX XXX,OU=XXXXXXXX XX,DC=rcs,DC=pr ivate] with
user [RCS\rw.gofaxbox] and AuthenticationT ypes [Secure] |

28424| 00000001|05/09/2007|13:35:35.2 67| 0|
RTEFBLDAPUser|D irectorySearche r Filter is
[(&((objectClass =user)(ma****** **********@yaho o.fr)))] Scope is [Subtree]|

28425| 00000007|05/09/2007|13:35:35.2 67| 0|
RTEFBLDAPUser|D irectorySearche r Filter is
[(&((objectClass =user)(ma****** **********@yaho o.fr)))] Scope is [Subtree]|

28427| 00000001|05/09/2007|13:35:35.3 14| 47|
|Find all user's email...|

28428| 00000007|05/09/2007|13:35:35.3 14| 0|
|Find all user's email...|

28429| 00000001|05/09/2007|13:35:35.3 29| 15|
StartEndFunctio n|Leaving InitSessionUser Id()|

28430| 00000007|05/09/2007|13:35:35.3 29| 0|
StartEndFunctio n|Leaving InitSessionUser Id()|

28431| 00000007|05/09/2007|13:35:35.3 29| 0|
StartEndFunctio n|End PageLoad|

28432| 00000001|05/09/2007|13:35:35.3 29| 0|
StartEndFunctio n|End PageLoad|

28433| 00000001|05/09/2007|13:35:36.1 42| 813| Application Error|An
entry with the same key already exists.<?xml version="1.0"
encoding="utf-8"?>[0D][0A]<RTELogClientEx ceptionContaine r
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http ://www.w3.org/2001/XMLSchema">[0D][0A]
<Source>Syste m</Source>[0D][0A] <StackTrace at
System.Collecti ons.Specialized .ListDictionary .Add(Object key, Object
value)[0D][0A] at
System.Web.UI.C lientScriptMana ger.RegisterScr iptBlock(Script Key key, String
script, ListDictionary& amp; scriptBlocks, ArrayList&amp; scriptList, Boolean
needsScriptTags , Boolean&amp; inScriptBlock)[0D][0A] at
System.Web.UI.C lientScriptMana ger.RegisterScr iptBlock(Script Key key, String
script, ClientAPIRegist erType type)[0D][0A] at
System.Web.UI.C lientScriptMana ger.RegisterCli entScriptInclud e(Type type,
String key, String url)[0D][0A] at
System.Web.UI.S criptRegistrati onManager.Regis terClientScript Include(Control
control, Type type, String key, String url)[0D][0A] at
System.Web.UI.S criptManager.Re gisterClientScr iptIncludeInter nal(Control
control, Type type, String key, String url)[0D][0A] at
System.Web.UI.S criptManager.Re gisterScripts()[0D][0A] at
System.Web.UI.S criptManager.On PagePreRenderCo mplete(Object sender, EventArgs
e)[0D][0A] at System.EventHan dler.Invoke(Obj ect sender, EventArgs
e)[0D][0A] at System.Web.UI.P age.OnPreRender Complete(EventA rgs e)[0D][0A]
at System.Web.UI.P age.ProcessRequ estMain(Boolean
includeStagesBe foreAsyncPoint, Boolean
includeStagesAf terAsyncPoint)</StackTrace>[0D][0A] <Message>An entry with
the same key already
exists.</Message>[0D][0A]</RTELogClientExc eptionContainer >|
Any help appreciated.
Sep 12 '07 #1
1 1863
a common cause is a src="" in the page. this will cause the browser to
do a second request. if you are using firefox, check the media tab to
see if the page is referenced again. if you are using IE, get the dev
toolbar.
-- bruce (sqlwork.com)

Olivier Matrot wrote:
I have a problem with an ASP.NET 2.0 Application.
A client request is processed in parrallel by two threads.
After further analysis, it appears that :
- There is 2 disctinct session for the request (Session_Start in
global.asax)
- One of the session ends (Session_End in global.asax).
- The ramining session is used for subsequent requests, and everything works
fine.
- This is happening primarily when the application is started for the first
time, but sometimes it is on a simple page request. No page in particular is
concerned, and I can't reproduce it myself.
My application generates a log file, and the facts exposed here are clearly
visible in that file.
The IIS log file shows that only one request is comming from the client.
Take a look at the following :

Line |Thread Id| Date| Hour|Delta|
Category|Text

------------------------------------------------------------------------------------------

28387| 00000007|05/09/2007|13:35:33.6 11| + |
Hit|Session starting from [196.201.XX.XXX]...|

28388| 00000007|05/09/2007|13:35:33.6 11| 0|
Browsers|Browse r is : [IE] Version [6.0] on [WinXP]|

28393| 00000001|05/09/2007|13:35:33.6 11| 0|
Hit|Session starting from [196.201.XX.XXX]...|

28394| 00000001|05/09/2007|13:35:33.6 11| 0|
Browsers|Browse r is : [IE] Version [6.0] on [WinXP]|

28396| 00000007|05/09/2007|13:35:33.7 83| 172|Client Language
Preferences|Pre fered Language is [fr] LCID -12|

28397| 00000001|05/09/2007|13:35:33.7 83| 0|Client Language
Preferences|Pre fered Language is [fr] LCID -12|

28398| 00000001|05/09/2007|13:35:33.7 98| 15|
|AcquireRequest State|

28399| 00000001|05/09/2007|13:35:33.7 98| 0| |No
Cookie with prefered language. Browser languages will be analysed (english
is default) !|

28400| 00000001|05/09/2007|13:35:33.7 98| 0|
|Selected runtime culture is [fr]|

28401| 00000001|05/09/2007|13:35:33.7 98| 0| ||

28402| 00000007|05/09/2007|13:35:33.7 98| 0|
|AcquireRequest State|

28406| 00000001|05/09/2007|13:35:34.5 33| 735|
StartEndFunctio n|Page [/members/Web/SendFax.aspx] is requested for the first
time.|

28407| 00000007|05/09/2007|13:35:34.5 33| 0|
StartEndFunctio n|Page [/members/Web/SendFax.aspx] is requested for the first
time.|

28408| 00000001|05/09/2007|13:35:34.5 64| 31|
StartEndFunctio n|Entering InitSessionUser Id()|

28409| 00000001|05/09/2007|13:35:34.5 64| 0|
|Time zone offset (GMT) cookie value is [0]|

28410| 00000007|05/09/2007|13:35:34.5 64| 0|
StartEndFunctio n|Entering InitSessionUser Id()|

28411| 00000007|05/09/2007|13:35:34.5 64| 0|
|Time zone offset (GMT) cookie value is [0]|

28412| 00000001|05/09/2007|13:35:35.1 89| 625|
|********* TEMP : GetRoles() : User is
[54************* *************** *************** @yahoo.fr] *********|

28413| 00000007|05/09/2007|13:35:35.2 04| 15|
|********* TEMP : GetRoles() : User is
[54************* *************** *************** @yahoo.fr] *********|

28414| 00000007|05/09/2007|13:35:35.2 51| 47|
RTEFBLDAPUser|F inding existing user [xx************@ yahoo.fr] in []...|

28415| 00000001|05/09/2007|13:35:35.2 51| 0|
RTEFBLDAPUser|F inding existing user [xx************@ yahoo.fr] in []...|

28416| 00000001|05/09/2007|13:35:35.2 67| 16|
DirectoryHelper |DetectDirector y [LDAP://rcs.private]|

28417| 00000007|05/09/2007|13:35:35.2 67| 0|
DirectoryHelper |DetectDirector y [LDAP://rcs.private]|

28418| 00000001|05/09/2007|13:35:35.2 67| 0|
DirectoryHelper |Directory is detected as [ActiveDirectory]|

28419| 00000001|05/09/2007|13:35:35.2 67| 0|
DirectoryHelper |Naming context from RootDSE is [DC=rcs,DC=priva te]|

28420| 00000007|05/09/2007|13:35:35.2 67| 0|
DirectoryHelper |Directory is detected as [ActiveDirectory]|

28421| 00000007|05/09/2007|13:35:35.2 67| 0|
DirectoryHelper |Naming context from RootDSE is [DC=rcs,DC=priva te]|

28422| 00000001|05/09/2007|13:35:35.2 67| 0|
DirectoryHelper |GetDefaultCont ainer
[LDAP://rcs.private/ou=XXXXXXXXXXXX XXX,OU=XXXXXXXX XX,DC=rcs,DC=pr ivate] with
user [RCS\rw.gofaxbox] and AuthenticationT ypes [Secure] |

28423| 00000007|05/09/2007|13:35:35.2 67| 0|
DirectoryHelper |GetDefaultCont ainer
[LDAP://rcs.private/ou=XXXXXXXXXXXX XXX,OU=XXXXXXXX XX,DC=rcs,DC=pr ivate] with
user [RCS\rw.gofaxbox] and AuthenticationT ypes [Secure] |

28424| 00000001|05/09/2007|13:35:35.2 67| 0|
RTEFBLDAPUser|D irectorySearche r Filter is
[(&((objectClass =user)(ma****** **********@yaho o.fr)))] Scope is [Subtree]|

28425| 00000007|05/09/2007|13:35:35.2 67| 0|
RTEFBLDAPUser|D irectorySearche r Filter is
[(&((objectClass =user)(ma****** **********@yaho o.fr)))] Scope is [Subtree]|

28427| 00000001|05/09/2007|13:35:35.3 14| 47|
|Find all user's email...|

28428| 00000007|05/09/2007|13:35:35.3 14| 0|
|Find all user's email...|

28429| 00000001|05/09/2007|13:35:35.3 29| 15|
StartEndFunctio n|Leaving InitSessionUser Id()|

28430| 00000007|05/09/2007|13:35:35.3 29| 0|
StartEndFunctio n|Leaving InitSessionUser Id()|

28431| 00000007|05/09/2007|13:35:35.3 29| 0|
StartEndFunctio n|End PageLoad|

28432| 00000001|05/09/2007|13:35:35.3 29| 0|
StartEndFunctio n|End PageLoad|

28433| 00000001|05/09/2007|13:35:36.1 42| 813| Application Error|An
entry with the same key already exists.<?xml version="1.0"
encoding="utf-8"?>[0D][0A]<RTELogClientEx ceptionContaine r
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http ://www.w3.org/2001/XMLSchema">[0D][0A]
<Source>Syste m</Source>[0D][0A] <StackTrace at
System.Collecti ons.Specialized .ListDictionary .Add(Object key, Object
value)[0D][0A] at
System.Web.UI.C lientScriptMana ger.RegisterScr iptBlock(Script Key key, String
script, ListDictionary& amp; scriptBlocks, ArrayList&amp; scriptList, Boolean
needsScriptTags , Boolean&amp; inScriptBlock)[0D][0A] at
System.Web.UI.C lientScriptMana ger.RegisterScr iptBlock(Script Key key, String
script, ClientAPIRegist erType type)[0D][0A] at
System.Web.UI.C lientScriptMana ger.RegisterCli entScriptInclud e(Type type,
String key, String url)[0D][0A] at
System.Web.UI.S criptRegistrati onManager.Regis terClientScript Include(Control
control, Type type, String key, String url)[0D][0A] at
System.Web.UI.S criptManager.Re gisterClientScr iptIncludeInter nal(Control
control, Type type, String key, String url)[0D][0A] at
System.Web.UI.S criptManager.Re gisterScripts()[0D][0A] at
System.Web.UI.S criptManager.On PagePreRenderCo mplete(Object sender, EventArgs
e)[0D][0A] at System.EventHan dler.Invoke(Obj ect sender, EventArgs
e)[0D][0A] at System.Web.UI.P age.OnPreRender Complete(EventA rgs e)[0D][0A]
at System.Web.UI.P age.ProcessRequ estMain(Boolean
includeStagesBe foreAsyncPoint, Boolean
includeStagesAf terAsyncPoint)</StackTrace>[0D][0A] <Message>An entry with
the same key already
exists.</Message>[0D][0A]</RTELogClientExc eptionContainer >|
Any help appreciated.

Sep 12 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
2243
by: Sudesh Sawant | last post by:
Hello, We have an application which communicates using remoting. There is a server which is a Windows Service. The server exposes an object which is a singleton. The client is a Web Application which makes calls to the service. We are using tcp channel which is using binaryformatter by default. The problem is that after a certain number of remoting calls the calls dont get through to the server. The client application makes the call and...
7
2858
by: David Sworder | last post by:
Hi, I'm developing an application that will support several thousand simultaneous connections on the server-side. I'm trying to maximize throughput. The client (WinForms) and server communicate via a socket connection (no remoting, no ASP.NET). The client sends a message to the server that contains some instructions and the server responds in an asynchronous fashion. In other words, the client doesn't block while waiting for the...
0
1414
by: Efim | last post by:
Hi, I have got some problem with sending of events in .NET. I am using remouting. The client has got 2 objects for receiving different types of events (responses and events) The server has got two objects for sending of these events. The client opens tcp port 0 to receive events: if (ChannelServices.GetChannel("tcp") == null) {
4
6204
by: Madhu Gopinathan | last post by:
Hi All, I am faced with a horrible hang problem. I have a COM exe server that executes some tasks. The task execution manager is a thread that manages the pool of threads, which is 4 per processor. Each task is processed in a separate thread. Each of the executer threads is an STA thread, and it goes ahead and executes the task. No problems are encountered when tasks are executed one at a time, but when multiple tasks are executed...
3
2097
by: TomR | last post by:
We are having problems with synchronus web request calls blocking our ASP.NET performance. Here is the setup: We have an aspx script on Site B with a synchronous HttpWebRequest call to access Site A (simulating accessing a bank credit card payment gateway). The page on Site A currently does nothing more than wait 15 seconds before serving a page, again simulating the potential lengthy response from such a site. When we open four...
47
3100
by: Max | last post by:
Due to the behaviour of a particular COM object, I need to ensure that a request for a particular ASP page is finalized before another request for the page is processed. Does IIS have a way to ensure that subsequent requests will be queued until the current request is completed? If not, can IIS be configured to use seperate processes to satisfy requests for a nominated ASP page? Thanks in advance.
3
1913
by: asadikhan | last post by:
Hi, I have a client server application where the client sends a request to the server with a filename. The server needs to read the file contents, massage the data, and then add it to the database. However, if two requests show up at the same time, I need to create some sort of a waiting mechanism or queue. I was thinking about using a Singleton Server Activation object for this reason, but I am not sure how I can implement the...
3
2343
by: Simon Dean | last post by:
Hi, I believe I have a website (I didn't do the original coding) which uses JavaScript/ASP to generate cookies. It's a shopping cart application called UCart I believe. The technologies involved are: ASP
8
8923
by: Chizl | last post by:
I'm building a web server and having some issues with the TCPListener.Start(BackLog). It doesn't seem to do as expected. I'm using MS Web Stress Tool to test against my web server and when I see 200 connections at once to it, and I'm seeing 2/3 of the sockets as socket errors.. They never get into my code, so it has to be failing on the connection side.. Backlog is the only thing I can think could be the problem. ...
0
8392
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8305
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8823
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
7321
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6163
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4301
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1607
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.