On May 29, 3:40 pm, Alexey Smirnov <alexey.smir...@gmail.com> wrote:
> On May 29, 10:10 pm,arthernan<arther...@hotmail.com> wrote:
>
>
>
>
>
> > On May 29, 3:05 pm, Alexey Smirnov <alexey.smir...@gmail.com> wrote:
>
> > > On May 29, 9:56 pm,arthernan<arther...@hotmail.com> wrote:
>
> > > > On May 29, 1:37 pm, Alexey Smirnov <alexey.smir...@gmail.com> wrote:
>
> > > > > On May 29, 6:50 pm,arthernan<arther...@hotmail.com> wrote:
>
> > > > > > OK, let's assume I do, Should I code it like MyLib.MySession(Me,
> > > > > > "CustomerID") and avoid dealing with inheritance. Or should I code it
> > > > > > MySession("CustomerID")- Hide quoted text -
>
> > > > > I think all what you need is to set a cookie
>
> > > > > Response.Cookies["CustomerID"].Value = Session["CustomerID"];
>
> > > > > Note, you will need a reporting tool which could read that values from
> > > > > the IIS log.
>
> > > > It's just easy to miss. I'd like something more foolproof.
>
> > > What would make it more foolproof?
>
> > > When you save a cookie, the cookies will be logged in IIS log among to
> > > other data, making them available together to be used in your
> > > reporting. If you gonna save that CustomerID somewhere else, like in a
> > > database, you will have a problem to link the ID and IIS log.- Hide quoted text -
>
> > OK, I did not make mysefl clear. The line:
>
> > Response.Cookies["CustomerID"].Value = Session["CustomerID"];
>
> > Could be easily missed during programming. We don't have a strong
> > testing team here, and we would en un with pages that are not being
> > tracked- Hide quoted text -
>
> > - Show quoted text -
>
> Ah, got it! You should set the cookie only once, in your
> authentication form (e.g. login.aspx). The default expiration date of
> a cookie is the current session. It means this cookie will expire when
> the session is ended. Or you can explicitly set the date, for example
> +1 year. It could help to track existed customers who has not
> authenticated.
I thought we had multiple points of entry, and that they could
increase. But it's not the case.
I think, I complicated myself on this one.
> You can also use global.asax, e.g. Application_BeginRequest() method
> (for all requests) or Application_AuthenticateRequest() (for
> authenticated users only).- Hide quoted text -
This is a good suggestion too. I'll keep it in mind.
Thanks
|