I have a windows application where i added a web service to sharepoint Lists.asmx.
When i am using the GetListItemChangesSinceToken() method i get an error:
The request failed with the error message:
--
<head><title>Document Moved</title></head>
<body><h1>Object Moved</h1>This document may be found <a HREF="http://localhost:333/Test/Forms/AllItems.aspx">here</a></body>
--.
I am calling the method like this:
public XmlNode GetListItems()
{
XmlNode getFirstToken = null;
try
{
getFirstToken = listService.GetListItemChangesSinceToken(
listName, null, null, null, null, null, currentToken, null);
}
...
}
where listName equal the guid of the list, and the list name is “Test”.
Any one have an idea what that error means? How to solve it?
Thanks alot.
I think that problem is that your web-service is in the same web application with your Sharepoint.
In this case Sharepoint intercepts the request handle from IIS and try to resolve it by himself. But it can’t do it, and redirects you to its default page.
Move your web-service out of Sharepoint site in IIS and try again.
Update:
According to your comments, address of
listServiceobject equals the default address for your sharepoint site. So you should get the real address of service, ending with.asmx, and set it to yourlistServiceobject.