active-directory

ASP.NET Membership - Which RoleProvider to use so User.IsInRole() checks ActiveDirectory Groups?

Very simple question actually: I currently have IIS anonymous access disabled, users are automatically logged on using their Windows login. However calling User.IsInRole("Role name") returns false. I double-checked User.Identity.Name() and the "Role name" and it should return true. I currently have this in my Web.Config: UPDATE I was ...

Can Biztalk use a remote MSQL server in a different domain without a trust relationship?

I have a remote MSQL instance that I want to use with biztalk. My machine running biztalk cannot join the same domain as the MSSQL instance, nor can we create a trust relationship between the two windows domains. Is there a way to configure biztalk to authenticate? Username/password (like any other DB would use) would be perfectly fin...

C# 3.0: Find SMTP Servers within a Domain

I'm using C# 3.0 and the System.DirectoryServices namespace (not the newer System.DirectoryServices.AccountManagement namespace of .NET 3.5). How can I find all of the SMTP Servers on the local domain? Is this even possible? Is there another way to accomplish this? ...

Can a Silverlight application authenticate versus a local LDAP/ActiveDirectory Server

If I have an externally hosted application (www.outside.com) outside the firewall but users within a company wanted to be able to enable LDAP authentication against their local (behind the firewall) AD server (acting as LDAP) or other LDAP server (call it ldap.inside.com), how would this be done. It seems technically possible in that wh...

What is the NativeGuid in DirectoryEntry when querying via the WinNT provider?

I'm writing an application which I want to work with both Active Directory and local users and groups. I thought I could use the NativeGuid property of a DirectoryEntry as a unique identifier which was retrieved using the WinNT provider against LocalHost. However, using the following code in LinqPad I get the same NativeGuid for both en...

Emailing large lists in SharePoint fails regularly

I have a list that contains roughly 4500 items in it. The default view is set to return 25 items at a time. The list is a discussion board set up to receive email updates, receiving approximately 30 per day. I have an issue where every week or so the email stops working. Anyone who emails the list gets an Undeliverable message. Disa...

ASP.NET ChangePassword control with ActiveDirectoryMembershipProvider

I have a webapp that uses Forms Authentication using ActiveDirectoryMembershipProvider. That works fine... users can do login successfully. Once the user do login, he can change the password. We use a ChangePassword control that retrieve the Membership information and uses the OLD and new password to change the user's password. THAT Do...

Unit tests for code accessing ActiveDirectory

What's the best way to unit test an application accessing the ActiveDirectory and/or mock the dependencies to the AD? All the required types such as DirectorySearcher and DirectoryEntry don't appear to be easily mockable. We've got methods like FindByUserName() and would like to (unit) test them. ...

How to set mailbox delegates in Exchange 2003

I am trying to implement a small windows application in C#.NET which will allow user to quickly set mailbox delegate rights. I am thinking of seperating this from Outlook, so I want to do it directly with exchange server. The exchange server version I am using is 2003. I have done hours of Google search on it and found CDO, CDOEX, can no...

Logging AD User Actions (with deleted users)

We are about to migrate an intranet web application from using a proprietary forms-based security to Active Directory. The application logs a variety of user actions, and there is a significant amount of data associated with user accounts. Our plan was to migrate all of these UserId columns in various tables: from a foreign key linking...

How do I authenticate a user with the "Smart card is required for interactive logon" set?

http://support.microsoft.com/kb/892424 When the "Smart card is required for interactive logon" is set on Active Directory, it generates a random password. How do I utilize a smart card to authenticate a user over LDAP from a web application? How do I know who the user is? Is there a way to access the cert? Can I get it from the session...

Find out when a user's certificate is going to expire

Does anyone know how I could go about finding out when a certificate for user is set to expire? I know I can get pull all of the certificates for a given user by usin the following code: Set objUserTemplate = _ GetObject("LDAP://cn=userTemplate,OU=Management,dc=NA,dc=fabrikam,dc=com") arrUserCertificates = objUserTemplate.GetEx("us...

How can I get the Active Directory DialIn Permission setting from LDAP using VBScript?

In Active Directory, there is a tab called "Dial-In", and under that tab is a radio button control with three settings: Allow Access Deny Access Control access through remote access policy I'd like to write a VBScript to take a user name, and return the setting for that user. (I'm actually modifying an existing VBScript, which is why ...

ASP.NET Active Directory Membership Provider and SQL Profile Provider

Hey All, I am currently designing a Membership/Profile scheme for a new project I am working on and I was hoping to get some input from others. The project is a ASP.NET web application and due to the short time frame, I am trying to use any and all built in .NET framework components I can. The site will probably entertain < 5000 users...

Authentication Problem When IP Address Is Used in the URL

I am using IIS 6.0 and have a virtual directory setup. The server is setup on my company's intranet. Under the security settings, anonymous access is disabled, integrated windows authentication is enabled, digest authentication for windows domain servers is enabled, and the realm has our AD domain address. Everything works fine with thi...

LogonUser API to authenticate a user in VB.Net

I am having a problem using LogonUser from vb.net to authenticate a user. I am using the LogonType of "LOGON32_LOGON_NETWORK" (3). The documentation specifies to use this option for simple authentication and that it does not cache credentials. The problem I am having is if a user has just changed their password, they can login using e...

Is there a way to "link" windows authentication mode with a membership provider?

Edit: I think I can boil it down to: I want to use windows authentication mode, but be able to get a list of users like you would with Membership.GetAllUsers(). I'm trying to develop a solution for use on an intranet, so all the users will be authenticated. I guess I'm looking for a best of both worlds solution. Here's the gist (I'...

Third-Party CA Certificate being removed from Server 2008

We have a third party we are working with that is running an internal (vpn site to site connection) that is using their own CA. We have been given a .p7b file which we import into Third-Party trusted CA to get it to work properly with our WCF Services. The problem is that for some reason the Certificate keeps getting removed. I believ...

programming the active directory

hi, I've got an asp application running but i want to search the Active Directory. i am using vb (visual web developer 2008) how do i search the active directory for a given user? ie: user enters login name in text box, clicks submit. active directory is searched on-click for this user. when found user information is displayed . Tha...

impersonation of active directory user in vb.net

hi, i've never programmed the active directory but i would like to do the following: on the asp.net site, login using a valid active directory username and password. if the login is valid, redirect to a page to do some actions. in a related task, but not part of part 1, unlock an account or change the password of an active directory a...