Page 1 of 1

Posting to Ashx files and requesting token

Posted: Mon Feb 02, 2009 9:19 am
by frosty
I'm getting some confusing results around myCustom.ashx handler.

If i visit the handler via the browser:

i get Token.Instance.User.UserId = 162 // which is correct

If i post to the handler:
i get Token.Instance.User.UserId = 163 // obviously a new user is generated.

Any thoughts?

Re: Posting to Ashx files and requesting token

Posted: Mon Feb 02, 2009 9:36 am
by mazhar
Probably that's because browser has a different session.

Re: Posting to Ashx files and requesting token

Posted: Mon Feb 02, 2009 1:16 pm
by frosty
I've included IReadOnlySessionState

public class test : IHttpHandler, IReadOnlySessionState {

The issue seems to be that the session in timing out. Tho in the web.config

timeout="30" // 30 mins

<sessionState mode="InProc" timeout="30" cookieName="AC7.SESSIONID"/>