Microsoft KB Archive/309572

= getWorkspaces Call Does Not Work Properly with a Null Password =

Article ID: 309572

Article Last Modified on 2/20/2007

-

APPLIES TO


 * Microsoft SharePoint Portal Server 2001

-



This article was previously published under Q309572



SYMPTOMS
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(&quot;Dav:href&quot;) Record.MoveNext Wend

ListBox.AddItem &quot;&quot; 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.



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



WORKAROUND
When you are trying to obtain the workspaces that a user has access to, always choose users who do not have a blank password.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

Additional query words: sps

Keywords: kbbug kbnofix kbshareptportalsvr2001sp1fix KB309572

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.