473,403 Members | 2,270 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,403 software developers and data experts.

User Roll & Security

22
Hi, and thanks for your time.
Using vb.net

I'm new to .net, recently moved from classic asp!
I'm creating an intranet web application that needs to keep a log of user activity.

What I would have done in classic ASP is to store the user ID from my user table in any new records. Then I could drill down from that as needed. But now with .net and its incorporated security features, I dont see how this approach is going to work!

I have seen examples of getting the current user name, but nothing about a name based on a user ID, or even how to get a user ID.

Could someone point me in the right direction as to how I would go about doing this kind of thing in .net.

I'm using forms based security.

Sorry if it's a bit vague, I'm rubbish at explaining myself.
Jan 26 '09 #1
5 1559
Frinavale
9,735 Expert Mod 8TB
I'm not sure what you are doing.
Have you configured your site to use Forms Authentication with Membership?

If so, a Principal Object is created to represent your user when ASP.NET detects a request for your website. This Principal Object is used to determine if the user is privileged to access certain pages and resources. In your page's you can retrieve it from the HttpContext.Current.User.Identity to determine what the user's name is.

Check out This Video about Membership.

Also, you should consider researching Forms Authentication, and Role Management so that you have a good idea of what happens during authentication and authorization.

-Frinny
Jan 26 '09 #2
TimVtoo
22
Thanks Frinny. I found a really good set of articles hear, which has given some great examples of what can be done with regard to security. I also just took a look at the video link you provided. Very good, thanks. But...

... at the moment I'm more interested in being able to retrieve user information such as user name (not login name) and email address for example, but not necessarily for the currenty logged in user. I want to show details for users that may have made changes to the data!

Thanks

Tim
Jan 26 '09 #3
Frinavale
9,735 Expert Mod 8TB
What do you mean not 'not necessarily for the currently logged in user"?

If you are looking to display the history of data, you need to store that history somewhere. Store it in a Database, or XML file, or where ever you want to. When you want to display the data's history, retrieve the history from where it has been stored...

What exactly are you having problems with??
Jan 26 '09 #4
TimVtoo
22
when a user saves a comment to an enquiry record in the database, I want to save a reference(primary key?) to that user along with it so that i know who did it. Obviously i wouldn't want to save the user name, telephone number and email address each time a user makes a comment.

So when i display a report that lists changes made to the database I need to be able to get the user name and email etc based on the user reference I saved.

Somthing like:

GetUserInfo("TimV").Email ....would return 'timv@whatever.com'
GetUserInfo("Bob").Telephone....would return '0898 444444'

And to make things worse, I will probably want to do this in a GridView... I'll cross that bridge when i come to it :)

Does that make a little more sence??
Jan 26 '09 #5
TimVtoo
22
OK, I have made progress on this subject.
To retrieve sprecific user information (logged in or not):
Expand|Select|Wrap|Line Numbers
  1. Profile.GetProfile("Tim").FirstName
or
Expand|Select|Wrap|Line Numbers
  1. Membership.GetUser("Tim").Email
This has led me to a new problem. I will start a new thread for this... hope this helps someone ??
Jan 27 '09 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Anakim Border | last post by:
App servers such as quixote, webware and skunkweb (just to name a few) offer a clean environment to develop Python webapps. I have some problems, however, understanding their security model. My...
2
by: lobrys | last post by:
hi I build a VB .NET application that makes file access, environnemet acess, database access, etc.... If I ran the app locally, everything works....(normal) If I copy the app on a server, and...
8
by: Tim Marshall | last post by:
I have a problem in that users can't seem to access menu bars created by a developer in the admins group. Details are as follows: I'm following the MS Access Secirty FAQ version 2.41 and I can't...
3
by: Mike Marriott | last post by:
Hello all, Newbie Here (please go easy, you cant make me fell more stupid than I allready do) I have a small, but complex data base, in Access 2000, that I am creating, I have allready...
2
by: Patrick Blackman | last post by:
Hi, need some info on implementing a multiuser winforms application, specifically managing user logins and user preferences & access rights. Are there any frameworks out there for this. I don't...
2
by: gundam.f0rtre55 | last post by:
Hi everybody, for a new release of our J2EE Webapplication, our customer wish to allow the usage of bookmarklets. The application must be able to register URLs with several protocol types, one of...
6
by: SAL | last post by:
Hello, Currently, I'm using Visual Studio 2003, C#, Framework 1.1 and Enterprise Library 2005 (for framework 1.1). I've used the Enterprise Library Configuration utility to create my...
1
by: killbill | last post by:
Hi All, I am struggling with a problem, i want to add ActiveDirectory user to Global Security Group using C# and DirectoryServices. Any suggestiion ??? Thanks.
3
by: at_the_gonq | last post by:
Hello, I am hoping to get some guidance on the following scenerio: I have a password protected site where users have various permissions. Are sessions the best way of storing the user's id? ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.