Session Issues int asmx services
I have a Strange thing happening
Code:
<WebMethod(EnableSession:=True)> _
i have a web method with a
and the method before it returns something it will call another method Which also has the
Code:
<WebMethod(EnableSession:=True)> _
and another Method on a class will be called and in that method i have something like this
Code:
Dim Session As HttpSessionState = HttpContext.Current.Session
Code:
Session("usercompany_ID") = drUser("usercomp_id")
Session("user_id") = drUser("user_id")
Session("UCLev1_ID") = drUser("UCL1_ID")
Session("UCLev2_ID") = drUser("UCL2_ID")
Imidiately when i try to assign the drUser("usercomp_id") to the session to Session("usercompany_ID") i get an Error
drUser("usercomp_id") has a Value its not nothing
Error
Object reference not set to an instance of an object.
Thanks
Re: Session Issues int asmx services
Hello,
This is most likely due to the fact that Session("usercompany_ID") is null.
Try using the alternative method:
http://msdn.microsoft.com/en-us/libr...state.add.aspx
Gary