It seems that my site is losing session information when using
Server.Transfer. I have a page called PictureGallery.aspx. It takes an
argument which is an index id, so it would look like
PictureGallery.aspx?id=30 to display gallery 30. In this way I have a
database driven picture gallery. To improve indexing, I put code in
Global.asax to allow me to get to the same page with a url like this:
Pictures_30.aspx. There is no Pictures_30.aspx, the
Application_BeginRequest parses the url, captures it, and calls
Server.Transfer("PictureGallery.aspx?id=30");
However, when I try to access a session variable on the page, I get the
error:
HttpException (0x80004005): Session state can only be used when
enableSessionState is set to true, either in a configuration file or in
the Page directive]
If I go to the page directly, instead of using the Server.Transfer, the
page works fine. Why is this happening? Is there a workaround?
I am using this redirect system to make it as easy as possible to be
indexed by search engines or for people to type in a url to email a
friend to view a picture gallery.
Thank you very much.
David
Meet people for friendship, contacts,
or romance using free instant messaging software! See a picture you
like? Click once for a private conversation with that person!
http://www.SocialNetwork.com
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!