473,498 Members | 98 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SQL database users/roles

hi all, is it possible to Incorporate the database users/roles element
in my c# application?
i'm trying to restrict areas of the application for certain users..if
i could put these users into a role and then call that role only
allowed to access this area - that would be perfect.
Feb 19 '08 #1
3 1897

"nologo" <ze****@hotmail.comwrote in message
news:19**********************************@d5g2000h sc.googlegroups.com...
hi all, is it possible to Incorporate the database users/roles element
in my c# application?
i'm trying to restrict areas of the application for certain users..if
i could put these users into a role and then call that role only
allowed to access this area - that would be perfect.
<http://www.codeguru.com/csharp/.net/net_security/authentication/article.php/c7415/>

Feb 19 '08 #2
On 19 Feb, 09:23, nologo <zel...@hotmail.comwrote:
hi all, is it possible to Incorporate the database users/roles element
in my c# application?
i'm trying to restrict areas of the application for certain users..if
i could put these users into a role and then call that role only
allowed to access this area - that would be perfect.
You can use Microsoft.SQLServer.SMO which is the SQL Server management
objects. Alternatively wrap a call to sp_helprolemember which will
give you a list of which users are in which roles. After that Mr
Arnolds suggestion of using custom Principal is a good one, just make
your implementation return info based on what you queried using the
either SMO or the SP above.
Feb 19 '08 #3
many thanks guys, i'll look into that this afternoon!thanks
Feb 19 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
4889
by: Oren | last post by:
Hi, Is there any way that calls to sp_addrolemember and sp_droprolemember can be enabled for non database owners and non sysadmin members? This would be very helpful for an application I'm in...
0
1331
by: DCount17 | last post by:
I need to create a windows application (using C#) that creates/assigns and retrieves database roles on Analysis Services. While I can get the users from the "Members" table on SQL Server, I am...
0
2043
by: DCount17 | last post by:
I need to create a windows application (using C#) that creates/assigns and retrieves database roles on Analysis Services. While I can get the users from the "Members" table on SQL Server, I am...
4
2472
by: MS User | last post by:
VB.Net / SQL 2K We are developing a VB.Net application and the question is regarding the Login screen We have a table which stores the access-level for each users. Here is our requirement. ...
5
4296
by: isideveloper | last post by:
I'm building a new C# web application that will provide my company some administrative operations that were previously only completed by tweaking the data in the database. 1. Encrypted password...
0
4455
by: Douglas J. Badin | last post by:
Hi, The problem with Authorization is it stops at the first match and doesn't permit Grouping. On the Web Site, I am trying to Secure Page Access and SiteNaviagation by implementing the...
4
3249
by: AC | last post by:
Hi there. My asp.net 2.0 development website uses roles to control access to sections of my site, configured using the asp.net configuration tool, which is great. Except that isn't available once...
5
2895
by: Mahernoz | last post by:
Hi Everyone! I have a problem here. I have used the latest asp.net membership & profiles functionality in my site. I have 2 roles admin and user. I also have a user named admin. Now, my...
1
1197
by: Jeff | last post by:
hi asp.net 2.0 sql server 2005 (I'm using that Express version) I have a asp.net project here which I'm wondering how to deploy the database of. Right now I locally created a database and...
1
6884
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
7375
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5460
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4904
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...
0
4586
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1416
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
651
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
287
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.