473,320 Members | 1,884 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 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 1868
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Giovanni Bassi | last post by:
Hello Group, I using impersonation on my web app. I am explicitely setting the User with the identity element in the web.config like this: <identity impersonate="true" userName="MyUsr"...
4
by: Dan Bart | last post by:
I am using an application which is a modification of IBuySpy Portal. It is using Forms authentication. Users login and their name is added to Context Then I use: ...
2
by: AndiV | last post by:
Each of my intranet page (windows authentication) needs to validate user's roles stored in the database. Currently, I retrieve the the User.Identity.Name property, then query the database for...
10
by: kiran_s_rao | last post by:
I have a serious issue that seems to be intermittent with User.Identity.Name. In an environment where about 100+ users are logging on to a site with forms authentication, calling ...
2
by: nalbayo | last post by:
what's the difference between HttpContext.Current.User.Identity.Name; and Context.User.Identity.Name; thanks!
6
by: Sjaakie | last post by:
Hi, Is HttpContext.Current.User unique for each visitor or is it shared across an application? Have some problems that might have to do with this and found contradictory answers on this...
0
by: D-Someone | last post by:
We have an active directory user that just had her username renamed. When the user is running an application that calls our CurrentUser web service method (which returns the value of...
4
by: Doogie | last post by:
Hi, I am using HttpContext.Current.User.Identity.Name to get a user id from a web application. I then use that as part of a name of a cookie I'm writing. 30 minutes later I do a refresh of this...
0
by: =?Utf-8?B?QW50b25pbyBPJydOZWFs?= | last post by:
We changed a username in AD. The user now logs on to a computer on our network using the new username without any problems. They can not logon using the old username. However, when they access a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.