03-04-04 09:36 PM
David,
Yes, I have sessions enabled. I have this problem on my workstation as I
test the site - yes I may have multiple browser windows open, but only one
is "active".
Another characteristic is the problem is "sporadic". Sometimes I get it
alot, other times not at all (for a while). I can't see anything that ties
that behavior together. I will looking into the items you mention.
/harry
"David Messner [MSFT]" <davidme@online.microsoft.com> wrote in message
news:xtDcLUW$DHA.2872@cpmsftngxa06.phx.gbl...
> Do you have session state enabled for the site? Are you trying to access
> CommerceContext.Current.UserID from Session_OnStart by chance?
>
> We have seen once case in the past where this was happening.
> HttpContext.Current could be null in Session_Start under very specific
> conditions that involve the session being locked and multiple requests
> coming in at the same time for that one session.
>
> The workaround is enclose Session_Start with an if(HttpContext.Current =
> null).
>
> Hope that solves it for you.
> -djm
> --
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> You assume all risk for your use. © 2004 Microsoft Corporation. All
rights
> reserved.
> --------------------
> From: "bp100a" <someone@microsoft.com>
> Subject: CommerceContext.Current.UserID is null!
> Date: Fri, 27 Feb 2004 12:52:03 -0500
> Lines: 15
> X-Priority: 3
> X-MSMail-Priority: Normal
> X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
> Message-ID: <#DpIcoV$DHA.1036@TK2MSFTNGP10.phx.gbl>
> Newsgroups: microsoft.public.commerceserver.general
> NNTP-Posting-Host: ool-4350310e.dyn.optonline.net 67.80.49.14
> Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
> Xref: cpmsftngxa06.phx.gbl microsoft.public.commerceserver.general:13278
> X-Tomcat-NG: microsoft.public.commerceserver.general
>
> I have a site based largely on Retail2002.
>
> I find that occasionally the CommerceContext.Current.UserID property is
> NULL, so the app generates an exception.
>
> This is happening for anonymous requests. I can see in
> Application.cs:Application_BeginRequest() that everything *appears* to be
> happening correctly. I cannot see where the UserID property is being set
for
> the this context.
>
> /harry
>
>
>
>
>
[ Post a follow-up to this message ]
|