|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
FrontController problemI'm working on a frontcontroller implementation. I want to listen a series of requests like the following: GET http://application.com/messages/listMessages?folder=inbox&offset=10 POST http://application.com/messages/sendMessage So I've written a FrontControllerModule class (which I've added to web.config httpModules). As the expected requests doesn't have a file extension, for this to work, I've also added a wildcard application map (Windows 2003). I receive a request, recognize it as a command object and execute it. Now I'm facing this problem: some commands needs to read/write variables in user Session, but there is no Session object! I changed execution time from BeginRequest to AcquireSessionState , but I still doesn't have a Session. Searching the web I've found an interface, IRequiresSessionState, but that works only for HttpHandlers. Any idea on how to resolve this problem? Thank you very much. Are you trying to access the session via the context object?
-- Show quoteRegards John Timney Microsoft MVP "Luis Farzati" <lfarz***@gmail.com> wrote in message news:1137268797.374219.252850@o13g2000cwo.googlegroups.com... > Hello, > > I'm working on a frontcontroller implementation. I want to listen a > series of requests like the following: > > GET http://application.com/messages/listMessages?folder=inbox&offset=10 > > POST http://application.com/messages/sendMessage > > So I've written a FrontControllerModule class (which I've added to > web.config httpModules). As the expected requests doesn't have a file > extension, for this to work, I've also added a wildcard application map > (Windows 2003). I receive a request, recognize it as a command object > and execute it. > > Now I'm facing this problem: some commands needs to read/write > variables in user Session, but there is no Session object! > > I changed execution time from BeginRequest to AcquireSessionState , but > I still doesn't have a Session. Searching the web I've found an > interface, IRequiresSessionState, but that works only for HttpHandlers. > > Any idea on how to resolve this problem? > > Thank you very much. > |
|||||||||||||||||||||||