Re: session data missing

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



well so far i couldn't see any pattern. i use forms authentification, below
is the web.config snippet. i receive notification when obj ref exception
occurs, but it doesnt help much. the only place where session data is being
written is after the login, when i put all the data regarding the logged on
user in a session object. after that i retrieve that data with
object UserData = System.Web.HttpContext.Current.Session["UserData"];

web.config:
<authentication mode="Forms">
<forms name=".ASPXAUTH" loginUrl="Login.aspx"
defaultUrl="forme/home/Default.aspx" protection="All" timeout="60"
path="/"></forms>
</authentication>


and this it the code that creates the object in session (which we use later
on as static property, Korisnik is the name of the class in app_code)

public static Korisnik Trenutni
{
get
{
object oKorisnik =
System.Web.HttpContext.Current.Session["korisnik"];
if (oKorisnik != null)
return ((Korisnik)oKorisnik);
else
return null;
}
}


"Mark Rae [MVP]" wrote:

"Nedim" <Nedim@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:32388E87-99E4-401A-B6F5-9C5D3AC22215@xxxxxxxxxxxxxxxx

Do you have any code which tears down a user's session by calling
Session.Abandon(), maybe when a user logs out...? Could this be being
called
unexpectedly...?

No, there is no sign out code at all, as i have very stupid users, and
they
exit via closing the browser (or just shutting down the computer).

Starting to run out of ideas now...

Do you have any code at all which removes and/or modifies Session variables?

Are you using Forms Authentication?

Do you receive a notification of every error?

Can you discern any pattern to this?


--
Mark Rae
ASP.NET MVP
http://www.markrae.net


.



Relevant Pages

  • Getting close.
    ... another student who was yet to solo. ... the session to be called cross wind circuits. ... Was good this time because there was not only me in the pattern, ...
    (rec.aviation.piloting)
  • Getting close.
    ... another student who was yet to solo. ... the session to be called cross wind circuits. ... Was good this time because there was not only me in the pattern, ...
    (rec.aviation.student)
  • Re: tricks out of your reach
    ... 15 and without a clean pattern). ... I spend the majority of each practice session drilling stuff I am ... time I juggle. ...
    (rec.juggling)
  • Re: Finding what user is logged in.
    ... Especially if you have a service already, registering for TS session ... > Hi Chuck Chopp! ... >>> using the console Handler routine to catch the logoff event? ... >> There's also Winlogon Notification Packages that you can write that will ...
    (microsoft.public.platformsdk.security)
  • Re: ObjectContext
    ... I am implementing the pattern IUnitOfWork and named the interface ... Since Unit of Work pattern when used it seems like a Session being ... Just because the unit of work happens to be a session, that doesn't mean that's what the interface ought to be called. ...
    (microsoft.public.dotnet.languages.csharp)