<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Active Directory and LDAP</title><link>http://forums.asp.net/93.aspx</link><description>Questions about Active Directory and other directory stores, such as those accessible via LDAP, are appropriate here.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: Cont: A local error has occurred (formatting fixed)</title><link>http://forums.asp.net/thread/3373733.aspx</link><pubDate>Fri, 28 Aug 2009 01:10:30 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3373733</guid><dc:creator>achenar</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3373733.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=93&amp;PostID=3373733</wfw:commentRss><description>&lt;p&gt;Just FYI, I had this &amp;quot;local error&amp;quot; in a one-way trust dev environment: I was trying to search - using FindOne() - for a user in the downstream domain.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I fixed this by ensuring the upstream server&amp;#39;s primary DNS was pointing to its own domain and the alternate DNS was pointing to the downstream domain.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Cont: A local error has occurred (formatting fixed)</title><link>http://forums.asp.net/thread/3369896.aspx</link><pubDate>Wed, 26 Aug 2009 12:57:09 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3369896</guid><dc:creator>dorothyDorothy</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3369896.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=93&amp;PostID=3369896</wfw:commentRss><description>&lt;p&gt;Thanks for the tip.&amp;nbsp; I have a windows application which was giving me a System.DirectoryServices.DirectoryServicesCOMException of &amp;quot;A local error has occurred&amp;quot; this was due to the user account under which the application was running being locked.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Cont: A local error has occurred (formatting fixed)</title><link>http://forums.asp.net/thread/3258197.aspx</link><pubDate>Thu, 25 Jun 2009 15:55:15 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3258197</guid><dc:creator>sashidhar</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3258197.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=93&amp;PostID=3258197</wfw:commentRss><description>&lt;p&gt;One potential reason would be that the accound that the membership provider is running on is locked. Unlock the user, and you should be fine.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Cont: A local error has occurred (formatting fixed)</title><link>http://forums.asp.net/thread/2776679.aspx</link><pubDate>Mon, 01 Dec 2008 10:25:14 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2776679</guid><dc:creator>Chris128</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2776679.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=93&amp;PostID=2776679</wfw:commentRss><description>&lt;p&gt;I had this problem today when trying to access a windows 2003 AD domain from my vb.net app and this page was pretty much the only thing I found on google when searching for a solution. I eventually found a solution myself so thought I would post it just in case it helps anyone else. The way I got it working was to define the Authentication Type of the DirectoryEntry object as Secure. So for example, instead of this: &lt;/p&gt;
&lt;p&gt;Dim MyUserDE As New DirectoryEntry(ldappath) &lt;/p&gt;
&lt;p&gt;I now do this: &lt;/p&gt;
&lt;p&gt;Dim MyUserDE As New DirectoryEntry(ldappath, username, password, AuthenticationTypes.Secure) &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Hope that helps someone out. &lt;/p&gt;
&lt;p&gt;Chris&lt;/p&gt;</description></item><item><title>Re: Cont: A local error has occurred (formatting fixed)</title><link>http://forums.asp.net/thread/2767696.aspx</link><pubDate>Tue, 25 Nov 2008 19:21:37 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2767696</guid><dc:creator>vbNullString</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2767696.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=93&amp;PostID=2767696</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi,&lt;/p&gt;&lt;p&gt;I&amp;#39;m getting exactly the same error. Have you figured out how to resolve the issue? &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Cont: A local error has occurred (formatting fixed)</title><link>http://forums.asp.net/thread/1786808.aspx</link><pubDate>Wed, 04 Jul 2007 12:24:30 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1786808</guid><dc:creator>andersoyvind</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1786808.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=93&amp;PostID=1786808</wfw:commentRss><description>&lt;p&gt;Expanding the error description, in case someone notice something familiar:&lt;/p&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;System.DirectoryServices.DirectoryServicesCOMException was unhandled by user code&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;Message=&amp;quot;A local error has occurred.\r\n&amp;quot;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;Source=&amp;quot;System.DirectoryServices&amp;quot;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;ErrorCode=-2147016645&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;ExtendedError=-2146893052&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;ExtendedErrorMessage=&amp;quot;&amp;quot;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;StackTrace:&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;at System.DirectoryServices.DirectoryEntry.Bind()&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;at System.DirectoryServices.DirectoryEntry.get_AdsObject()&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;at System.DirectoryServices.DirectorySearcher.FindAll(Boolean findMoreThanOne)&lt;/span&gt; 
&lt;p class="MsoNormal" style="MARGIN:0cm 0cm 0pt;LINE-HEIGHT:normal;mso-pagination:none;mso-layout-grid-align:none;"&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;at System.DirectoryServices.DirectorySearcher.FindAll()&lt;/span&gt;&lt;/p&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; etc...&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;ExtendedError gave a friend of mine the idea&amp;nbsp;of System Error 772 :ERROR_ROWSNOTRELEASED&amp;nbsp;-&amp;nbsp;The data provider requires that previously fetched data is released before asking for more data.&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;I&amp;#39;ve inserted a dispose on the DirectorySearcher, but the error occurred once again just now. &lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;In addition to the use of the DirectoryServices framework, I use System.Web.Security.ActiveDirectoryMembershipProvider to provide windows authentication to my web application. The following defines my setup in web.config.&amp;nbsp;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;&lt;font color="#0000ff" size="2"&gt; 
&lt;p&gt;&amp;lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;membership&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;defaultProvider&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&lt;/font&gt;&lt;font size="2"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;ADMembershipProvider&lt;/font&gt;&lt;font size="2"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;br /&gt;&amp;lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;providers&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;br /&gt;&amp;lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;clear&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;/&amp;gt;&lt;br /&gt;&amp;lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;add&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;name&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&lt;/font&gt;&lt;font size="2"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;ADMembershipProvider&lt;/font&gt;&lt;font size="2"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;type&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&lt;/font&gt;&lt;font size="2"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a&lt;/font&gt;&lt;font size="2"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;connectionStringName&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&lt;/font&gt;&lt;font size="2"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;ActiveDirectory&lt;/font&gt;&lt;font size="2"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;/&amp;gt;&lt;br /&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;providers&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;br /&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;membership&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#000000"&gt;&lt;font color="#0000ff"&gt;&lt;br /&gt;&lt;/font&gt;The connectionString-name is pointing to an LDAP-connectionString defined under the connectionStrings section of the web.config.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#000000"&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#000000"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#000000"&gt;It really bothers me that I have to reset my computer every hour, so any tip is appreciated ofcourse.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#000000"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#000000"&gt;Anders Ø&lt;/font&gt;&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;</description></item><item><title>A local error has occurred (formatting fixed)</title><link>http://forums.asp.net/thread/1785011.aspx</link><pubDate>Tue, 03 Jul 2007 14:50:22 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1785011</guid><dc:creator>andersoyvind</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1785011.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=93&amp;PostID=1785011</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m making an intranet webapplication in ASP.NET, using Windows auth and accessing Active Directory using the LDAP-pattern found in one of the stickies on top of the LDAP-threads-list here on forums.asp.net. &lt;/p&gt;
&lt;p&gt;public static DataSet FindUsers(string sFilter, string[] columns, string path, bool useCached); &lt;/p&gt;
&lt;p&gt;I&amp;#39;ve got a domain controller installed by my side, and using the following in a test-application: &lt;/p&gt;
&lt;p&gt;string filter = &amp;quot;(objectClass=*)&amp;quot;; &lt;br /&gt;string[] columns = new string[]{&amp;quot;sn&amp;quot;, &amp;quot;sAMAccountName&amp;quot;, &amp;quot;cn&amp;quot;}; &lt;br /&gt;string path = &amp;quot;LDAP:///&amp;quot;; DataSet ds = FindUsers(filter, columns, path, false); &lt;br /&gt;dataGridView1.DataSource = ds; dataGridView1.AutoGenerateColumns = true; &lt;br /&gt;dataGridView1.DataMember = ds.Tables[0].ToString();&lt;br /&gt;&lt;br /&gt;I fetch stuff easily, and the DataGridView is filled with it. Nice. BUT. Even if it works right now, tomorrow, or after some amount of hours (not sure how many though), I get DirectoryServicesCOMException thrown at me, saying: &lt;br /&gt;&lt;br /&gt;&amp;quot;A local error has occurred.&amp;quot;. It&amp;#39;s triggered by the DirectorySearcher.FindAll()-function. Since it&amp;#39;s working now, I don&amp;#39;t have the exact output in front of me. Google gives me nada on the specific error message, and I get the error message in both my web app and the test-app I mentioned above. &lt;/p&gt;
&lt;p&gt;Anyone with experiences on this? I&amp;#39;ve set up the domain controller myself, and started wondering if THAT is a potential error source. &lt;/p&gt;
&lt;p&gt;Thanks in advance, Anders Øyvind&lt;/p&gt;</description></item></channel></rss>