Add to My Yahoo! | Google Reader or Homepage | Add to Windows Live | Add to Windows Live Alerts

Wictor Wilén

SharePoint Specialist / Author / MCT / MCTS / MCP / MSc ranting about SharePoint and other interesting Microsoft technologies

Update to the Custom code with SharePoint Online and Windows Azure, due to bug in SharePoint Online

Posted at 2009-04-17 02:00 by Wictor Wilén in SharePoint with 10 comments.

A few weeks back I wrote a post on how to mix Windows Azure and SharePoint Online called Custom code with SharePoint Online and Windows Azure. Since then both Windows Azure and SharePoint online have had some updates.

First of all you no longer need to create the bindings in the code to make it fully trusted. Good to know but it does not affect the solution.

A Bug in SharePoint Online Web Services

More important is the fact that you cannot longer use the Visual Studio Add Service Reference function and add the services from your SharePoint Online site to your solution. You will end up with an error like this:

Add Service Reference Error

It says that it cannot recognize the document format of the Lists.asmx?WSDL and Lists.asmx?disco documents. Why?

If you open up the Lists web service in a browser you get the standard auto generated ASMX page:

Lists.asmx

From this page you can check out all the web service operations, but when you click on the Service Description link, which would take you to the /_vti_bin/Lists.asmx?WSDL page, which contains the definitions of the web service and it’s operations you get an error. The same errors that Visual Studio gets.

Lists.asmx?WSDL Fail!

This page should contain XML and look like this (taken from a normal WSS 3.0 installation):

Lists.asmx?WSDL working!

So what is happening in SharePoint Online!? If you take a look at the source of the faulty WSDL page you will see an error message saying something like this:

The requested page does not contain a link to the Microsoft Online Services Privacy Statement. The page cannot be displayed until a link to the Privacy Statement is added. Please notify your SharePoint site administrator.
Only the site administrator or site owner can add the Privacy Statement. For information on adding the statement, see: Add the Privacy Statement to your SharePoint Online Site.

This error message is shown on all ASPX pages in SharePoint Online that does not contain a link to the Microsoft Online Services Privacy Statement, which is a requirement in SharePoint Online. The link in the error message tells you how to include this message in your custom ASPX pages.

But, we just looked at a ASMX page, I can’t have statements like this in my web services!?

Let’s dig a little bit deeper into the SharePoint 12-folder. In the ISAPI folder you have the Lists.asmx file, as well as a Listsdisco.aspx and a Listswsdl.aspx file. Normally in ASP.NET when you create your own ASMX file the WSDL and DISCO will be created automatically but SharePoint silently uses these other two files, instead of creating them at runtime. Because these two files are ASPX files you need to have that Privacy Statement.

This is in my opinion a real bug in SharePoint Online, and should be corrected as soon as possible.

How to work around the bug?

It’s pretty easy to work around this bug. All you have to do is when adding the service reference is to get the web service from a normal SharePoint installation (WSS or MOSS) and then in your service binding point to your SharePoint Online address.

I hope that the Microsoft Online team come up with a solution to this problem as soon as possible, since it will cause headache for a lot of developers.

Comments and trackbacks

#  really bad by Vlad Roshchin
Screenshot from websnpr it's April 29th and Microsoft still didnt fix this BUG screwing up many projects. I understand in VS you can specify a URL during runtime, what about those small customizations companies are doing in SharePoint DEsigner??? unbelievable.
#  re: really bad by Wictor
Screenshot from websnpr It's a shame its not fixed yet. I have not heard anything from MS support since filing the bug, just a survey to fill in on how satisfied I am with the support. Sigh...
#  Fix being deployed by Troy
Screenshot from websnpr Just a heads up that we have OPS deploying a fix for this right now.
#  RE: fix by Wictor
Screenshot from websnpr Thanks Troy! Awesome! /WW
#  Fix Delayed by Troy
Screenshot from websnpr I'm sorry to report that we had to roll back the fix. We are diligently working on getting this fixed ASAP. I'm as dissapointed as you.
#  Re: delay by Wictor
Screenshot from websnpr I heard that there were problems with the fix. I guess we can wait, since we can work around it.
#  Now Fixed by Troy
Screenshot from websnpr We just finished deploying the fix for this and I just verified it. You should be good to go now.
#  Now Fixed by Troy
Screenshot from websnpr We just finished deploying the fix for this and I just verified it. You should be good to go now.
#  SharePoint Online updated by Trackback
Screenshot from websnpr Microsoft has updated SharePoint Online with a patch that resolves the bug that prohibited you from getting the service descriptions from the web services, that I previously described. This means th...
#  SharePoint Online updated by Trackback
Screenshot from websnpr Microsoft has updated SharePoint Online with a patch that resolves the bug that prohibited you from getting
Make a comment on this post:
Subject:  

Your name:  
Your Url:  
Note: submissions may have to be approved before being visible, so don't submit your comment multiple times.

web tracker
msfeedicon The one and only feed enhancement utility for Internet Explorer 7.
Read more...