.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

How to check whether user is manager or normal user

Posted By:      Posted Date: September 19, 2010    Points: 0   Category :ASP.Net

How to check whether user is manager or normal user

View Complete Post

More Related Resource Links

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..... : )    

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 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.

check user exists in which group

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

Issues with updating Lists with Manager Names and User Profile Imports in SharePoint 2010 Server

I am having a curious problem with SharePoint 2010 Server. I have imported all the user profiles of our organization into SharePoint User Profile Service Application from our Active Directory. When the Manager name imports it comes in as domain/login. The organizational browser seems to work for MOST people, but not all. I believe this is contributing to my second problem, which is, I have setup a very simple workflow in SharePoint Designer that simply looks up the persons Manager, then places that information into a field called "Approval 1". After that it looks at Approval 1 and get the Manager name and populated "Approval 2" with that information, and so on. I have used an Impersonation Step as the Farm Administrator in the workflow and I have done it without the impersonation step. Both results in the same problem. When I enter my name into the list and run the workflow it runs beautifully give every manager up the chain to the top. However, if I put any other person's name in there it gives me the error "Workflow failed to get user profile for user: ____". I went to my supervisor's office and asked him to run the workflow. Using his login he had the exact same result--if my name was in there it worked great, otherwise, it gave an error. Any help with this strange error would be greatly appreciated.  Thanks

Document is read-only in SharePoint, but user sees "check out" option in Office 2007 / Word / Excel

I am finding that when there is a document library in SharePoint with checkin/checkout required, if a user with read-only ("Visitor") permissions opens a document from that library, the document will open as read-only in Word, Excel, etc., but the user will see the "Server Document" bar with the message "To modify this document, you must check it out" and the "check out" button.  When the user tries to check the document out, they are asked to authenticate, and then receive the error "Cannot perform this operation.  The file has been deleted or someone else has it checked out."    How is it possible to prevent a user with read-only rights in SharePoint from seeing the "Check out" option in Word or Excel?

Check user and pass at login

Hello!I use a class method that looks something like this to check for user and pass at login:public static bool checkUser(string conn, string user, string pass) { SqlConnection conn = new SqlConnection(conn); string sql = "SELECT User, Pass FROM TableUser WHERE User = @user AND Pass = @pass"; SqlDataAdapter da = new SqlDataAdapter(sql, conn); SqlParameter daUser = da.SelectCommand.Parameters.Add("@user", SqlDbType.NVarChar); SqlParameter daPass = da.SelectCommand.Parameters.Add("@pass", SqlDbType.NVarChar); daUser.Value = user; daPass.Value = pass; conn.Open(); DataSet ds1 = new DataSet(); da.Fill(ds1, "tbl"); int i = ds1.Tables["tbl"].Rows.Count; conn.Close(); if (i == 1) return true; else return false; }...and I just wanted to ask, if there is a shorter/faster way (the user table is on an SQL Server? Also is this way secure?Note: I set the collation for the password field on the SQL Server to be case sensitive so I don't have to account for it in the code.Thx!M

Report Manager Security: If a user login to Report Service than he should be able to see only a fold

Report Manager Security: If a user login to Report Service than he should be able to see only a folder for which he has role assing and rest of the folder should be hidden for him. How this security i can achive with c#

Alerts - 1 user fails with "PermissionMask check failed. asking for 0x00000055, have 0x3C4312EF", ot

I have set Alerts for 3 users on a Document Library in our Team Site in a MOSS 2007 environment.  Alerts go out for every other person I set alerts for, with the exception of this person.  Our Exchange Admin tracked down the Alert email and saw that while everyone else was listed, this person was not.  At the same time I turned on Verbose logging for the log files and found the PermissionMask failure.  The problem is I cannot figure out why this person is failing this check. This person happens to be a member of our IT team, as are the other people I added Alerts for.  I should also note that this problem occurs whether I add the alert for this person, or this person adds the alert themselves.  I have checked the permissions on the Library and they are inherited from the Site level.  When I check the permissions on the Site level, the IT team has Contribute permissions, I did then check the AD Security Group to be sure that this person is in the group, and they are. Any ideas as to why this would happen for this person only?  This person can access, and add content, to the Library which puzzles me more.  My next test will be to add this permission to the Site permissions explicity with Full Control to see if that matters. In Googling for this, I find a number of PermissionMask posts, but none that seem to address this specific pro

User does not have required permissions to view Report Manager on SQL 2008 r2

Hi all, We are installing SQL Server 2008 r2 onto a server, and this installation includes Reporting Services. SSRS works, I can deploy reports, use Report Manager, Report Builder, etc., all using my admin privs. The problem is when NON-ADMIN users connect to \\server\reports.  They get the following error: User 'DOMAIN\user' does not have required permissions.  Verify that sufficient permissions have been granted and Windows User Account Control (UAC) restrictions have been addressed. This error is resolved by giving the DOMAIN\user account local admin privs on the server. Granting admin privs is not a solution.  We have accountants and other non-technical people that will use Report Manager and Report Builder.  We can't just give every person admin privs on the production SQL server. I have done a lot of research on the web... I see a results involving earlier versions of SQL Server and Report Manager, but this is 2008 r2 - different webserver, etc. How can I resolve this issue?

Check session timeout and warn user before timeout


I know there are several articles explaining how to warn the user before their session times out, but so far none of them have worked for our scenario, so I'm hoping someone here will be able to help me figure this one out...  Here's what we've got:

Our application uses SQLServer to store session state.  We've got it set to timeout in 60 minutes.  Unfortunately (I fought hard against this, but lost the battle) our application uses popups for several major screens.  So tracking the session timeout on the client side doesn't really work, because I have no idea what window the user is in at any given point.  I've tried the solution where you inject Javascript into the page using the current session timeout on each request, but again, because the user could be actively using the application in a different window, it doesn't work for us.  So I guess I have a couple key questions:

  1. Is there any way to get the timeout for a session without triggering a request to the server, which would just renew the session?
  2. Is there a way to track the session timeout value across multiple windows? 
    I believe there is a limit to the number of "branches" the main window can have in our app.  In other words, the user can only be 2 levels deep from the main/root window, s

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

SQL Query for Date Check User Dates



I am using two columns in one table such as StartDate,Enddate.

In asp.net Form two text boxes there. One is StartDate other one EndDate..

When user Click Submit button the Two dates is compare above DataFiled's...


-------- Data Base Values ----------------

StartDate            EndDate


10/09/2010         14/09/2010

16/09/2010         28/09/2010



user send Start Date ' 27/09/2010' and EndDate '30/09/2010'


Now the Query Check Dates Between Userdates avialable in Database....


What I ll do?????


(Note : Opertion only allow the Dates Not Exists in Database Dates)



Check User Roles (more than 50)


I have more than 100 roles defined for my app. Now I have a page which is allowed for around 50 roles,
so when user comes to page instead of writing too many if else conditions, what is the best & efficient way
to check the if user in any of those 50 roles?


I have more than 100 roles defi

How can you check the user is owned of the web site that is input in textbox?


Hi Experts.

In the most web sites when you want to register in any web sites, you must provide your information such as First name, last name, email and etc. Then the web site create a confirm link and send it to your mail. If you input your mail correctly, you can check it in your inbox of your mail and click on it to your registration is completed.

In this scenario, the users should input their mails correctly because the web sites will send the confirm link to it. In other words the mail that the users input must be owned of user else if they can't click on the confirm link.

Suppose you want the users input their web sites instead of their emails address in your web site, Now How can you check the user is owned of the web site that is input in the textbox?

I hope you understand my question else if tell me to describe it more.

With Regards. Mojtaba

how to check avaibility for user name as soon as text box lose his focus


hi friends,

i am developing web portal and i need to know, how do check user name is available or not in database as soon as textbox lose focus,

i have problem, how to go code behind page after textbox lose his focus.

thanx in advance. 

User profile sync - Replication of manager, physical office location and work phone number back to a


SharePoint 2010 user profile synchronisation successfully up and running following the super guide from Harbar (thank you!).

Setup the property for first name to replicate back into active directory and this has worked perfectly.

Now trying to configure the following functionality and getting issues.

1] Allow the users to edit the manager property and replicate back into AD

2] Allow the users to change their phone number and replicate back to active directory

3] Allow the users to edit the office location using a drop down list.

So these are the problems

1] Allow the users to edit the manager property and replicate back into AD

Have made the property editable and the users can change it.  The org chart browser works using the new values.  The profile property, however, will not allow you to set is as 'user overridable' in central admin and it never goes back into AD.  Indeed there is a warning displayed in the users my site to this effect.

2] Allow the users to change their phone number and replicate back to active directory

Have made the property editable and the users can change it.  The profile property, however, will not allow you to set is as 'user overridable' in central admin and it never goes back into AD.  Indeed there is a warning displayed in the users my site to t

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