SharePoint Browser Error

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”.

Advertisements
This entry was posted in K2 blackpearl, MOSS, SharePoint. Bookmark the permalink.

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