471,306 Members | 884 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,306 software developers and data experts.

Help with HttpContext.Current.User.Identity.Name

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
Nov 19 '05 #1
1 1726
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

Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by AndiV | last post: by
6 posts views Thread by Sjaakie | last post: by
reply views Thread by =?Utf-8?B?QW50b25pbyBPJydOZWFs?= | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.