<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/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>How to avoid 1000 rows limitation when querying active directory (AD) from SQL 2005 with using custom code.</title><link>http://blogs.msdn.com/ikovalenko/archive/2007/03/22/how-to-avoid-1000-rows-limitation-when-querying-active-directory-ad-from-sql-2005-with-using-custom-code.aspx</link><description>As all of you know it is possible to query active directory from SQL Server with using ADSI provider as linked server. This solution works fine until you will have a lot of users in active directory. According to best practice guide windows system engineers</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>FAQ: How do I query Active Directory from SQL Server?</title><link>http://blogs.msdn.com/ikovalenko/archive/2007/03/22/how-to-avoid-1000-rows-limitation-when-querying-active-directory-ad-from-sql-2005-with-using-custom-code.aspx#1932929</link><pubDate>Thu, 22 Mar 2007 22:52:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1932929</guid><dc:creator>Euan Garden's BLOG</dc:creator><description>&lt;p&gt;There are several ways but the most commonly used approach of using linked servers hits ona 1000 row&lt;/p&gt;</description></item><item><title>re: How to avoid 1000 rows limitation when querying active directory (AD) from SQL 2005 with using custom code.</title><link>http://blogs.msdn.com/ikovalenko/archive/2007/03/22/how-to-avoid-1000-rows-limitation-when-querying-active-directory-ad-from-sql-2005-with-using-custom-code.aspx#2274293</link><pubDate>Wed, 25 Apr 2007 20:29:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2274293</guid><dc:creator>Mark Reen</dc:creator><description>&lt;p&gt;I have been trying to use your process to query AD. When I first loaded everthing, It work fine. Then&lt;/p&gt;
&lt;p&gt;after about 4 hours it all stopped working. I am getting the error below. Any ideas on how to fix this issue?&lt;/p&gt;
&lt;p&gt;Mark R.&lt;/p&gt;
&lt;p&gt;Msg 6522, Level 16, State 1, Procedure usp_TryAuthenticate, Line 0&lt;/p&gt;
&lt;p&gt;A .NET Framework error occurred during execution of user-defined routine or aggregate &amp;quot;usp_TryAuthenticate&amp;quot;: &lt;/p&gt;
&lt;p&gt;System.Runtime.InteropServices.COMException: The server is not operational.&lt;/p&gt;
&lt;p&gt;System.Runtime.InteropServices.COMException: &lt;/p&gt;
&lt;p&gt; &amp;nbsp; at MsForClient.SqlServer.SqlClrToolkit.MSADHelper.usp_TryAuthenticate(String ProviderString, Int32 Secure)&lt;/p&gt;
</description></item><item><title>re: How to avoid 1000 rows limitation when querying active directory (AD) from SQL 2005 with using custom code.</title><link>http://blogs.msdn.com/ikovalenko/archive/2007/03/22/how-to-avoid-1000-rows-limitation-when-querying-active-directory-ad-from-sql-2005-with-using-custom-code.aspx#2275189</link><pubDate>Wed, 25 Apr 2007 22:04:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2275189</guid><dc:creator>Igor Kovalenko</dc:creator><description>&lt;p&gt;Mark, &lt;/p&gt;
&lt;p&gt;this may only meen that your domain controller (AD) is unavailable (&amp;quot;Server is not operational&amp;quot;). Please check for network issues or possible AD issues. Buy the way tomorrow i am planning to make a deep test in special environment under pressure to reproduce the behavior to fall into situation as you described.&lt;/p&gt;
</description></item><item><title>re: How to avoid 1000 rows limitation when querying active directory (AD) from SQL 2005 with using custom code.</title><link>http://blogs.msdn.com/ikovalenko/archive/2007/03/22/how-to-avoid-1000-rows-limitation-when-querying-active-directory-ad-from-sql-2005-with-using-custom-code.aspx#2862044</link><pubDate>Fri, 25 May 2007 09:00:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2862044</guid><dc:creator>Des Jacobsen</dc:creator><description>&lt;p&gt;Can I sugest you need one additional step in this procedure.&lt;/p&gt;
&lt;p&gt;Before you try to create the ASYMMETRIC KEYmake sure that the SQL Server service account has permision to the directory that your assemply is stored in. If you dont you get an error.&lt;/p&gt;
&lt;p&gt;The certificate, asymetric key, or private key file does not exist or has invalid format.&lt;/p&gt;</description></item><item><title>re: How to avoid 1000 rows limitation when querying active directory (AD) from SQL 2005 with using custom code.</title><link>http://blogs.msdn.com/ikovalenko/archive/2007/03/22/how-to-avoid-1000-rows-limitation-when-querying-active-directory-ad-from-sql-2005-with-using-custom-code.aspx#3011715</link><pubDate>Thu, 31 May 2007 22:04:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3011715</guid><dc:creator>Jian</dc:creator><description>&lt;p&gt;Thanks for this artical. &amp;nbsp;I am wondering if there is a way to get the AzMan store in AD or even directly authorize the user in Stored Proc.&lt;/p&gt;
&lt;p&gt;Thanks in advance!&lt;/p&gt;
&lt;p&gt;Jian&lt;/p&gt;</description></item><item><title>re: How to avoid 1000 rows limitation when querying active directory (AD) from SQL 2005 with using custom code.</title><link>http://blogs.msdn.com/ikovalenko/archive/2007/03/22/how-to-avoid-1000-rows-limitation-when-querying-active-directory-ad-from-sql-2005-with-using-custom-code.aspx#3011895</link><pubDate>Thu, 31 May 2007 22:29:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3011895</guid><dc:creator>Igor Kovalenko</dc:creator><description>&lt;p&gt;I may miss something but as for me it will be difficult to directly authorize users in stored proc. such kind of stored procedures. By default it works under security context of sql server account.&lt;/p&gt;
&lt;p&gt;You may try to use another approach. Firstly, get calling user windows loginname. Second. extract the members of the group which authorized user should belong to. the second, enum all members of the group to check if user is a member of the group.&lt;/p&gt;
&lt;p&gt;Something like this&lt;/p&gt;
&lt;p&gt;CREATE PROCEDURE usp_before_calling_AD&lt;/p&gt;
&lt;p&gt; &amp;nbsp;@param1, @param2, @param 3 etc&lt;/p&gt;
&lt;p&gt;AS&lt;/p&gt;
&lt;p&gt;-- get original caller &lt;/p&gt;
&lt;p&gt;DECLARE @usr as sysname&lt;/p&gt;
&lt;p&gt;SET @usr = ORIGINAL_LOGIN()&lt;/p&gt;
&lt;p&gt;-- than extract your secret group members from AD:&lt;/p&gt;
&lt;p&gt;CREATE TABLE #temp (&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;cn sysname )&lt;/p&gt;
&lt;p&gt;SET @pStr = N'LDAP://DC=HQ,DC=corp,DC=xxxxxxxxx,DC=ru'&lt;/p&gt;
&lt;p&gt;SET @pOutputFieldList = 'cn'&lt;/p&gt;
&lt;p&gt;INSERT INTO #temp&lt;/p&gt;
&lt;p&gt;EXEC dbo.usp_GetUserList @pStr, @pOutputFieldList, NULL, NULL, 0, 'Subtree'&lt;/p&gt;
&lt;p&gt;-- and last step&lt;/p&gt;
&lt;p&gt;IF EXISTS(SELECT TOP 1 1 FROM #temp whete cn = @usr)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;SELECT 'allowed user'&lt;/p&gt;
&lt;p&gt;ELSE &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;SELECT 'deny logon'&lt;/p&gt;
&lt;p&gt;RETURN&lt;/p&gt;</description></item><item><title>re: How to avoid 1000 rows limitation when querying active directory (AD) from SQL 2005 with using custom code.</title><link>http://blogs.msdn.com/ikovalenko/archive/2007/03/22/how-to-avoid-1000-rows-limitation-when-querying-active-directory-ad-from-sql-2005-with-using-custom-code.aspx#5034518</link><pubDate>Fri, 21 Sep 2007 18:13:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5034518</guid><dc:creator>davidn@magenic.com</dc:creator><description>&lt;p&gt;Hi Igor,&lt;/p&gt;
&lt;p&gt;I was able to use your toolkit almost 100% outofthebox. &amp;nbsp;I do have a question. &amp;nbsp;My company required the all the LDAP paths to be passed store in a config file...How I make it read AD info from a MyAssembly.dll.config?&lt;/p&gt;
&lt;p&gt;Where is the physical location that I need to deploy my config file if my dll/config are residing in this structure&lt;/p&gt;
&lt;p&gt;C:\MyApp\Bin\Debug\MyAssembly.dll&lt;/p&gt;
&lt;p&gt;C:\MyApp\Bin\Debug\MyAssembly.dll.config&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;David.&lt;/p&gt;
&lt;p&gt;DavidN@magenic.com&lt;/p&gt;
</description></item><item><title>re: How to avoid 1000 rows limitation when querying active directory (AD) from SQL 2005 with using custom code.</title><link>http://blogs.msdn.com/ikovalenko/archive/2007/03/22/how-to-avoid-1000-rows-limitation-when-querying-active-directory-ad-from-sql-2005-with-using-custom-code.aspx#5079857</link><pubDate>Sun, 23 Sep 2007 22:02:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5079857</guid><dc:creator>Igor Kovalenko</dc:creator><description>&lt;p&gt;Truly says i have no idea how to deploy this assembly with config file into SQL. Anyway you can try to use the following:&lt;/p&gt;
&lt;p&gt;- change source code and drop all parameters because of unnecessary.&lt;/p&gt;
&lt;p&gt;- define module internal variables (like former parameters)&lt;/p&gt;
&lt;p&gt;- to initiate parameters&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; - open C:\MyApp\Bin\Debug\MyAssembly.dll.config as simple xml file (with using System.XML XmlReader or XmlTextReader)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; - parse config file to extract necessary parameter's value&lt;/p&gt;
&lt;p&gt;- call AD when ready. &lt;/p&gt;
&lt;p&gt;In this case you'll call EXEC dbo.usp_GetUserList without parameters. Even more you can impersonate callers within function to read the different config files. The only check for appropriate permissions for folder C:\MyApp\Bin\Debug\.&lt;/p&gt;
</description></item><item><title>re: How to avoid 1000 rows limitation when querying active directory (AD) from SQL 2005 with using custom code.</title><link>http://blogs.msdn.com/ikovalenko/archive/2007/03/22/how-to-avoid-1000-rows-limitation-when-querying-active-directory-ad-from-sql-2005-with-using-custom-code.aspx#5276831</link><pubDate>Thu, 04 Oct 2007 21:29:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5276831</guid><dc:creator>Scott Marquardt</dc:creator><description>&lt;p&gt;Very nice indeed.&lt;/p&gt;
&lt;p&gt;Has anyone cobbled together a similar attribute-writable toolkit?&lt;/p&gt;
</description></item><item><title>re: How to avoid 1000 rows limitation when querying active directory (AD) from SQL 2005 with using custom code.</title><link>http://blogs.msdn.com/ikovalenko/archive/2007/03/22/how-to-avoid-1000-rows-limitation-when-querying-active-directory-ad-from-sql-2005-with-using-custom-code.aspx#5387509</link><pubDate>Wed, 10 Oct 2007 04:18:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5387509</guid><dc:creator>Scott Marquardt</dc:creator><description>&lt;p&gt;Nuts.&lt;/p&gt;
&lt;p&gt;I'm finding a problem with this, and I can't identify a culprit in the code.&lt;/p&gt;
&lt;p&gt;I have some schema extensions. When I run the user list and the attributes are returned, one of these custom attributes returns fine, until it comes to users for whom the attribute is a null. At that point, the populated attribute of the immediately prior user ends up being returned for all subsequent users for whom the attribute is a null. It's as if there's a variable somewhere that's not getting reset, in the code. But I can't find anything like that at all in the code.&lt;/p&gt;
&lt;p&gt;When the results get to another user with a populated attribute, things return to normal until another user with that attribute null comes along -- then that user and any subsequent users with that attribute null &amp;quot;inherit&amp;quot; the previous user's attribute.&lt;/p&gt;
&lt;p&gt;OK, more info. It does this with any attribute, not just custom attributes. I figured as much, but wanted to check.&lt;/p&gt;
&lt;p&gt;Could it be lines 651 to 657 in ADInfo? &lt;/p&gt;
</description></item><item><title>re: How to avoid 1000 rows limitation when querying active directory (AD) from SQL 2005 with using custom code.</title><link>http://blogs.msdn.com/ikovalenko/archive/2007/03/22/how-to-avoid-1000-rows-limitation-when-querying-active-directory-ad-from-sql-2005-with-using-custom-code.aspx#5784119</link><pubDate>Tue, 30 Oct 2007 21:05:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5784119</guid><dc:creator>gjohnson</dc:creator><description>&lt;p&gt;Scott did you find a solution to the null issue? &amp;nbsp;&lt;/p&gt;
</description></item><item><title>re: How to avoid 1000 rows limitation when querying active directory (AD) from SQL 2005 with using custom code.</title><link>http://blogs.msdn.com/ikovalenko/archive/2007/03/22/how-to-avoid-1000-rows-limitation-when-querying-active-directory-ad-from-sql-2005-with-using-custom-code.aspx#5821390</link><pubDate>Fri, 02 Nov 2007 00:55:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5821390</guid><dc:creator>Scott Marquardt</dc:creator><description>&lt;p&gt;No, alas. No joy. In fact, I nearly forgot about the bug until just this moment, when I returned to the method and was puzzled by something. Which led me back here in hopes that someone had resolved the bug, only to find that others wonder whether *I* had. &amp;nbsp; ;-)&lt;/p&gt;
&lt;p&gt;Darn the luck for us both!&lt;/p&gt;
</description></item><item><title>re: How to avoid 1000 rows limitation when querying active directory (AD) from SQL 2005 with using custom code.</title><link>http://blogs.msdn.com/ikovalenko/archive/2007/03/22/how-to-avoid-1000-rows-limitation-when-querying-active-directory-ad-from-sql-2005-with-using-custom-code.aspx#5939750</link><pubDate>Tue, 06 Nov 2007 19:59:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5939750</guid><dc:creator>Scott Marquardt</dc:creator><description>&lt;p&gt;I still haven't figured out why the code is doing this, though I'm beginning to suspect it ain't the code. &amp;nbsp; (!)&lt;/p&gt;
</description></item><item><title>re: How to avoid 1000 rows limitation when querying active directory (AD) from SQL 2005 with using custom code.</title><link>http://blogs.msdn.com/ikovalenko/archive/2007/03/22/how-to-avoid-1000-rows-limitation-when-querying-active-directory-ad-from-sql-2005-with-using-custom-code.aspx#6670407</link><pubDate>Thu, 06 Dec 2007 00:00:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6670407</guid><dc:creator>Taylor Gerring</dc:creator><description>&lt;p&gt;Scott, I think I have a solution to your problem! Around line 656 in ADInfo.cs you will see something like:&lt;/p&gt;
&lt;p&gt;//start code&lt;/p&gt;
&lt;p&gt;if (PropertyValues.Length &amp;gt; 0)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;record.SetSqlString(Count + 1, PropertyValues.Substring(0, PropertyValues.Length - 1));&lt;/p&gt;
&lt;p&gt;//end code&lt;/p&gt;
&lt;p&gt;Add the below ELSE to it, so the whole block looks like below:&lt;/p&gt;
&lt;p&gt;//start code&lt;/p&gt;
&lt;p&gt;if (PropertyValues.Length &amp;gt; 0)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;record.SetSqlString(Count + 1, PropertyValues.Substring(0, PropertyValues.Length - 1));&lt;/p&gt;
&lt;p&gt;else&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;record.SetSqlString(Count + 1, SqlString.Null);&lt;/p&gt;
&lt;p&gt;//end code&lt;/p&gt;
&lt;p&gt;Re-build the DDL, run an ALTER ASSEMBLY to register the new DLL with SQL Server, and try your problematic query again. Instead of getting duplicate rows, this change now gives me a SQL NULL, as one would expect.&lt;/p&gt;
</description></item><item><title>re: How to avoid 1000 rows limitation when querying active directory (AD) from SQL 2005 with using custom code.</title><link>http://blogs.msdn.com/ikovalenko/archive/2007/03/22/how-to-avoid-1000-rows-limitation-when-querying-active-directory-ad-from-sql-2005-with-using-custom-code.aspx#6723038</link><pubDate>Mon, 10 Dec 2007 15:39:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6723038</guid><dc:creator>Claudia</dc:creator><description>&lt;p&gt;This works very well, but I still have one Problem: I want to read also the Object ID which is a Byte Array in AD. How can I convert this in a varchar Format?&lt;/p&gt;
&lt;p&gt;Thank you for your help!&lt;/p&gt;</description></item><item><title>re: How to avoid 1000 rows limitation when querying active directory (AD) from SQL 2005 with using custom code.</title><link>http://blogs.msdn.com/ikovalenko/archive/2007/03/22/how-to-avoid-1000-rows-limitation-when-querying-active-directory-ad-from-sql-2005-with-using-custom-code.aspx#6726962</link><pubDate>Mon, 10 Dec 2007 23:22:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6726962</guid><dc:creator>Igor Kovalenko</dc:creator><description>&lt;p&gt;Claudia, I have no idea. I only know how to convert BigInt (like LastLogon) to date.&lt;/p&gt;</description></item><item><title>re: How to avoid 1000 rows limitation when querying active directory (AD) from SQL 2005 with using custom code.</title><link>http://blogs.msdn.com/ikovalenko/archive/2007/03/22/how-to-avoid-1000-rows-limitation-when-querying-active-directory-ad-from-sql-2005-with-using-custom-code.aspx#6739005</link><pubDate>Wed, 12 Dec 2007 00:55:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6739005</guid><dc:creator>Scott Marquardt</dc:creator><description>&lt;p&gt;Taylor, that's great. Worked perfectly. Thanks so much! &lt;/p&gt;</description></item><item><title>re: How to avoid 1000 rows limitation when querying active directory (AD) from SQL 2005 with using custom code.</title><link>http://blogs.msdn.com/ikovalenko/archive/2007/03/22/how-to-avoid-1000-rows-limitation-when-querying-active-directory-ad-from-sql-2005-with-using-custom-code.aspx#7108900</link><pubDate>Mon, 14 Jan 2008 18:38:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7108900</guid><dc:creator>BJ</dc:creator><description>&lt;p&gt;(5 row(s) affected)&lt;/p&gt;
&lt;p&gt;Msg 6522, Level 16, State 1, Procedure usp_TryAuthenticate, Line 0&lt;/p&gt;
&lt;p&gt;A .NET Framework error occurred during execution of user defined routine or aggregate 'usp_TryAuthenticate': &lt;/p&gt;
&lt;p&gt;System.DirectoryServices.DirectoryServicesCOMException: A referral was returned from the server.&lt;/p&gt;
&lt;p&gt;System.DirectoryServices.DirectoryServicesCOMException: &lt;/p&gt;
&lt;p&gt; &amp;nbsp; at MsForClient.SqlServer.SqlClrToolkit.MSADHelper.usp_TryAuthenticate(String ProviderString, Int32 Secure)&lt;/p&gt;
&lt;p&gt;.&lt;/p&gt;
&lt;p&gt;I am getting this when I tried to run the section that follows to test:&lt;/p&gt;
&lt;p&gt;EXEC dbo.usp_GetListOfRegisteredDirectoryProviders&lt;/p&gt;
&lt;p&gt;GO&lt;/p&gt;
&lt;p&gt;-- try to check - if net framework carefully installed and AD objects created without any issue&lt;/p&gt;
&lt;p&gt;DECLARE @pStr nvarchar(4000)&lt;/p&gt;
&lt;p&gt;SET @pStr = N'LDAP://DC=HQ,DC=corp,DC=wmdomain.local,DC=ru'&lt;/p&gt;
&lt;p&gt;EXEC dbo.usp_TryAuthenticate @pStr, 1&lt;/p&gt;
&lt;p&gt;GO&lt;/p&gt;
&lt;p&gt;Any ideas?&lt;/p&gt;</description></item><item><title>re: How to avoid 1000 rows limitation when querying active directory (AD) from SQL 2005 with using custom code.</title><link>http://blogs.msdn.com/ikovalenko/archive/2007/03/22/how-to-avoid-1000-rows-limitation-when-querying-active-directory-ad-from-sql-2005-with-using-custom-code.aspx#9013381</link><pubDate>Thu, 23 Oct 2008 20:36:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9013381</guid><dc:creator>Scott Marquardt</dc:creator><description>&lt;p&gt;Whokay, here's a new problem:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://www.sqlskills.com/blogs/bobb/post/How-do-you-shutdown-a-running-SQLCLR-appdomain.aspx"&gt;http://www.sqlskills.com/blogs/bobb/post/How-do-you-shutdown-a-running-SQLCLR-appdomain.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thus:&lt;/p&gt;
&lt;p&gt;&amp;gt;[Error] Script lines: 1-41 -------------------------&lt;/p&gt;
&lt;p&gt; A .NET Framework error occurred during execution of user-defined routine or aggregate &amp;quot;usp_GetUserList&amp;quot;: &lt;/p&gt;
&lt;p&gt;System.IO.FileLoadException: Could not load file or assembly 'System.DirectoryServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Assembly in host store has a different signature than assembly in GAC. (Exception from HRESULT: 0x80131050)&lt;/p&gt;
&lt;p&gt;System.IO.FileLoadException: &lt;/p&gt;
&lt;p&gt; &amp;nbsp; at MsForClient.SqlServer.SqlClrToolkit.MSADHelper.usp_GetUserList(String ProviderStringPath, String OutputFieldList, String UserName, String Password, Int32 Secure, String Scope)&lt;/p&gt;
&lt;p&gt;Any ideas on fixing this? Alter Assembly doesn't seem to do the trick. Total dropping and recreation doesn't, either. &lt;/p&gt;
&lt;p&gt;Is there an approved assembly that could be referenced without code changes?&lt;/p&gt;
</description></item><item><title>re: How to avoid 1000 rows limitation when querying active directory (AD) from SQL 2005 with using custom code.</title><link>http://blogs.msdn.com/ikovalenko/archive/2007/03/22/how-to-avoid-1000-rows-limitation-when-querying-active-directory-ad-from-sql-2005-with-using-custom-code.aspx#9013408</link><pubDate>Thu, 23 Oct 2008 20:52:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9013408</guid><dc:creator>Igor Kovalenko</dc:creator><description>&lt;p&gt;Scott, i am so sorry, on my mind something wrong EITHER with Net Framework OR with assembly's strong key. As for me the best choice will be to drop assembly from SQL Server &amp;amp; GAC, rebuild source code locally, sign it with strong key, and register assembly to SQL Server again. GAC is not necessary. Now i am not an MSFT; have no chance to install Visual Studio to debug issues. &lt;/p&gt;
&lt;p&gt;Sorry again.&lt;/p&gt;
</description></item></channel></rss>