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

  • Home
  • SEARCH
  • 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 8054011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T08:02:25+00:00 2026-06-05T08:02:25+00:00

I have implemented a WCD Data Services / OData server, with an entity set

  • 0

I have implemented a WCD Data Services / OData server, with an entity set as an open type. I am using custom IMetadataProvider, IQueryProvider, etc. I can create my entity, set open properties, retrieve them, update, and search — mostly. The problem comes when I attempt to search for a property with something like a “dash” in the name

This works:

GET /Service/Cases?$filter=ABC eq 'ABC'

This doesn’t work:

GET /Service/Cases?$filter=A-BC eq 'ABC'

This also doesn’t work:

GET /Service/Cases?$filter=A%2DBC eq 'ABC'

I get the following error:

<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
  <code />
  <message xml:lang="en-US">Syntax error at position 7.</message>
</error>

(And as I said, I am able to get an entity with an open property with a dash in the name. And update it, etc.)

I would guess that whatever is parsing the URL is interpreting the dash as a subtraction expression, which makes sense. Except that if I read the OData spec correctly, an entity’s property name is defined by entitySimpleProperty (which isn’t defined in the spec, but I presume is a typo for entityProperty)… which is defined as *pchar, as defined in RFC 3986 section 3.3. That, in turn, evaluates to…

pchar       = unreserved / pct-encoded / sub-delims / ":" / "@"
unreserved  = ALPHA / DIGIT / "-" / "." / "_" / "~"
pct-encoded = "%" HEXDIG HEXDIG
sub-delims  = "!" / "$" / "&" / "'" / "(" / ")"
                  / "*" / "+" / "," / ";" / "="

Where ALPHA is %41-%5A and %61-%7A, DIGIT is %30-%39, hyphen is %2D, period is %2E, underscore is %5F, and tilde is %7E.

And that shows that a dash is a legal character, coming full circle. Not that I need it to be. So, what part of the spec dictates what the allowable characters are?

Thanks for any help!

  • 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-05T08:02:26+00:00Added an answer on June 5, 2026 at 8:02 am

    A property must be valid as per CSDL (EDM) rules. That allows any valid identifier as defined for example by this piece of XSD:

      <xs:simpleType name="TSimpleIdentifier">
        <xs:restriction base="xs:string">
          <xs:maxLength value="480" />
          <!-- The below pattern represents the allowed identifiers in ECMA specification -->
          <xs:pattern value="[\p{L}\p{Nl}][\p{L}\p{Nl}\p{Nd}\p{Mn}\p{Mc}\p{Pc}\p{Cf}]{0,}" />
        </xs:restriction>
      </xs:simpleType>
    

    It’s basically any valid programming language identifier. The OData spec might be a bit confusing (or maybe even wrong) on this unfortunately.

    Note that WCF DS doesn’t validate this in most cases since the validation check would be way too expensive. It relies on the IDataServiceMetadataProvider implementation to do the right thing. That’s why you see it working in some cases and in some it doesn’t.

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

Sidebar

Related Questions

I have implemented ntlmv2 for lync-server login in an custom made lync client.The message
I have implemented a Single Sign on function using Janrain. It outputs this data
I have implemented web service using rails server. The server uses rails default authentication
I have implemented a DAL using Rob Conery's spin on the repository pattern (from
I have implemented a custom ActionMapper which obtains the locale from the URI (the
I have implemented SQL Server session mode for an asp.net application. <sessionState mode=SQLServer compressionEnabled=true
I have implemented a custom movie player with AVPlayer . On setting the value
I have implemented custom validation for my JSP forms and when there are errors
I have implemented changing the brightness of an image using uislider in iPhone without
I have implemented a jquery ui autocomplete with data from database. Right now what

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.