.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Need help with web.config security - Can't figure out where the security group is located in the ap

Posted By:      Posted Date: August 25, 2010    Points: 0   Category :ASP.Net


   We have sepeartate folder called Managers in one of our web apps. And there was a security build around that folder in a web config file as below

<?xml version="1.0"?>
        <allow roles="AllManagers"/>
        <deny users="*"/>

I couldn't figure out where this group located in the application. Usually all our groups are defined in Active directory but except this group. I am not sure if this is defined on the web server or some where in the app itself. Because in the process of figuring out I have changed it to <allow users="*"/> just to make sure if this is the group we are looking for and YES It is and I have access to it. So I need to find out where this is located and add myself as one of the users to this group.

Can any one help me with this mystery.

Thanks in advance,


View Complete Post

More Related Resource Links

Can't find AD security group while creating Audience rule


Hi guys,

I'm trying to create audience rule : all members of AD group. But when I try to choose a security group I need I can't find in search window. Though I see another groups. So in a whole the problem is I can't see all the AD groups but only some of them. It doesn't depends on on its type (global or local domain).

What could be a reason?

Is there a way to obtain where in a sharepoint site a certain security group is used?

There is a sharepoint group that has been set up and is used throughout a single sharepoint occurance with many team sites and lists. It has orginated from AD and sent over to sharepoint with collection. The want to rename the group name. I have used it throughout the site. Is there a way to identify what sites and lists have been secured with this site so I do not have to go manually through site by site? Thanks, Angela

Create SharePoint Security Group populated by AD query

Is there any non-code way to create a SharePoint Security Group that is populated by an AD query? The "standard" way of getting the same "effect" is to create a group that contains an AD group but that does not allow members of a particular site to see who else is also a member of the site Any thoughts?

New Item Added to List/Library trigers Alert to non-AD Security Group

I am trying to implement an alert when a new item is added to a list. Idealy this alert would be sent to either a SharePoint Group or a AD Distribution Group. I do not have access/authroization to create security groups. The research I have found so far tells me that I can only add AD users and AD mail-enabled security groups through the alert GUI. My questions is first is this a valid finding? Second, if I create a custom workflow can I have the workflow triger on new item added and have it send a notification to the specified SharePoint/Distribution group? Thank you in advance for your assistance.  

Programatically determine windows security group name SQLServer2005MSSQLUser

When SQL Server 2005 is installed it creates a local group following this convention   SQLServer2005MSSQLUser$<computername>$<instancename>   When the machine is renamed the group name does not change.   Is there a way to programatically (.NET 2.0 or SQL query) determine the group name?May we all make money in the sequel.

SP-Designer Workflow Task assigned to a Security Group Problem

Task assigned to a Security Group Should be Filter basic on Show items only when the this conditon is true: "Assign To is Equal to [Me]" This above condtion shows my task only , not all task. So How i ve to make following Condition in it. "Assign To(Security Group) Contains [Me](currnt loged user). Actually Problem is that workflow is assinging a task to a GROUP( having a lot sharpeoint users) , if i m the current user(exists in that group) then i shud get the my task only ,which is assigned to me only , nothing else user's task. So pls help me. Thanks in Advance.Regards- Sharad

Problems adding AD Security Group to SP Group using PowerShell


I am trying to create a powershell script that will enumerate SharePoint 2010 permissions and groups from a .csv file. The script needs to

1) Create the SharePoint groups
2) Add an owner
3) Add an active directory doman security group
4) Add a permission level to the SharePoint group.

However, I can't seem to add active directory groups to the SharePoint groups even though the groups exist in SharePoint, as they have been imported through the UPS synch.  This is the code I have been using:

param (


    [string] $createspgroups = "SPGroupssh.csv"



$web = Get-SPWeb http://myserver


ipcsv $createspgroups | foreach {

$owner = $web.AllUsers[$_.Owner];

$adgroupname = $web.AllUsers[$_.ADGroupName]; 

$GroupName =$_.GroupName; 

$web.SiteGroups.Add($GroupName,$owner, $adgroupname, $GroupName) 

$memberGrp = $web.SiteGroups[$GroupName] 

$web.AssociatedMemberGroup = $memberGrp 


$memberAssignment = New-Object Microsoft.SharePoint.SPRoleAssignment($memberGrp)   



Determine if User is in Security Group


 this is what I need to use.

I want to determine if the current user (Windows ID) is in a specific Security Group.  If they are, then certain things will happen on certain forms of the website that I am working on.

I have tried the following code, but I am not getting any results.


Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim user As WindowsIdentity
        user = WindowsIdentity.GetCurrent()
        Groups(user.Name, True)
End Sub

Public Function Groups(ByVal userDn As String, ByVal recursive As Boolean) As ArrayList
        Dim groupMemberships As New ArrayList()
        Return AttributeValuesMultiString("memberOf", userDn, groupMemberships, recursive)
    End Function

    Public Function AttributeValuesMultiString(ByVal attributeName As String, ByVal objectDn As String, ByVal valuesCollection As ArrayList, ByVal recursive As Boolean) As ArrayList
        Dim ent As New DirectoryEntry(objectDn)
        Dim ValueCollection As PropertyValueCollection = ent.Properties(attributeName)
        Dim en As IEnumerator = ValueCollection.GetEnumerator()

        While en.MoveNext()
            If en.Current IsNot Nothing Then
                If Not valuesCollection.Contains(en.Current.ToString()) Then

Show users based on ad-security group or OU


Will it somehow be possible to show members of a AD group ?

We have some superusers, and they all have the ad-group: super_users.

Can i show all members somehow ?

Maybe by a search flag, so it is just a link to a search result ?

Jakob Olsen

Version of security class in rssrvpolicy.config


When I add a custom assembly to SSRS, I got the following error,

Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

I checked rssrvpolicy.config and Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG\security.config,

The one from security.config is,



SecurityClass Name="SqlClientPermission"

How to add AD Security group to Audience of Web Part?


We have RSS Viewer webpart in the SharePoint Server 2010 Enterprise based portal.

I would like set audience, which includes AD security group "Management".
How to do it?

So far I have been able to use SharePoint group in auding, but
Modify->Advance->Target Audience->Browser->Distibution/Security Group did not find any AD groups.

What does the Distibution/Security Group actually mean? How to add groups there?


Accessing AD Security Group members through C#.NET Coding.


Hi All,

   I have developed a scheduler that should fetch AD security group members daily and should store in a database.

Problem I am facing:

   In this application I am facing one problem. i.e It is fetching the member information from some group but not from some other. I am using domain admin credentials to run the scheduler. But still it is not fetching the group members from the security group. What could be the problem? Plz suggest me...

Cheers, Chetan

Error: Cannot determine security.config file path for SQL2008R2 development version on Vista home pr


The installation gets past the check for the windows installer and .net 3.5 but fails here finding the security.config path.  I've turned off the anti-virus, uninstalled and reinstalled .net 2.0 and 3.5.  I'm running as an administrator.  Nothing else that I've found addresses this specific error. The install start properly on an XP machine but not Vista.

What can I try next?

11/25/2010 06:58:25.951 Local setup.exe not found, so continuing to run setup.exe from media.
11/25/2010 06:58:25.970 Attempt to initialize SQL setup code group
11/25/2010 06:58:25.994 Attempting to determine security.config file path
11/25/2010 06:58:26.076 Error: Cannot determine security.config file path
11/25/2010 06:58:26.109 Error: InitializeSqlSetupCodeGroupCore(32bit) failed
11/25/2010 06:58:26.135 Error: InitializeSqlSetupCodeGroup failed: 0x80004005
11/25/2010 06:58:26.159 Setup closed with exit code: 0x80004005

SharePoint Tutorial - Security

Security in SharePoint is comprised of users, groups and roles.

Users, Groups and Roles

A user account comes from the authentication system. For example, if Active Directory is used to authenticate then the user accounts will come from it.

There are two types of groups SharePoint uses: domain groups and SharePoint groups.

Asp.net web site security database


Hello all, I'm new to asp.net and I'm currently practising some few stuffs. I'm creating a hotel reservation system using ASP.net Web site in visual studio 2008 and I currently don't have an App_Data in my solution explorer unlike visual web developer.

1. I have planned to make users of the website login before making their reservations.

2. I have also planned to develop the website such that I will be able to know all reservations made by each user.

First and formost, I will like to know how I can access/View the security database?

Secondly, how do I link my custom made reservation database and the security database in order to achieve my second plan above.?

Someone help me.

Thank you.



hello i have the following problem

i have upload my content to hosting server but i get the following error

Security Exception

Description: The application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[SecurityException: Request for the permission of typ
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend