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

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

check user exists in which group

Posted By:      Posted Date: September 03, 2010    Points: 0   Category :ASP.Net
After entering user name, i want check user belonging to which group, group is some thing like role based if group is something group1 , then i want redirect hime to page 1, if groupis 2  then page 2 like that

View Complete Post

More Related Resource Links

How to check effective permissions for a user or group for a SQL server object or whole server?

Guys, How do I see effective permissions for a user or group for a SQL server object or whole server? For example, a user is not listed in security/logins, but he is a member of few groups and some of them have assigned permissions on SQL server (again either directly or through membership in other groups) Even when I select an object (a table), check properties/permission – it doesn’t let me select any principal, except those listed on security/logins… Anyway, what is the right way to see effective permissions for a user or group? Sorry for asking such a simple question, I’ve searched but found nothing relevant.

How to check user is a particular group


How to check user is related to a particular group , if he is assigned to multiple groups

CAML query to check if user is member of a specific group


I've got a nested query caml which basically should check 3 things:

  1. Check if a task has been assigned directly to the ucrrent user
  2. Check if a task has been assigned to a group the user is in
  3. Check if the user is member of a specific

The first to bullet points work like a charm, but I can't figure out how to get the last one to work. Here is what I thought should work:

query += "<Where>";
query += "<Eq><Membership Type=\"CurrentUserGroups\">";
query += "<Value Type=\"String\">Name of my specific group</Value>";
query += "</Membership></Eq>";
query += "</Where>";

Somehow it doesn't seem to be the correct approach, is there somebody who can help me out on this? Thanks

check if user belongs to a windows group C#

Hello Guys, I have eneed to check if the current windows user is part of a specific windows group say corp\BO. I tried using isinRole but it returns false no matter what.
WindowsPrincipal wp = new WindowsPrincipal(WindowsIdentity.GetCurrent()); 
bool result = wp.IsInRole(@"corp\BO_ops"); 
is there another way of doing this? pls let me know.  I'm stuck with this and could not proceed.

User group invalid for new document



Defined a user group and a site column of type people/group directing to this group.

Also defined a content type and added the site column to this content type.

When I create a new word document of this content type, word opens displaying my site column ok. But when I enter it, I see that all active directory (AD) entries are displayed. I want it to display only those users I added to the user group I created. Moreover, users can select any user from AD, which makes defining a user group and a site column meaningless.

This problem is only in creating new documents with Word. If I edit properties of an already existing document in my site, everything is ok: I can select only the users in the group.


What is the best way to create user account for big group of people?


I need to create individual account for a big group of people (around 200) from an Excel spreadsheet. What is the best practice? It will take too much time to create account using web form. I think there must be a way to do it. Please advice. I tried to use Stored procedures created by ASP.NET. NOT SURE whether it is a good idea.


The Telerik Eastern Canada User Group Tour


Hey!  Telerik is coming to Canada.  Evan Hutnick, Telerik evangelist, will speak at 6 Canadian user groups.


Check Evan's blog for more info

Bookmark and Share

How To Check if user is already logged to another computer..???

By the way.,, I am new here.... I  am doing a little vb.net windows form project but connected with the internet ... question : how can I check if the user is already login to another computer..??   somebody here please.. ideas.. thanks..... : )    

Is there a way to check if workflow instance already exists for a particular productID in Workflow o

I am using Visual Studio 2008 and .NET 3.5. I am trying to build a WF that is exposed as WCF hosted on IIS. This service is consumed by ASP.NET client. It is a very simple WF- receive info for new product "A"- send email to person 'Xyz' that new prodcut "A" is received- do some business process for product "A"- send out more notifications for product "A"Consider this scenario - - Client hits submit on asp.net page for prodcut "A"- new WF instance is created for product "A"- client can go back to the same page, edit some more info and hit save again. However, this time or for any subsequent "Saves",  I do not want to create a new WF instance for product "A".I can check to see if a WF instance exists for product "A" on the client side before calling the service operation. However, I want to see if there is a way to do this in WF or WorkflowServiceHost, as I don't want to add this logic to client. First acitvity in WF has to be receive activity with CanCreateInstance = true, so not sure how I can do this check in WF itself.Also, I have another stupid question, when using WF exposed as WCF service, do we have to implement all service operations using WF? What if I have some service operations that just involves checking some business logic? Do I implement this in a

LinQ to check if xml node exists in the XML??

Using LinQ or any C# syntax, I just want to know whether "Item" Child exists or not if the parent Node (ChildMenuSelected>>MenuSelected) are true from the below xml format.Xml Format:<MenuDataResult> <Items> <Item> <ItemType>Submenu</ItemType> <ItemTitle>Level22</ItemTitle> <Menu> <MenuSelected>false</MenuSelected> <ChildMenuSelected>false</ChildMenuSelected> </Menu> </Item> <Item> <ItemType>Submenu</ItemType> <ItemTitle>Level21</ItemTitle> <Menu> <MenuSelected>false</MenuSelected> <!--if ChildMenuSelected = true --> <ChildMenuSelected>true</ChildMenuSelected> <Item> <ItemType>Submenu</ItemType> <ItemSubType>0</ItemSubType> <Menu> <!--if MenuSelected = true --> <MenuSelected>true</MenuSelected> <ChildMenuSelected>false</ChildMenuSelected> <!-- whether this below item exists or not --> <Item> <ItemType>Submenu</ItemType> <Menu> <MenuSelected>false</MenuSelected> <ChildMenuSelected

Problem with access to a user in AD group

Hi all, We are managing our security in Sharepoint (WSS 3.0) with AD groups instead of Sharepoint groups. This worked fine until now. For an unknown reason, one single user from an AD group cannot access a page (while other users from the same group can). The group is also a distribution list in AD (so it's a security group and distribution list for emails). It includes several other distribution lists such as: L-All-Corporate-Employees    L-Administration          User 1          User 2           ...     L-Accounting         User 1         ... ...   So far I never had any issue with that kind of approach,  but yesterday we published a new web part page and wanted only the corporate employees to get access to it, so I broke rights inheritance on the page and added the L-All-Corporate-Employees group with View rights. As I already said, I tested with one user from the group (let's say from the L-Administration sub-group) and it works, now I receive an email from another user (let's say from the L-Accounting sub-group) which tells me he doesn't have access... But they're all part of the L-All-Corporate-Employees group, so they should all

How to get User group in SharePoint Designer 2010 within workflow?

Hi, How to get user group in sharepoint designer within workflow? Basically I have to compair that current user is belongs to particular group or not.  How can I get check user group in workflow's if condition? G. Goyal

How to check if SPFiled already exists?

hi   I donot know the internal name and cannot use title for retreiving the filed because user can add 2 fields with the same title. Is there anyother option to check if filed already exists?

How to check if a given user is local admin or not

Hi, How to check if a user (may be domain user also) is part of local administrators group or not? Note I am NOT talking about checking of current logged in user. I should send the username & passowrd of any user (may or may not be domain user) & that should flag me whether that user is local admin or not. Please help.

How check if file exists?

Hello I want to delete file, i can do this but firstly i want to check if it exist. What must i add to  my code for this? DECLARE @del varchar(50) SET @del = REPLACE(' del C:\ADFS\Data_'+CONVERT(char(10),dateadd(year,+1,DATEADD(dd, -1, GETDATE())),103)+'.csv','/','.') EXEC master..xp_cmdshell @del

Redirecting to custom page while clicking on the user/group browse button

Hi, i have created a custom visual web part in visual studio 2010 and i deployed it into sharepoint site by creating a new page in my site. The custom page gets the data of users/groups from database and pass the users to the people picker in sharepoint.Here my question i have a document library where we upload document and get the users page popup that consists of people picker and a user/group browse button.when i click on the (book image button)browse button it will redirect to the user and group search page but here i need to replace my custom  user/group search page with the default one so please help me how to redirect to the custom page by clicking on the user/group browse button,and i need to pass the selected users to the people picker text box........please give me some solution whether this can be done or not if possibe please send me the link or some sample code how to do this   thank you.

checking user group

How to Check user belong to which group(&(objectCategory=group)(member=cn=sam,cn=Approvers,DC=abc,DC=com))approvers is groupnamesam is username
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