The Artima Developer Community
Sponsored Link

.NET Buzz Forum
Windows Server 2003 Service Pack 1 SetPassword Issue

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Brendan Tompkins

Posts: 158
Nickname: brendant
Registered: Apr, 2005

Brendan Tompkins is .NET Developer and founder of CodeBetter.Com
Windows Server 2003 Service Pack 1 SetPassword Issue Posted: Jun 8, 2005 12:21 PM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Brendan Tompkins.
Original Post: Windows Server 2003 Service Pack 1 SetPassword Issue
Feed Title: Brendan Tompkins
Feed URL: /error.htm?aspxerrorpath=/blogs/brendan.tompkins/Rss.aspx
Feed Description: Blog First. Ask Questions Later.
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Brendan Tompkins
Latest Posts From Brendan Tompkins

Advertisement

Yesterday evening, I installed SP1 for Windows Server 2003 on our Web Servers.  This morning, we got reports that new users couldn't be created on our site.  Upon investigation, it turned out that the code for creating users was failing on the following lines of code:

    /// <summary>

    /// Sets the password.

    /// </summary>

    /// <param name="userEntry">User entry.</param>

    /// <param name="password">Password.</param>

    public static void SetPassword(DirectoryEntry userEntry, string password)

    {

      object[] oPassword = new object[] {password};

      userEntry.Invoke("SetPassword", oPassword );

      userEntry.CommitChanges();

    }

The error we were getting was  'Network path was not found'.  It turns out that this service pack tightened security around invoking SetPassword on the ASDI, (which makes sense since this is usually what service packs do, tighten security).

In looking for an answer, I found the following gem on the microsoft.public.adsi.general group, specifically this post here.

 I use ADSI to manage servers in different domains,  
different networks (AD, NT DC's, standalone, servers, no
trusts, etc.) all managed from one point. I've observed
many problems where some ADSI properties/methods work and
others don't, in almost all cases it always came down to
Name Resolution
.

Since these servers are in our DMZ, it made sense that this could be true for what we were experiencing.

The Solution?

The solution for us was to make sure the IP of the LDAP server was listed in our HOSTS file.  Previously it was listed in LMHOSTS only. We have to use these files to give our inside IP addresses visibility on our DMZ (or so our network admin tells me).  Just wanted to put this out there, because this was something that worked before, pre SP1, when the IP to the LDAP server was listed in the HOSTS file only.

-Brendan



Read: Windows Server 2003 Service Pack 1 SetPassword Issue

Topic: BlockBuster, your friendly neighborhood candy store Previous Topic   Next Topic Topic: TechEd 2005: Visual Studio and SQL Server 2005 Release Date revealed!

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use