SOLVED: WCF returns: "The remote server returned an error: NotFound."
As long as I return a windows known type the service works fine:
For example:
Code:
[ServiceContract]
public interface ICalendarService
{
[OperationContract(AsyncPattern = true)]
IAsyncResult BeginCreateCalenderItem(string applicationName, string subject, string body, string username, string password, AsyncCallback callBack, Object state);
bool EndCreateCalenderItem(IAsyncResult result);
}
But if I return my own type:
Code:
[ServiceContract]
public interface IPhotoService
{
[OperationContract(AsyncPattern = true)]
IAsyncResult BeginGetImagesFromAlbumByKeyWord(string keyString, string username, string password, AsyncCallback callBack, Object state);
PhotoAlbum EndGetImagesFromAlbumByKeyWord(IAsyncResult result);
}
With:
Code:
[DataContract]
public class PhotoAlbum
{
[DataMember]
public string Name { get; set; }
[DataMember]
public List<PhotoImage> Images { get; set; }
}
And:
Code:
[DataContract]
public class PhotoImage
{
[DataMember]
public string URL { get; set; }
[DataMember]
public string Thumbnail { get; set; }
[DataMember]
public string Title { get; set; }
}
This returns the Error.
Has it something to do with system known types?
Re: WCF returns: "The remote server returned an error: NotFound."
No you should be able to return pretty much any type you want as long as it has the DataContract attribute. You are defining the data contract class on the server side aren't you rather than on the client side (not sure if its even possible the other way around but I cant think why else the server would not recognise a type). Also, have you done Update Service Reference on the client side to make sure the client proxy is all up to date?
Re: WCF returns: "The remote server returned an error: NotFound."
I think I did pretty much everything I know I can do.
Maybe it is the installation of ASP.NET.
It's really weird.
I must point out I don't make use of the service reference.
Re: WCF returns: "The remote server returned an error: NotFound."
Quote:
Originally Posted by
HWijngaarD
I must point out I don't make use of the service reference.
So what do you do? Are you just using svcutil.exe manually? (that is all Update Service Reference uses anyway)
Re: WCF returns: "The remote server returned an error: NotFound."
I used the google api's.
They where blocked by windows.
So when the service performed a query to the picasa api,
it returned an error.
The solution:
Copy the google api's to an fat32 storage and copy it back to ntfs.
Fat32 does not have the tag for security risks to be blocked.