-
Session State Context in ASP.Net
I have done the following in my VB.Net class supporting my ASP.Net application
but got a "Object Reference not set to an instance of an object" error, I
thought I had set it to the current instance of the Context object?! Please
help!
Thanks
Alan...
Imports System.Web
Public Class User
Dim objContext As HttpContext = HttpContext.Current
Dim intAppID As Integer = objContext.Application("App_ID")
Dim strSessionID As String = objContext.Session.SessionID
End Class
-
Re: Session State Context in ASP.Net
Alan,
Public Class User
'Try this!
Dim objContext As new HttpContext.Current
Dim intAppID As Integer = objContext.Application("App_ID")
Dim strSessionID As String = objContext.Session.SessionID
End Class
-
Re: Session State Context in ASP.Net
Thanks. But it didn't work...
Alan...
"zack" <zack_attack190@yahoo.com> wrote:
>
>Alan,
>
>Public Class User
> 'Try this!
> Dim objContext As new HttpContext.Current
>
> Dim intAppID As Integer = objContext.Application("App_ID")
> Dim strSessionID As String = objContext.Session.SessionID
>
>End Class
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks