Security :: Forms Authentication With Local Groups?

Jan 6, 2011

How can I configure my web.config file so that my login page can serve domain users in a local group on the server? It's easier for us to modify members of the group on the server than having someone else do it on a domain group that we don't have access to.

View 7 Replies


Similar Messages:

Security :: Web.config Authorization Roles With Local Groups With Domain Groups In Them

Sep 29, 2010

I am "DomainMyDomainUserName" If I do this:

[Code]....

I can access the website I've created on my local machine in debug mode; and with my domain account as a local administrator, if I do this:

[Code]....

I can still access the website; and with my domain account in a Domain Group named "DomainDomainLocalSecurityGroup", if I do this:

[Code]....

I can still access the website; HOWEVER, if I create a Local Group on my machine named "LocalMachineGroup" and I add "DomainMyDomainUserName" to this group and I do this:

[Code]....

I get an Access Denied error trying to access the website. What I want to do is, have a group on my local machine (for testing), on a test web server, and on a production web server named "MyWebsiteUserAccess" with the same Domain Group (filled with Domain Users allowed access to the site) in all of these local groups; so that when I test the web application on my local machine, on my test web server and on my production web server, I don't have to change the Web.config file to have it work on each AND if the Domain Group name ever has to change, it won't affect access to the website.

What am I overlooking or is this even possible to do this way? I understand that there is a way to do Role Management through ASP.NET but I don't understand that well enough yet to implement that (and will probably go that route once I've done the research on how to best implement it for purpose of access control of this intranet site).

View 2 Replies

C# - Get Local Groups And Not The Primary Groups For A Domain User

Dec 18, 2010

i have a code to get the groups a user belongs to.

try
{
DirectoryEntry adRoot = new DirectoryEntry(string.Format("WinNT://{0}", Environment.UserDomainName));
DirectoryEntry user = adRoot.Children.Find(completeUserName, "User");
object obGroups = user.Invoke("Groups");
foreach (object ob in (IEnumerable)obGroups)
{
// Create object for each group.
DirectoryEntry obGpEntry = new DirectoryEntry(ob);
listOfMyWindowsGroups.Add(obGpEntry.Name);
}
return true;
}
catch (Exception ex)
{
new GUIUtility().LogMessageToFile("Error in getting User MachineGroups = " + ex);
return false;
}

the above code works fine when i have to find the groups of a local user but

for a domain user it returns a value "Domain User" which is kind of wierd as it is a part of 2 local groups.

Research

I did some finding and got that i am being returned the primary group of the domain user

called "Domain User" group

but what i actually want is the groups of the local machines the domain user is a part of... i cannot get that.. any suggestions

another code using LDAP

string domain = Environment.UserDomainName;
DirectoryEntry DE = new DirectoryEntry("LDAP://" + domain, null, null, AuthenticationTypes.Secure);
DirectorySearcher search = new DirectorySearcher();
search.SearchRoot = DE;
search.Filter = "(SAMAccountName=" + completeUserName + ")"; //Searches active directory for the login name
search.PropertiesToLoad.Add("displayName"); // Once found, get a list of Groups
try
{
SearchResult result = search.FindOne(); // Grab the records and assign them to result
if (result != null)
{
DirectoryEntry theUser = result.GetDirectoryEntry();
theUser.RefreshCache(new string[] { "tokenGroups" });
foreach (byte[] resultBytes in theUser.Properties["tokenGroups"])
{
System.Security.Principal.SecurityIdentifier mySID = new System.Security.Principal.SecurityIdentifier(resultBytes, 0);
DirectorySearcher sidSearcher = new DirectorySearcher();
sidSearcher.SearchRoot = DE;
sidSearcher.Filter = "(objectSid=" + mySID.Value + ")";
sidSearcher.PropertiesToLoad.Add("distinguishedName");
SearchResult sidResult = sidSearcher.FindOne();
if (sidResult != null)
{
listOfMyWindowsGroups.Add((string)sidResult.Properties["distinguishedName"][0]);
}
}
}
else
{
new GUIUtility().LogMessageToFile("no user found");
}
return true;
}
catch (Exception ex)
{
new GUIUtility().LogMessageToFile("Error obtaining group names: " + ex.Message + " Please contact your administrator."); // If an error occurs report it to the user.
return false;
}

this works too but i get the same result "Domain Users" . Please can some1 tell me how to get the local machine groups...?

View 2 Replies

Security :: How To Make Authentication Using Active Directory Groups

Mar 8, 2010

I've built a asp.net 3.5 web application and want to be able to restrict access to particular pages. I have pages which should be able to be accessed by a user and then an adminshould be able to access all pages. I have created 2 Active Directory groups, one for normal users and one for admins so any users in the user group can see some pages then admins should have no restrictio

View 1 Replies

Security :: Create User Account For Web Authentication From Non-web/local Application?

Sep 12, 2010

I have an application which is installed on local pc and is using SQL db. It is a client management system where I want to add capability to register new clients and give them access to my web site which is sharing the same SQL database with local application.

At the moment clients can register on the web site and I have ASP.NET authorisation system set up with aspnetdb_user, aspnetdb_membership and etc tables. But sometimes it happens that I need to register clients on my local application on PC and ideally would like that registration to create online account for the client as well. Then I want to be able to send him user id and password by email and let him know that he has been registered in my database and online account is ready for him as well.

Basically I want to have full synchronization between asp.net membership service and local application through SQL db. As I said both online and local apps are shareing the same SQL database. what would be the best practice to implement it.

View 1 Replies

Using Yahoo Groups For Authentication?

Mar 14, 2011

I'm trying to determine if there is a Yahoo API that I can use to create authentication based on membership in a Yahoo Group for a non-Yahoo website writte in ASP.NET. Basically, if a person is a member of a particular group, then they would be able to Login to this website.

Our club has an existing Yahoo site, but we'd like to disconnect from Yahoo while retaining the emailing capability that it offers, and I'd like to keep the number of places to be members of to a minimum. So if a person signs up for the Yahoo group, I'd like them automatically be able to login to the non-Yahoo site without any other steps.

View 3 Replies

Security :: Retrieve List Of All Security Groups For Server?

May 6, 2010

I am utilizing local security groups to secure my application and I need to list all the available groups on the local machine. I can get the list of groups a user is a member of, but I need the complete list of available groups.

View 1 Replies

Enumerating Groups Using WindowsIdentity.GetCurrent() Returns Old Set Of Groups

Feb 1, 2011

I have a user that when I attempt to enumerate her groups using either System.Security.Principal.WindowsIdentity.GetCurrent().Groups on user's computer
or System.Web.HttpContext.Current.Request.LogonUserIdentity.Groups on the IIS server, I get a list of their old groups, not their new. I have checked the DC that they authenticate to and the ASP.NET page is running inside a SharePoint instance so the LogonUserIdentity most like is being provided from there Kerberos ticket.
Should I be looking up the groups directly from the AD instead of relying on the WindowsIdentity or LogonUserIdentity?

View 1 Replies

Security :: Use Roles Stored In SQL And AD Users / Groups?

Feb 7, 2011

I need to create a site that is Roles based and can use AD groups and Users. I found Scott Mitchell's tutorials for setting up "role-based-authorization-cs" [URL]

I've changed to using Windows auth. instead of forms and am pointing it to a remote SQL Database. I can successfully add a user/password/email etc. (although I believe the password and email sections aren't required and would like to remove them as options).

When I create a user (usera) and login to a windows box as usera the menu displays correctly based on the Roles I've added the user to in the SQL Database.

When I add an AD Group and add it to the same Role the menu's that are displayed do not match that of usera.

I'd like to be able to add entire AD groups (They can obviously change so it needs to be dynamic in some way), as well as add individual AD users to Roles. I'd prefer to do this via a Web interface.

My questions are.

1. Am I going about this the right way?

2. If I'm not what would be a better way?

3. If I am what do I need to do to allow ADGroup lookup?

View 2 Replies

Security :: Changing From Forms Authentication To Windows Authentication?

Sep 3, 2010

What do I need to do in order to change an application from Forms Authentication to windows authentication?

View 2 Replies

Security :: Write A Single Logout Link For All The Role Groups?

Jun 21, 2010

I have created a role based menu for my asp.net 3.5(C#) by configuring Asp.Net Membership module for site. My role based menu is a nested HTML unordered list. And each list item has a list of links. And at the end a list item has SignOut link. I have created 5 role groups for my website and put this list(i.e. menu) inside the contentTemplate of each and every role group.

I have display the SignOut link by using LoginStatus but I dun want to put the Login Status in each and every Roles Group. Can anybody tell me how to create a generic view which will display the Signout link when any user is logged-in. But I dun want to show the SignIn link when the user is not logged-in.

View 2 Replies

Security :: Using Rss Feed Authentication With Forms Authentication?

Jun 3, 2010

I have developed the authenticated rss feed using the basic http authentication for my site.I also have the admin module for the site which uses the Asp.net Forms Authentication .Both are in the same project.When i turn on the forms authentication module to None in my web.config.My rss feed authentication works fine(the browser pop up the dialog box for the username and password) and upon entering the username and password the rss feed gets displayed.But with forms authentication turn on when i click the rss feed link i am getting redirected to the administrator login page.

If i set my authentication mode to none than the feed works like dream but the admin module do not work as it uses forms authentication.

How can i resolve the conflict for that one.I am using the asp.net mvc filter on my feed contoller to pop up the dialog box for the username and password.

[Code]....

View 1 Replies

Security :: Forms Authentication With A Secondary Authentication?

Feb 16, 2011

I'm developing an internal booking sytem. Users log in to the sytem and can view existing bookings and search for bookings. They can also create new or edit existing bookings. When completing such actions I need a confirmation prior to completing the booking or updating the recorded. The confirmation is based on a reauthentication of the user.... in otherwords he needs to enter his passord again.

How can I achieve this? The system is internam and I'm using Forms Authentication. I an also using roles as som of the admin forms can only be viewed by administrators.

View 1 Replies

MVC - Testing Windows Authentication And Local Express DB

Jul 30, 2010

I am testing with windows authentication and a local express DB. My DB has users and roles tables. Following link explains this concept:[URL]

Code:

[HandleError]
public class HomeController : Controller
{
public ActionResult Index()
{
return View();
}
[Authorize(Roles = "Managers")]
public ActionResult CompanySecrets()
{
return View();
}
[Authorize(Users="redmond\swalther")]
public ActionResult StephenSecrets()
{
return View();
}
}

Above roles are coming from NTLM. Is there a way where i can map roles in my DB table so that these are then available to me like User.IsInRoles("Admin") etc?

View 1 Replies

Security :: Authentication Method - Enable Anoymous Access And Basic Authentication?

Jul 14, 2010

This could be very straight forward for some of you, but I got caught up. I am doing very simple test - browsing from IIS Manager to see the default page or "under Construction", however I am being challenged to provide my login credential . When I provide my login credential, I am able to see the default page. I wanted to see the default page without providing my credential since Enable anoymous access + basic authentication I am simply wanted to see the default page asit is working on other servers except this one. I have included screen print to make sure may question is clear.

View 3 Replies

Security :: What's The Difference Between Basic Authentication And Integrated Windows Authentication In IIS

Jan 4, 2011

What's the difference between Basic Authentication and Integrated Windows Authentication in IIS?

View 3 Replies

Security :: Enable Windows Authentication And Disable The Anonymous Authentication In IIS?

Mar 10, 2010

I set authentication mode to Windows in the web.config and I enable Windows Authentication and disable the Anonymous Authentication in IIS 7 on win 7, but HttpContext.Current.User is always null.It works fine when I host the web app in IIS 6.0.

View 1 Replies

Security :: Web Farm Using Window Authentication Or Form Authentication?

Aug 9, 2010

I have a web farm web project, and want to make sure windows authentication is working well without any problem in web farm, can any one give me some web sites or information about that?

View 1 Replies

Security :: How To Develop Authentication Module Using Form Authentication

Feb 8, 2010

Am going to develop authentication part in the web site. I want my authentication module should not be hacked by any one and also want in secure side.

View 1 Replies

Security :: Using AD Authentication With Form Based Authentication & AzMan

Sep 2, 2010

I needed information regarding the capabilities & integration of AzMan tool with Asp.net.Currently, I got a Sharepoint 2007 website along with ASP.NET 2008 where I am using Form Based Authenication.Now, the requirement is any user within a domain registered in AD should be able to login in website through intranet.

Can I acheive this using AzMan, or I need to create two websites one with FBA for internet users and the other one for the intranet users with AD authenication. Also my intenet website is deployed and in use where usermapping and roles are already created, so using this tool what will be the impact on existing webiste.

View 2 Replies

Security :: IP Security Policies On A Local Computer?

Mar 18, 2010

I was trying to block an IP for all the web applications on our Win Server 2003 R2 and during the changes I enabled "Secure Server (Require Security)" in "IP Security Policies on A Local Computer". I was doing that through Remote Desktop and my session was locked immediately (although I have an administrator rights). Now I cannot connect to Remote Desktop again (it doesn't even reach the login prompt) and my web applications doesn't work for any IP. Any ideas how I can get out of this weird situation?

View 2 Replies

Security :: Webservice Security And Windows Authentication - Invoke SSIS Packages From Web Service

Dec 15, 2010

I have to invoke SSIS packages from web service in the most secure way. I think that windows authentication will be secure but i am not sure. I do not have much knowledge about how to achieve this and the information on the internet is very distributed.

View 1 Replies

Security :: Windows Authentication - Get Role Security In Web Config File To Coincide With Controls

Apr 6, 2010

We use Sharepoint to control our websites. We build the sites, then load them into the sharepoint server. My question is if I use windows authentication, how can I get my role security in my web config file to coencide with the asp.net controls that use the Forms authentication. Is there a differenence? Our security uses a session variable for security but there is no where to set up their permissions except in active directory. I hope this makes sense because I would like to implement the LoginView with Role groups but how can I give them the role="administrator"? Do I have to go into active directory and give them these permissions(would take awhile due to the size of the company)? Or do I have to set up priveladges in the web.config file for each user(difficult I think)?

View 5 Replies

Security :: 4 Security Via Windows Authentication - Restrict Access To Safe / UCantSeeMe.aspx

Aug 18, 2010

I'm writing a simple Intranet application using windows authentication. I want to restrict access to Safe/UCantSeeMe.aspx. I am aware of the AuthorizeAttribute, but this only works on methods. I also found a good post on doing this with the MVC pattern, but I'm not using MVC. This can be done with roles in forms based security. I read on MSDN that using windows based security means roles are based on groups, but it doesn't go into any detail. how can I restrict access to Safe/UCantSeeMe.aspx?

View 1 Replies

Security :: Running Application Under The Security Context Of The Logged In User (LDAP Authentication)

Mar 17, 2011

We are using membership provider for LDAP authentication. It is working as it should.

But what all configuration settings I have to do so that
all the future requests to this application run under the security context of the Logged in user account not through the some default user set in IIS.

We need to have this working because all the permissions on the database are based on the logged in user.

We are using form authentication for LDAP authentication. And having impersonation = true in web.config.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved