Data View Web Service Data Source Error

If you have ever tried to use SharePoint designer to create a data view web part that is a little bit fancy then you have probably seen this error: The server returned a non-specific error when trying to get data from the data source..

I myself was trying to get a web part to display a list of all sub-sites under a particular site collection using the GetAllSubWebs web service call. I came across two problems here. Firstly,  I could not get the data source to return anything without this error, no matter what I tried- including hard coding my credential using Basic authentication (datasource properties- Login tab). So I found this post and followed these instructions which helped somewhat:

“In the folder list, open the _catalogs folder, then the fpdatasources folder. In this folder, you should see a XML file with the name of the SQL SOAP service that you created in the Data Source Library. Double click on it to edit the file. Search for “SelectAction” (assuming, of course, that your SOAP service was getting data). Now, add single quotes before and after the double quotes, so the SelectAction attribute looks like this: SelectAction='”http://…”‘. Now save the file, and try to show the data again. Like magic, it’s suddenly working!”

So now my web part was displaying the sub sites (including sub sites of sub sites- yay), but then, when I tried to set the web part to use Windows Authentication again (using an account that was a site collection admin), I started to receive the same error! From all the research I have done (e.g. here) it seems this is just a bug in SP Designer 2007. If anyone knows whether it has been fixed in 2010 please drop me a comment. Please be aware that choosing Basic Authentication and hard coding a credential means that anyone who has access to the source of that page e.g. through Designer, will be able to see your username and password. Its not recommended.

Advertisements

One thought on “Data View Web Service Data Source Error

  1. Hi Eeebee,
    You know how slow things are around here, well that new position has finally come up. Please contact me if you are interested…. or contact me anyway with your Goss!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s