Results 1 to 5 of 5

Thread: SOLVED: WCF returns: "The remote server returned an error: NotFound."

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2004
    Posts
    297

    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?
    Last edited by HWijngaarD; May 5th, 2010 at 03:09 AM. Reason: solved

  2. #2
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    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?
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2004
    Posts
    297

    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.

  4. #4
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: WCF returns: "The remote server returned an error: NotFound."

    Quote Originally Posted by HWijngaarD View Post

    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)
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2004
    Posts
    297

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width