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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

load different data on form based on windows login

Status
Not open for further replies.

divinyl

IS-IT--Management
Joined
Nov 2, 2001
Messages
163
Location
GB
Hi all,

Please have a read and let me know your suggestions. I have a vb.net web form that loads up data into various contols on page load. The app is a contact managment app, so an example control on the page would be a drop down list with contact names.

Various administrators are responsible for adding/modifying contact details using this web form- however, for security, these users should only modify contacts within a certain country. So, when an administrator in germany loads the page, they should only see contacts from Germany.

Because of lack of time, etc, i thought of doing the inefficient method of creating different web forms for different countries, but that is silly and cumbersome: i know there must be a way of using the same web form. Can anyone tell me a way of somehow identifying the user on page access (say, getting them to login with windows authentication) and then, based on their login, calling up the right information?

I'm sure this has been done before- if any of you have please let me know, or point me in the direction of some information. Or any other suggestions would be appreciated too.

Thanks!

Neile
 
If you set up IIS to not allow anonymous access for the site, the Windows Login credentials will be captuerd or requested from the user before they can access the site. from there...
Code:
Request.ServerVariables["AUTH_USER"].ToString()

...will get the Windows Login associated to the user accessing the page.

Rhys
Buffy: Spike, what are you doing here, five words or less!
Spike: Out for a walk... bitch!
 
hi- thanks for the fast reply.

Now, thinking a bit further, it would be useful to identify what group the user belongs to, so:

using this captured login, i could use some sort of IF statement to call up the write data, like, if user is in certain group, call up this info.

WOuld you know what code statement to use here- is this the best way to do it?

Thanks again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top