.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

How to check (login Credentials) user name and password to access sharepoint server 2007 programmati

Posted By:      Posted Date: October 25, 2010    Points: 0   Category :SharePoint
my issue is...

while user entered his/her Username:xyz
i need to check programmatically either username & password exists ot not in sharepoint server 2007 from windows form application.

and i know how to check username,but i don't know how to check password.

you can check username in below ways..

 SPSite SharepointSiteObj = new SPSite(SiteUrl);
 SPWeb SharepointWebObj = SharepointSiteObj.OpenWeb("/");

 SPUserToken token=SharepointWebObj.AllUsers[userName]

from this i can get user name..




View Complete Post

More Related Resource Links

Administrator and Developer Guide to Code Access Security in SharePoint Server 2007

Explore configuration options, get best practices for managing CAS in SharePoint environments, and walk through a complex CAS scenario.

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?

Sharepoint Server 2007. Sharepoint Designer workflow not starting for one user only.


We have created a custom workflow in SPD that is attached to a document library within a MOSS 2007 teamsite.

The workflow is set to trigger when a new item is created in the document library.

Previously, the workflow has worked fine for all users but recently has stopped working for one user only.

For the problem user, what we are seeing is that when a new item is created in the document library, the attached workflow never starts.  There is no error, the workflow just does not get triggered.  However, if the problem user goes to an item in the document library and clicks on the workflow she can manually start it and it works fine with no error.

This user has the same permissions on the site as others who do not have any problem.

In the course of investigating this problem, we have temporarily increased the problem users permissions on the document library to full control (was contribute before) but this has had no effect on the problem.  Authentication is being done via Active Directory.  We have tried removing the user from the site and re-instating her but again this has no impact.

Does anyone have any idea how we could fix this problem or further debug it?

Login failed for user: Reason:Token-based server access validation failed with an infrastructure err



I have installed a named instance of SQL Server 2008 R2 Enterprise 64 bit on Windows Server 2008 R2 Enterprise 64 bit. The os is running as a VM ware virtual machine.

I have created an AD security group for database engine sys admins on that machine. I added my user to that group.So for example;

domainname\machinename_SQL_DBE_SysADmins is a user with SysAdmin server role permissions. User domainname\MichaelEFF is a member of this group.

When I log onto the machine as this user and run the management studio with run as administrator I cannot log into the database engine. The log shows the error:

Login failed for user: Reason:Token-based server access validation failed with an infrastructure error

I've read many posts where the MVP says that the UAC is not passing the group membership. Is this the case? If so then how will role based access ever be possible with windows authentication? How can this be resolved?




Login failed for user:Token-based server access validation failed with an infrastructure error


I would appreciate help with the following issue:


I have created a local group in our SQL 2008 server and added two Windows user accounts "DOMAIN\UserName"  I  then added the local group to the database and granted read only access.


The users are trying to link tables using MS Access using and ODBC connection and getting the following error.

Users are not system administrators.


Date                      6/30/2010 1:01:54 PM

Log                         SQ

How can I filter a Sharepoint 2007 libarry list based on current user login?


Hi all.

I would like to know how I can filter a SharePoint library list based on current user login.

Suppose I have created the followings:

1) A SharePoint form library containing bunch of uploaded InfoPath form data.

2) The InfoPath form template contains a promoted text field called "TargetUser" to store user domain login (ex: DOMAIN\JOE) and every InfoPath form file in the library has a valid domain name stored in the "TargetUser" field.

I have created a custom view for the form library and would like to filter this view so only items whose "TargetUser" field matches current user's login ID are displayed.

I went to Edit View page to customize the view and tried to use the [Me] function but I got a "Filter value is not a valid text string" message instead when clicking OK. Apparently [Me] returns a Person/Group data type and the filter cannot compare its value to that of "TargetUser".

I tried using text functions (ex: TEXT([Me],"") hoping to extract default string value from [Me]. The filter accepts the parameter without any error but the resulting fitlered list does not display any items at all.

I have googled this subject for hours but I have not found any solution.

It would be greatly appreciated if anyone can help me t

How to hide the list column based on user login in SharePoint 2007

Hi, I have two different SharePoint group named 'Sales' group and 'HR' group. In a SharePoint list i have 10 columns. out of it i want to display 8 column for 'Sales' group and to show all the column for 'HR' group. I want to do this base on the user login. How can i achieve this?. Am using SharePoint 2007.

how to ValidateCredentials (userName, password), for sharepoint server 2007 through programmaticall



i have two windows(forms) one is mainwindow,which is having allcontrols.
                            another one is loginwindow,
my issue is ...
if you run appli first loginwindow will display,here i need to check either
login credentials(userName, password) are valid or not,if valid i need to display

in my issue i don't know how to check the login credentials for sharepoint server 2007  through programmatically from windows forms application?

please,give me some code....

Thanks for any help

Change domain AD + upgrade Sharepoint 2007->2010 = window with a request login/password


New installation of Sharepoint 2010 in Domain_A domain. I added a content database WSS_content2007 from Sharepoint 2007 (from domain Domain_B). I didn't run the command stsadm -migrateuser. New accounts from domain Domain_A were manually added to SharePoint 2010. In table Userinfo on WSS_Content2007 on Sharepoint 2010 are accounts from both domains. Old domain Domain_B was deleted.
Users get a window with a request re-enter your username and password from time to time.
What should I do? Can I delete the account from the domain Domain_B with stsadm command? Should the column tp_title contain unique records for the same user and the same site?


Configuring User Profiles in SharePoint Server 2010

Note: I've added the necessary links relating to SharePoint Server 2010 prerequisites, along with instructions for configuring the user profile synchronization service, at the end of this

SharePoint Portal Server 2001: Search and Access Disparate Data Repositories in Your Enterprise


The knowledge worker is greatly empowered if she is able to access information across the enterprise from a central access point. With the SharePoint Portal Server 2001 Search Service you can catalogue information stored in Exchange public folders, on the Web, in the file system, and even in Lotus Notes databases. This article discusses the use of ActiveX Data Objects and the Web-based Distributed Authoring and Versioning protocol for creating search solutions based on SharePoint Portal Server 2001.

Kayode Dada

MSDN Magazine April 2002

send the login credentials from site to another server



  i have a site which uses windows credentials to login and in the site i have link to ssrs server.

when i select the report it asks for authentication which i want to skip and send the same user

crendentials to the ssrsserver to access the report.

can anyone suggest on this..

Deploying custom Web Parts on SharePoint 2007 production server

I would like to develop a custom SharePoint 2007 Web Part for a client. Currently I'm using Visual Studio to deploy my solution to a test environment (since it's a SharePoint Project I choose just Build -> Deploy from the menu). What are the appropriate steps to deploy it to the production server?

I'd like keep it simple and safe (i.e. use the principle of least privilege). Therefore (if possible) avoid using stsadm, achieve this through web interface, or avoid using administrative rights.

Also, can I specify the scope of my Web Part, i.e. choose on which Web Application or Site Collection will it be installed?

sharepoint 2007 server needs to be restarted twice a day???



our sharepoint server needs to be restarted twice a day now - always around 9.30am and 14.30pm.  this has only started in the last 2 weeks.  its working along fine then all of a sudden it goes to a dead page.

i have spent the last week trying to identify what it is.  i have set the logging to verbose and put plenty of the messages in there into google but can not see anything relevant.  the event viewer shows nothing.

i have sp2 installed but no cumalitve updates.  i am wary of installing these at the mo and wreaking the whole thing.  if noone has any suggestions ill install them.  ill list soem details about the problem below. 

it doesnt happen on weekends so it must have something to do with users using the system so im thinking something to do with the database (SQL Server 2000).  NB users dont use our sp2007 on weekends. 
if i restart iis, the layout of the page comes back but some of the webparts are dead so that doesnt work. 
if i resart sql server, that doesnt work either. 
there is plenty of room on drives and the task manager is at 20-30% when i check it when the site is down.
only a server resart seems to work.

there are just so many messages in the sp logs that i cant identify what it could be.  is there any other loggi

SharePoint 2007 Access Error


Hi everybody!

I´d like to verify if somebody see this scenario:

* I create a site, using te meeting site template;

* I give Full Control access to an user;

* When this user try to upload an item in a library, in this site, it was showed the message "Acces Denied".

* If the user press "back" in the Internet Explorer tool bar and press "F5" to refresh, the file is there.

* The same problem is ocurring, when he try to create a meeting.

Somebody ever see this error!?

Thanks a lot


OpenSearch Descriptor File Generator for SharePoint Server 2007 Sites

Learn about the OpenSearch Location Builder Tool, which you can use to create an OpenSearch Description (.osdx) file to connect SharePoint Server 2007 sites to the Windows Client via the OpenSearch protocol.
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