session_start problems among other things?

  • Thread starter Peter R. Vermilye
  • Start date
P

Peter R. Vermilye

I am involved on a web application that is using a third party set of
APIs for remote database access (middleware). I've been brought in
because of my background in programming, thus I'm new to this web
development process so forgive my ignorance.

The third party has a shopping cart which must be saved in the
session.

When navigating from page to page we experience some odd behavior on
the hosted server that we do not see on our internal development
server. The hosted server is a Windows 2003 Server while our internal
server was a Windows 2000 Server. I implemented a Global property to
save and restore the cart to the session so as to concentrate the
access to the shopping cart to a central location. This project
started out using plain ASP under the (patently false) assumption that
ASP.NET APIs could be called from ASP pages but the development was
far enough along that a total rewrite was not done of the existing ASP
pages. Thus, only those pages that use the API are ASP.NET pages and
the rest are ASP pages. Even more troubling to me (due to my lack of
experience in this) is that the web guy uses intermediate ASP pages
sometimes to pass session state information to the ASP side. Things
like how many items are in the cart, the total $ in the cart, etc.
This is not to say that ever page transition goes through an ASP page,
but whenever a page that could change a relevant session variable is
navigated away from it typically is done by way of an ASP page using a
request string.

One odd behavior that is exhibited in this site. A page will be built
that contains items available to be placed in the shopping cart. The
links are created with a request string that contains the ID of the
item. When hovering over the link I can see the destination URL in
the status line of the web browser, i.e.

http://test.mywebpage.com/details.aspx?ID=62

But, when the link is clicked, the destination web page does not
always get the request string. When I view the source code in my web
browser for the intial page (the one that displays the list of items)
I can see the correctly formed URL as part of the href= so I know it's
there. Also, we are frequently losing the cart out of the session for
no apparent reason.

In an attempt to trace some of these problems I wrote a method that
will log a string to an auxiliary Access database table we are using
on our system. The information logged is the date/time, the string
passed to the method, and the value of the
HttpContext.Current.Session.SessionID property. Then, I stuck a line
in the Global.Session_Start subroutine that logs a string to indicate
that Session_Start was executed. I was quite surprised to discover
that Session_Start is executed almost every time that an ASP page is
navigated to. As further information, the session state is InProc and
cookieless is false. I've tried to use a state server but have
problems with an object from the third party not being serializeable.
Said object isn't being saved in the session (at least not by our
code) and I'm trying to track down where it is coming from. I am
going to try changing the cookieless value in web.config to true to
see what effect that has but I'm afraid it will generate other
problems because the web guy uses Response.Redirect() a lot in the
code and doesn't that lose the cookie information embedded in the URL?

I know this is a long winded explanation but the boss has said if
these problems are not resolved by the end of the week he's gonna have
to refund the client's money and may lay off several people (hopefully
not me but who knows). Any thoughts on things to try? I've tried
what I thought were the obvious things but I feel like a fish out of
water sometimes with this stuff right now.

Thanks for any assistance.

Peter R. Vermilye
Sr. Systems Engineer
Desoto Systems, Inc.
Memphis, TN

(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top