Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 309572 - Last Review: February 20, 2007 - Revision: 2.2
getWorkspaces Call Does Not Work Properly with a Null Password
This article was previously published under Q309572
When you are using SharePoint Portal Server, you may want to see what workspaces a particular user has access to. The following code attempts to do this:
Dim Server As New PKMCDO.KnowledgeServer
Dim Record As ADODB.Recordset
Server.PromptToAuthenticate = False
Server.DataSource.Open txtServerURL.Text, , , , , txtUser.Text, txtPassword.Text
Set Record = Server.Workspaces
While Rec.EOF = False
ListBox.AddItem rec.Fields("Dav:href")
Record.MoveNext
Wend
ListBox.AddItem ""
Set Record = Nothing
Set server = Nothing
If all of the user credentials are correct, this method works correctly. If, however,
txtPassword.Text is left empty, this method uses the credentials of the currently logged-on user who is running the application. This causes a problem when you are trying to obtain the workspaces for a user whose password is blank, because in such a scenario, txtPassword.Text will be empty, and the method will not return that user's workspaces.
When the
getWorkspaces function makes the call to the server, the InternetSetOption API is used to set the credentials. When there is a null password, SharePoint Portal Server does not call InternetSetOption correctly, and reverts to using the currently logged-on user.
When you are trying to obtain the workspaces that a user has access to, always choose users who do not have a blank password.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.
APPLIES TO
- Microsoft SharePoint Portal Server 2001
| kbbug kbnofix kbshareptportalsvr2001sp1fix KB309572 |
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate