It seems that there is no access to Session in HttpContext.Current on my base methods. Anyone know a workaround to get that access? I really need Session in my base
methods. Can't really use them if they don't know the current session.
My version is 4.5.2 and My Request and Respone all works like a charm through HttpContext.Current. There's just no Session.
I'm not 100% sure on this, but it's worth a go... it could be that your /Base class needs to implement one of the SessionState interfaces? (depending on read/write access).
Thanks, but looking a little deeper into it (Looking in the umbraco source code) it looks like the base calls is fired in the BeginRequest event. This is bad because Session state has not (and seems to cannot) be set on that early a stage.
That is not at all what I'm experiencing. I have a clean install and that session is just null no matter what I do. Maybe I have to do something myself. The header of the issue is "Listen to PreRequestHandlerExecute to get access to Session state in Base requestModule" Does that mean that they now DO it or the I some how can do it?
Hmm, I installed it. No major breaks back then. Back up your solutions beforehand and you will have no problems going back if something weird should happen.
You might be able to use just the dll's, but I'm not sure.
Tried to just use the umbraco.dll, that didn't really work. It could be because of the dependencies (other projects referencing the dll), or it could be because there are dependencies to other dll's in 4.6.
Session acces in base methods
It seems that there is no access to Session in HttpContext.Current on my base methods. Anyone know a workaround to get that access? I really need Session in my base methods. Can't really use them if they don't know the current session.
My version is 4.5.2 and My Request and Respone all works like a charm through HttpContext.Current. There's just no Session.
Anyone?
/Rune
Hi Rune,
I'm not 100% sure on this, but it's worth a go... it could be that your /Base class needs to implement one of the SessionState interfaces? (depending on read/write access).
http://aspadvice.com/blogs/ssmith/archive/2007/07/29/Accessing-Session-from-an-HttpHandler.aspx
Cheers, Lee.
Thanks, but looking a little deeper into it (Looking in the umbraco source code) it looks like the base calls is fired in the BeginRequest event. This is bad because Session state has not (and seems to cannot) be set on that early a stage.
This might mean that I will have to create my own HttpHandler like Karsten did here:
http://our.umbraco.org/forum/developers/api-questions/7973-MemberGetCurrentMember()-in-base
I just don't want to do that if there is any other way!?
/Rune
Seems to be resolved in changeset 59555 according to Codeplex, so it should work?
Cheers,
/Dirk
That is not at all what I'm experiencing. I have a clean install and that session is just null no matter what I do. Maybe I have to do something myself. The header of the issue is "Listen to PreRequestHandlerExecute to get access to Session state in Base requestModule" Does that mean that they now DO it or the I some how can do it?
/Rune
Did you ever get this resolved? I'm experiencing the same issue.
-C
Hi Chad,
It has been resolved in Umbraco 4.6 latest 1.0.3966.21682.zip
Get it here: http://nightly.umbraco.org/umbraco%204.6/4.6%20Alpha/
It will NOT be resolved with a patch for 4.5, but the 4.6 runs fine on my solutions. So use that if you need it.
/Rune
Can you get away with just upgrading the umbraco.dll? Or do you need to just fully install it?
-C
Hmm, I installed it. No major breaks back then. Back up your solutions beforehand and you will have no problems going back if something weird should happen.
You might be able to use just the dll's, but I'm not sure.
/Rune
Tried to just use the umbraco.dll, that didn't really work. It could be because of the dependencies (other projects referencing the dll), or it could be because there are dependencies to other dll's in 4.6.
-C
is working on a reply...