Welcome to HostingForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

ISAPI Filter and ASP session object

 
   Web Hosting Problem Solving Community! (Home) -> IIS RSS
Next:  Getting Started  
Author Message
anonymous1275

External


Since: Feb 25, 2004
Posts: 11



(Msg. 1) Posted: Tue May 18, 2004 10:41 pm
Post subject: ISAPI Filter and ASP session object
Archived from groups: microsoft>public>inetserver>iis (more info?)

Hi, all
I want to create a Filter to redirect the illegal request. But there is a problem:
I don't know how to handle ASP session object, such as get data from session.
If someone has a sample about these, it will be excellent.
Anyone can help me?
Thanks.

 >> Stay informed about: ISAPI Filter and ASP session object 
Back to top
Login to vote
someone9

External


Since: Aug 25, 2003
Posts: 2419



(Msg. 2) Posted: Wed May 19, 2004 12:38 am
Post subject: Re: ISAPI Filter and ASP session object [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

It is not possible for an ISAPI Filter to access ASP Session state.

Why would the filter need to access ASP session state to redirect an illegal
request?

What is the criteria that you are choosing to redirect, and why?

--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"Ray" <anonymous DeleteThis @discussions.microsoft.com> wrote in message
news:866C126C-1CFD-428D-8864-AE7D53D5B0C1@microsoft.com...
Hi, all
I want to create a Filter to redirect the illegal request. But there is a
problem:
I don't know how to handle ASP session object, such as get data from
session.
If someone has a sample about these, it will be excellent.
Anyone can help me?
Thanks.

 >> Stay informed about: ISAPI Filter and ASP session object 
Back to top
Login to vote
mark10

External


Since: Apr 22, 2004
Posts: 6



(Msg. 3) Posted: Wed May 19, 2004 10:44 am
Post subject: Re: ISAPI Filter and ASP session object [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

 > It is not possible for an ISAPI Filter to access ASP Session state.
 >=20
That's entirely correct, but you can do SetHeader("url", ...) from an =
SF_NOTIFY_PREPROC_HEADERS or an SF_NOTIFY_AUTH_COMPLETE filter and =
"redirect" the request to an ASP page that can then access the session. =
You can also add either a custom header or munge the query string so =
that the request URL gets passed to your ASP page. I doubt this is what =
you want though...

 > Why would the filter need to access ASP session state to redirect an =
illegal
 > request?
 >=20
 > What is the criteria that you are choosing to redirect, and why?
 >=20
Perhaps it's an attempt to implement some kind of bizarre security =
layer? e.g. old code:

If Session("youmustbeagoodpersonthen") <> 1 Then
Response.Write "go away"
Response.End
End If

.... and then we want this done automatically from the filter. Obviously =
my solution doesn't help much with this kind of code Smile

If this is the case, try writing out a session cookie of your own and =
then checking that in the filter instead.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: ISAPI Filter and ASP session object 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
How to get session ID in ISAPI Filter - Hi, all At first, I must thank for David Wang's and Mark Weaver's answers. I have known that the ASP session object can't be used in ISAPI. There is other problem, please help me. I want to get a session ID in ISAPI filter, but how to do it? If it is..

how to get session within ISAPI Filter ? - Hi, I want to get the value of session("LoginId") within my ISAPI Filter,How to do it? Thanks! Best Reguards!

Session Object problem - Hi, I have the following problem. I use the Session object in my aspx. Session.Add("Campaign", null); .. .. .. Session["Campaign"] = camp; Response.Redirect("DataEntry.aspx"); In DataEntry.aspx I try to get back the val...

Session object becoming unreliable - I'm starting to have trouble with Session variables in ASP.NET 2.0 on Windows 2003 Server IIS. The project has been working for about 2 years, but lately users are complaining that strange things are happening, and I've traced it to a problem with the..

can i use "session" object inside sql server - hi i want to map the IUSR account to a specific Sql roles according to the user type that was logged in. it would be interesting if i could ask the content of a session var from inside a sql st.proc. and then based on the session var map to its specific...
   Web Hosting Problem Solving Community! (Home) -> IIS All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]