Session Issues int asmx services

Posted by Vuyiswamb under WCF on 8/30/2012 | Points: 10 | Views : 1347 | Status : [Member] [MVP] [Administrator] | Replies : 0
I have a Strange thing happening

<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

<WebMethod(EnableSession:=True)> _ 

and another Method on a class will be called and in that method i have something like this

Dim Session As HttpSessionState = HttpContext.Current.Session

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

Object reference not set to an instance of an object.


Thank you for posting at Dotnetfunda


(No response found.)

Login to post response