| | |
Session in app_code
Please support our ASP.NET advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Jan 2007
Posts: 47
Reputation:
Solved Threads: 0
i have a class in app_code folder which implements the Ihttphandler Interface.so when the execution enter in the Processrequest method i have to use the session variables created on login page.but there is no such Session Object present there.
on login page i hav created session like this
session("userid")=dr("user")
i hav context which is object of Httpcontext class which is a input parameter in the Processrequest method.
with this context object i have wrote
dim user as string =context.Session.Item("userid")
but this will genearte an error
An exception of type 'System.NullReferenceException' occurred in App_Code.7qviugdw.dll but was not handled in user code
Additional information: Object reference not set to an instance of an object.
how can access session inside this class?
on login page i hav created session like this
session("userid")=dr("user")
i hav context which is object of Httpcontext class which is a input parameter in the Processrequest method.
with this context object i have wrote
dim user as string =context.Session.Item("userid")
but this will genearte an error
An exception of type 'System.NullReferenceException' occurred in App_Code.7qviugdw.dll but was not handled in user code
Additional information: Object reference not set to an instance of an object.
how can access session inside this class?
•
•
Join Date: Mar 2008
Posts: 1
Reputation:
Solved Threads: 0
•
•
•
•
i have a class in app_code folder which implements the Ihttphandler Interface.so when the execution enter in the Processrequest method i have to use the session variables created on login page.but there is no such Session Object present there.
on login page i hav created session like this
session("userid")=dr("user")
i hav context which is object of Httpcontext class which is a input parameter in the Processrequest method.
with this context object i have wrote
dim user as string =context.Session.Item("userid")
but this will genearte an error
An exception of type 'System.NullReferenceException' occurred in App_Code.7qviugdw.dll but was not handled in user code
Additional information: Object reference not set to an instance of an object.
how can access session inside this class?
Last edited by Hausen; Mar 6th, 2008 at 2:38 am.
![]() |
Similar Threads
- Session end (PHP)
- Session variable (ASP.NET)
- session variable:again (ASP.NET)
- how can i used session and cookies ??? (PHP)
- How to maintain session for Web Services Object? (VB.NET)
Other Threads in the ASP.NET Forum
- Previous Thread: SQL Server Question...
- Next Thread: Grid view in asp.net using C#
| Thread Tools | Search this Thread |
.net 2.0 3.5 activexcontrol advice ajax alltypeofvideos asp asp.net bc30451 bottomasp.net browser businesslogiclayer button c# c#gridviewcolumn checkbox class click commonfunctions compatible confirmationcodegeneration content contenttype countryselector courier css dataaccesslayer database datagrid datagridview datagridviewcheckbox datalist deadlock development dgv dropdownlist dropdownmenu edit expose flash flv formatdecimal forms formview gridview homeedition iframe iis javascript jquery list listbox login menu microsoft mono mouse mssql multistepregistration nameisnotdeclared news numerical objects order panelmasterpagebuttoncontrols problem radio ratings rotatepage save schoolproject search security serializesmo.table silverlight smartcard sql sql-server sqlserver2005 suse textbox tracking unauthorized validation vb.net video videos virtualdirectory vista visual-studio visualstudio vs2008 web webarchitecture webdevelopemnt webservice wizard xml youareanotmemberofthedebuggerusers





