My goal is not to have a client request processed twice.
This is a weird behavior I have on my web site.
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& scriptList, Boolean
needsScriptTags , Boolean& 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 >|
"Patrice" <http://www.chez.com/scribe/wrote in message
news:Oh******** ********@TK2MSF TNGP05.phx.gbl. ..
IMO you'll have to explain a bit what you meant or how you do :
- A client request is processed in parrallel by two threads
- There is 2 disctinct session for the request
or what it your overall goal.
The standard situation is that an HTTP request is processed by a single
thread and is binded to a single session so it would seems you try
something special. My first thought would be that you try to add the same
key twice in distinct threads when you have a single request coming and
that the clientscriptman ager is likely not designed to handle such an
unusual situation
It's likely that your best bet is first to explain what you are trying to
do so that we can better grasp the context (you have build in capabilites
for async processing in .NET 2.0 that you could perhaps use ?)...
--
Patrice
"Olivier Matrot" <ol************ ****@online.nos pama écrit dans le
message de news: %2************* ***@TK2MSFTNGP0 6.phx.gbl...
>More information :
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.
"Olivier Matrot" <ol************ ****@online.nos pamwrote in message
news:uS******* *******@TK2MSFT NGP02.phx.gbl.. .
>>Hello,
I have a problem with an ASP.NET 2.0 Application.
A client request is processed in parrallel by two threads.
This ends with the following exception :
<Source>Syste m</Source>
<StackTrace at
System.Collec tions.Specializ ed.ListDictiona ry.Add(Object key, Object
value)
at System.Web.UI.C lientScriptMana ger.RegisterScr iptBlock(Script Key
key, String script, ListDictionary& amp; scriptBlocks, ArrayList&
scriptList, Boolean needsScriptTags , Boolean& inScriptBlock)
at System.Web.UI.C lientScriptMana ger.RegisterScr iptBlock(Script Key
key, String script, ClientAPIRegist erType type)
at System.Web.UI.C lientScriptMana ger.RegisterCli entScriptInclud e(Type
type, String key, String url)
at
System.Web.UI .ScriptRegistra tionManager.Reg isterClientScri ptInclude(Contr ol
control, Type type, String key, String url)
at
System.Web.UI .ScriptManager. RegisterClientS criptIncludeInt ernal(Control
control, Type type, String key, String url)
at System.Web.UI.S criptManager.Re gisterScripts()
at System.Web.UI.S criptManager.On PagePreRenderCo mplete(Object sender,
EventArgs e)
at System.EventHan dler.Invoke(Obj ect sender, EventArgs e)
at System.Web.UI.P age.OnPreRender Complete(EventA rgs e)
at System.Web.UI.P age.ProcessRequ estMain(Boolean
includeStages BeforeAsyncPoin t, Boolean
includeStages AfterAsyncPoint )</StackTrace>
<Message>An entry with the same key already exists.</Message>
Any idea ?
Thanks in advance.