Windows Develop Bookmark and Share   
 index > Windows Forms Data Controls and Databinding > SQL throwing Anonymous Access Denied with Impersonation and SSPI
 

SQL throwing Anonymous Access Denied with Impersonation and SSPI

I've got a crawler application that runs on a WFE, queries SharePoint, and then tries to report findings to the database on a seperate server. Despite using integrated security = SSPI in my connection string, and impersonating a user with valid credentials, the connection is attempting to use the Anonymous user and therefore getting denied.

All works perfectly if SQL and the crawler are on the same box. Can anyone point me in the right direction as to solving this problem? SQL authentication is unfortunately not an option.

I am using DataAdapter.Fill to retreive the data FWIW.

Thanks in advance,

Justin
Justin Barnes  Friday, May 08, 2009 10:54 AM
Nobody has any ideas?
Justin Barnes  Saturday, May 09, 2009 8:49 AM
OK, last try... this is a very important issue for me, and I am at a standstill. Please let me know if any additional information will be helpfull.

Justin
Justin Barnes  Monday, May 11, 2009 1:23 PM
Hi Justin,

Would you please let me know why SQL authentication is not an option in your case? Besides, are you sure you are successful in accomplishing in impersonating a valid user?

Please refer to the following two articles and see if it can help you in impersonating.

http://support.microsoft.com/kb/306158
http://msdn.microsoft.com/en-us/library/ms998292.aspx#paght000008_step2

In the first kb article, there's sample code on impersonating.


Best regards,
Bruce Zhou




Please mark the replies as answers if they help and unmark if they don't.
Bruce.Zhou  Wednesday, May 13, 2009 3:40 AM
If Justin's organization is anything like mine, the DBAs require all connections to the database to come from a Windows account.

There seems to be some serious conflict within Microsoft as to which method is the best practice. Various Microsoft applications force you one way or the other and their internal philosophical turf war has spilled over to their customers who are left to sort out the incompatibilities.
spnovice  Thursday, August 20, 2009 6:14 PM

You can use google to search for other answers

Custom Search

More Threads

• DBConcurrencyException was unhandled
• DataAdapter.Upadate error?
• Database Connection
• DataGridView and setting default values
• Setting Currency format on a DataGridView
• public IList GetItems()
• SQL User Defined Function in DataSet Designer
• Dataset, ManagementObjectSearcher and WMI query - indexed property problems
• Creating a XSD and XML file for storage.
• design patterns for simplified menus in .NET