Reputation: 5370
I'm getting some confusing results around myCustom.ashx handler.
If i visit the handler via the browser:
Token.Instance.User.UserId = 162 // which is correct
If i post to the handler:
Token.Instance.User.UserId = 163 // a new user is generated.
It's seems like when i post it creates a new session.
extra info:
public class myCustom: IHttpHandler, IReadOnlySessionState
<sessionState mode="InProc" timeout="30" cookieName="xxx"/>
Upvotes: 1
Views: 1285
Reputation: 5908
Are you using a tool to do the post? Does it have a different UserAgent string? That could be why you're getting a different session/userId than in the browser.
Upvotes: 3