Skip to main content

In Lab 1, Exercise 1, Step 4, configure a SQL DataSource to the Region SmartObject


Under point 25, when I click Test Query, I got an error,

"There was an error executing the query. Please check the syntax of the command and if persent, the types and values of the parameters and ensure they are correct.

The request failed with HTTP status 401: Unauthorized."


All I have done in lab was adding 4 Items under a list in WSS, and created smartObject to access it. Then I open a ASP.NET Form and added SQLDataSource and connect to that SmartObject.


 


16069i651699DB19802D5A.jpg
It sounds like the user credentials aren't being passed to SharePoint.  Does your web app have anonymous turned off, Windows Integrated turned on in IIS and Identity Impersonate=true in whe web.config?

I already turn off the Anonymous and enabled Windows Integrated.


Is  <identity impersonate="true"/> set in the web.config?


Is the client you are browsing from, the web app, K2 and SharePoint all on different machines?


Web Forms application in my computer, K2 Server and Workspaces one one server and WSS in antoher server

I think Kerberos may me needed here since the AD credentials have to go from your machine to the K2 Server to the SharePoint server.  In these "double hop" scenarios Kerberos is usually the answer.


 


I second Bob's answer.

I checked K2 Server's event log, I was already using Kerberos to access to K2 Server from my Client machine.


 Update: check from the sharepoint server log, found out that the smartobject is trying to get data in SharePoint from K2, and the log showing that K2 is using Anonymous Logon to K2.


Which confirms credentials aren't being passed. It sounds like you have Kerberos setup between your web app and K2, which is a good start, but Windows will prohibit those credentials to be passed on to the next hop to SharePoint unless you enabled Kerberos on SharePoint also.  Below is a link to a Microsoft KB article that describes how to enable it in SharePoint.


http://support.microsoft.com/kb/832769


Kerberos was already enabled to be using in the WSS. Any other chance? Do I need to do anything in K2 Server?

Did you ever resolve this issue?


I am having the same problem!


Reply