Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / April 2008

Tip: Looking for answers? Try searching our database.

HttpHandlers, Server.Transfer and Session State

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Fernando Rodriguez - 27 Apr 2008 17:24 GMT
I created an HttpHandler for rewritting URLs.
It simply checks if the requested page is on a list of "special" pages (that
do not exist) and if it is on the list then it will transfer to an ASPX page
that will generate the content dynamically.

The problem is that after the call to Server.Transfer or Server.Execute the
page i'm transfering to throws an exception when it tries to access the
Session object. The error says that I must set enableSessionState to true on
the page directive or the pages tag on the web.config. Obviously they are
both set to true.

I also implemented IRequiereSessionState on my HttpHandler but it did not
make a difference.

Any suggestions?
bruce barker - 28 Apr 2008 16:49 GMT
you are probably doing the transfer before session is loaded. why are you
doing server transfer anyway? why not RewritePath.

-- bruce (sqlwork.com)

> I created an HttpHandler for rewritting URLs.
> It simply checks if the requested page is on a list of "special" pages (that
[quoted text clipped - 11 lines]
>
> Any suggestions?
news.microsoft.com - 28 Apr 2008 18:38 GMT
Thanks. If I use rewrite path it will postback to the page dynamic page url.

The session was already loaded, I tested it before the transfer call.

What I ended up doing was use PageParser to create an instance of the
compiled version of the .ASPX file and then call it's ProcessRequest method.
That's how it's done by the built-in handler.

> you are probably doing the transfer before session is loaded. why are you
> doing server transfer anyway? why not RewritePath.
[quoted text clipped - 20 lines]
>>
>> Any suggestions?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.