Help with HttpContext.Current.User.Identity.Name

G

Guest

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.Identity.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
 
B

Brock Allen

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top