Tuesday, August 11, 2009

Sharepoint BDC error:Unable to connect to AdventureWorks,NT AUTHORITY\ANONYMOUS LOGON

I have done a lot of stuff with the BDC in MOSS and everytime I work with it I get a new error ;) I was trying a simple connection to Adventure Works 2005 database which was on a different server.I could connect using the BDC Definition Editor and could retrieve data but when I added a BDC webpart to my SharePoint page , I got "Unable to connect to Adventure Works".It clearly was an authentication issue but I had to track it.Here are the steps I used :
  • I went on to check the SharePoint logs which are stored in:"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\Logs" I opened the latest log and searched for "Business Data". There were loads of records.So I thought let me do my own Logging.
  • So I went on to 'Central Administration' -> 'Operations' -> 'Diagnostic Logging' -> 'Event Throttling' and turn on the objects that I wanted to monitor. In this case, I wanted to turn on 'Business Data', select 'None' and 'Verbose'. I also customized my log path so that it was not as long as the default value.
  • Now when I tried connecting the webpart again to my application definition I got the error on my log file "Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'"
  • So now I went on and opened my application definition file and changed the authentication type from "PassThough" to "RevertToSelf" authentication and VOILA !! IT WORKED :)


No comments: