473,511 Members | 17,486 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Possible? Authentication using Windows/Active directory, but access SQL Server using Membership class

Hi, I was wondering if someone could advise on if the following is
possible. I have one website that is available to the public using
Forms authentication and the Membership class, it creates/stores user
information in a SQL Server 2005 db. I have another website that will
administer the first website, allowing admins to look at all of the
users in the db and see specific info from the database.The admin site
is more secure than the general user site and is using Windows
authentication through active directory with impersonation turned on,
anonymous access off, and basic authentication on w/ SSL.

What I'd like to happen is an admin user logs on to the admin site
through windows authentication, then using the Membership class
functionality, pluck information from the db about the public
users(such as displaying all the users in a datagrid using
Membership.getAllUsers) . The problem is my program fails when I try to
use any of the Membership functions that access the database, I'm
assuming this is because I'm trying to access the databse using the
Membership class, but that class has no idea who the user is. (i do
however have the membership element in web.config properly set). Is
there any way to manually create a membership object using the login
parameters the user entered into the windows authentcation login? If my
explanation is too confusing, ill be happy to clarify, im stuck!

Thanks.

Apr 14 '06 #1
1 2667
After another day of debugging, I can narrow down my question. When I
attempt to use any of the Membership class functions that access the
db, it is the mydomain/processidentity that attemps to log in to sql
server, and this fails as explained above. Accessing the database by
other means, such as creating my own sql commands, sqldatareaders,
etc., correctly logs into sql server as the impersonated user and works
properly. So it seems that the problem is the Membership class
functions run under the processidentity id, not the impersonated user
id. Is there a way around this (besides sql server granting login
rights to mydomain/processidentity)?

Thanks.

Apr 15 '06 #2

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

Similar topics

1
1466
by: Sriram Venkataramani | last post by:
In our application we have to authenticate users using Forms authentication, but using the username and password of the Windows 2000 Active Directories. That is, the user will enter his username...
6
2449
by: varkey.mathew | last post by:
Dear all, Bear with me, a poor newbie(atleast in AD).. I have to authenticate a user ID and password for a user as a valid Active Directory user or not. I have created the IsAuthenticated...
10
4032
by: Hriday | last post by:
Hi there, Please help me..It is urgent This is Hriday, working on windows authentication with Active Directory... My requirment is when a user sends a request to my web Applicatoin I want to...
6
3986
by: Jimmy | last post by:
Hi, I need to develop a secure Web Service that requires a username and password. One of the requirements is that the WS supports Windows Authentication, meaning accepts the username and...
18
3385
by: troywalker | last post by:
I am new to LDAP and Directory Services, and I have a project that requires me to authenticate users against a Sun Java System Directory Server in order to access the application. I have found...
6
2350
by: Matt Adamson | last post by:
Guys, I'm unsure how to use windows authentication in an intranet application. I'd like to user existing windows account to identify users however the issue I have is how to then add settings to...
1
1368
by: =?Utf-8?B?ZG90TmV0QnVkZHk=?= | last post by:
Hi, I have a created a new website (Default web site is stopped) for a classic ASP application. The local path under Home Directory is F:\inetpub\wwwroot\codebase and the Anonymous access, Basic...
0
13814
JamieHowarth0
by: JamieHowarth0 | last post by:
I have been trying to find a solution to this on the Internet for months. Literally, ages and ages and ages, praying that someone in the open-source community has enough knowledge to put together an...
2
2335
by: Mel | last post by:
We have a private website, we call it a portal, where people can login and get quotes and such. When you go to the portal URL (https:// example.url.com) a small dialog appears (I believe this is...
0
7245
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
1
7085
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
7512
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
5671
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,...
0
4741
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
3214
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1577
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
785
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
449
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.