Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9001783
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:28:56+00:00 2026-06-16T00:28:56+00:00

I am creating a wcf self hosted service. I am using UriTemplate class to

  • 0

I am creating a wcf self hosted service. I am using UriTemplate class to customize the urls to methods. the code snippet is given below

 public interface ISelfService
    {
        [WebInvoke(Method = "POST", UriTemplate = "ack/{errorcode}/{uniquefileid}")]
        [OperationContract]
        void Ack(ErrorCode errorcode, string uniquefileid);

       [WebInvoke(Method = "POST", UriTemplate = "filechanged/{metainfo}")]
       [OperationContract]
       void FileChanged(MetaInformation metainfo);

     }

Whenever i run this program i am getting the following error

Operation ‘FileChanged’ in contract ‘ISelfHostService’ has a query
variable named ‘metainfo’ of type ‘Natash.Common.MetaInformation’,
but type ‘Natash.Common.MetaInformation’ is not convertible by
‘QueryStringConverter’. Variables for UriTemplate query values must
have types that can be converted by ‘QueryStringConverter’

Can any one tell me why is this happening?

And, I have not made any modification to the web.config file. Do i need to make any modification there?

MetaInformation is defined as follows

[DataContract]
    public struct MetaInformation
    {
        [DataMember]
        public string Author { get; set; }
        [DataMember]
        public string tags { get; set; }
        [DataMember]
        public string categories { get; set; }
        [DataMember]
        public string description { get; set; }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T00:28:57+00:00Added an answer on June 16, 2026 at 12:28 am

    try this


    public interface ISelfService{

        [OperationContract]
        [WebInvoke(Method = "POST", UriTemplate = "/ack?errorcode={errorcode}&uniquefileid={uniquefileid}")]
        void Ack(ErrorCode errorcode, string uniquefileid);
    
        [OperationContract]
        [WebInvoke(Method = "POST", UriTemplate = "/filechanged")]
        void FileChanged(MetaInformation metainfo);}
    

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Visual Studio 2010 when creating a wcf service the template creates a class
I have a self-hosted WCF service and I'm having the following problem: 15 minutes
I am creating a WCF web service using wsHttpBinding and a corresponding application that
I am creating a WCF Data Service using the WCF Data Services Toolkit and
I am currently creating a WCF service application using Visual studio 2010. Is it
I'm creating a WCF service (.NET 4.0/c#)... I added a new class to the
I am creating a WCF Service with a method [OperationContract] [WebGet(UriTemplate = acl/f={fullFileName})] string
I have a WCF service being hosted over https with a self-signed certificate. I'm
I'm Creating a WCF Web Service and mapping my domain model using Fluent Nhibernate
I'm creating a WCF service using Visual Web Developer Express 2010. I'd like to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.