The request failed with the error message: Object moved (SharePoint 2010, Web Services & FBA)
January 4, 2011 4 Comments
Ever seen this message?
Sure, some simple code to loop through the User Profile store in SharePoint 2010 via a console application using web services. It can be a frustrating message indeed. However, there is a simple resolution.
The problem is – you are not authenticated. Even if you are passing credentials in your code, it is not going to work. You need to be authenticated to get to the web service itself. In this instance – we are using Claims Based Authentication, and mixed CBA, using both Forms Based Authentication, as well as Windows Authentication. So, what is happening here, and you can see in the error below
You’re being redirected to the Sign In page to allow you to select your authentication method – you are connecting to a web page after all, even if you do not see it.
Extend your mixed authentication web application, and create a zone just for Windows Authentication, then change the Web Reference URL in the properties of your web service, to use that extended URL and port. You should have no issues of this kind anymore.