Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
hello i have web service in my project.
i edit the "EnableSession=true" property ,
now i run a class in the webService and i wont in the class to use in "Context.Session"

so i send to the constructor the WebService refrence
now i try with this referense to use Context.Session
and i get :
NULL REFERENCE exception
"Object reference not set to an instance of an object."

please helpppp !!
Posted
Comments
Sergey Alexandrovich Kryukov 22-Oct-14 17:56pm    
Not enough information. This problem is usually easily spotted by the debugger.
—SA
Member 10631195 22-Oct-14 17:59pm    
i can use in the webservice in the "Context.Session" but whare i crete a new class
and i wont in the class to add value in "Context.Session" i get exception
Sergey Alexandrovich Kryukov 22-Oct-14 18:04pm    
Debugger...
Member 10631195 22-Oct-14 18:04pm    
[WebMethod(EnableSession=true)]
public string xy(string value)
{
///here i can get sessions values ==>Context.Session["myVal"];
class MyClass=new MyClass(this);
//in myClass i tray to put value at the "Context.Session"
}
Sergey Alexandrovich Kryukov 22-Oct-14 18:05pm    
And..?
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900