Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I determine the user logon and how do I stop direct access

Status
Not open for further replies.

yongbum

Programmer
Dec 15, 2005
48
IL
Hi
I'm writting an asp.net app. which will be included as part of the customers intranet site. The user has to logon to the customers site to gain access to my app.
I have 2 questions.
1. How can I determine the logon id is it
Request.ServerVariables("LOGON_USER")
or is this the Windows logon ?

2. How can I ensure that they can't arrive directley to my app via the http address, the only way in should be through the customer site.

Thanks for any help
 
Dim winUser As System.Security.Principal.WindowsIdentity = System.Security.Principal.WindowsIdentity.GetCurrent
Dim strUser As String = winUser.name

that will return DOMAINNAME\username, and can be in your global declarations
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top