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
>