SharePoint Browser Error

April 2, 2008 at 10:12 pm | In K2 blackpearl, MOSS, SharePoint |

Was talking through a problem with another developer recently, who was having an error within the K2 Designer for Visual Studio.

The environment is a “semi-distributed” one, with the developer using a Vista laptop + Visual Studio - and then the K2 server & bits located on a server elsewhere.

The problem is this :

  • Open K2 Object Browser
  • Expand the SharePoint Server(s) node
  • Show the list of document libraries

The following error then appears :

image 

Client found response content type of ‘text/html; charset=utf-8′, but expected ‘text/xml’.

It’s a huuuuge message box, with the contents actually looking like the HTML for a SharePoint “page”.

*hhhmmm*

I’m guessing it’s trying to call a web service, and thinking that XML would/should be coming back, but it’s getting a page instead - ie. HTML.

The first thing to check is the configuration of the SharePoint server :

  • Open the K2 Object Browser
  • Right-click on the SharePoint Site URL node
  • Select “Edit Field…”

image

This shows the following dialog, with the name, description and URL :

image

As MythBusters would say - “well there’s your problem !!”

When entering the value for the SharePoint URL, “/Pages/default.aspx” was included also.

And so - within the K2 Designer code, there would be some code trying to call :

http://moss.denallix.com/Pages/default.aspx/WebServices/K2-WS.asmx

In fact, let’s go have a look into the LogFiles for IIS - to see. 

C:\WINDOWS\system32\LogFiles\

image

Yep - there’s the one that’s “wrong”…>

/Pages/default.aspx/_vti_bin/K2SPDocumentLibraries.asmx

When viewing the “home page” for the site, it’s often tempting to just copy+paste the URL from the address bar - as this *IS* the site URL, right ?

Well - seems like K2 (and SharePoint itself) don’t trim off the “Pages” and “default.aspx” - nor should they, I guess.

So, the solution was simply to ensure that the URL entered was just the web application / site collection address :

image 

And - yep, that works now :

image

And - let’s have a look into the IIS log (again) :

image

So - when configuring the “environment variables”, make sure you ONLY include the site URL - not the “page”.

No Comments yet »

RSS feed for comments on this post. TrackBack URI

Leave a comment

XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Blog at WordPress.com. | Theme: Pool by Borja Fernandez.
Entries and comments feeds.