Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Help with HttpContext.Current.User.Identity.Name

Reply
Thread Tools

Help with HttpContext.Current.User.Identity.Name

 
 
=?Utf-8?B?dnZlbms=?=
Guest
Posts: n/a
 
      09-29-2005
Hello:

I am trying to initialize a User object at application start:

Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
' Fires when the application is started
Dim loOutcome As InnoBox_BO.User._Outcome
Dim goUser As InnoBox_BO.User
goUser = InnoBox_BO.User.GetInstance
loOutcome =
goUser.CreateByUserID(HttpContext.Current.User.Ide ntity.Name)

End Sub

I am getting an exception that says that
HttpContext.Current.User.Identity.Name is not valid.

Can somebody help me?

Thanks.

Venki
 
Reply With Quote
 
 
 
 
Brock Allen
Guest
Posts: n/a
 
      09-29-2005
Application_Start is called when the app starts prior to the request being
processed. IOW, the runtime hasn't had a chance to determine who the user
is.

-Brock
DevelopMentor
http://staff.develop.com/ballen

> Hello:
>
> I am trying to initialize a User object at application start:
>
> Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
> ' Fires when the application is started
> Dim loOutcome As InnoBox_BO.User._Outcome
> Dim goUser As InnoBox_BO.User
> goUser = InnoBox_BO.User.GetInstance
> loOutcome =
> goUser.CreateByUserID(HttpContext.Current.User.Ide ntity.Name)
> End Sub
>
> I am getting an exception that says that
> HttpContext.Current.User.Identity.Name is not valid.
>
> Can somebody help me?
>
> Thanks.
>
> Venki
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help Help Help Pentax S5i Help needed (Please) The Martian Digital Photography 14 06-20-2008 07:56 AM
HELP - HELP - HELP =?Utf-8?B?S2ltb24gSWZhbnRpZGlz?= ASP .Net 4 03-09-2006 12:46 PM
HELP WANTED HELP WANTED HELP WANTED Harvey ASP .Net 1 07-16-2004 01:12 PM
HELP WANTED HELP WANTED HELP WANTED Harvey ASP .Net 0 07-16-2004 10:00 AM
HELP! HELP! HELP! Opening Web Application Project Error =?Utf-8?B?dHJlbGxvdzQyMg==?= ASP .Net 0 02-20-2004 05:16 PM



Advertisments