locked
Issues using with a primary key containing '/' RRS feed

  • Question

  • I'm using ado.net data services to access data from another site that uses ado.net entity data model. The problem is that for some of the objects that have a string property called code as the primary key contain the character '/'. As a result loading the linked properties fail and if I were to load a single object by passing its code into the query. Does anyone know how I can escape the problematic character? Changing to the primary key to an autoincrementing id is going to be a lot of work now that the primary site is complete.

    Tuesday, October 28, 2008 9:52 PM

Answers

  • This is a known issue. The problem is that even if we escape the key value while creating the uri, the uri class unescapes the value and hence when the client sends the uri to the server on the wire, it has '/' character in the uri, instead of having the escaped value (%2F) for it.

     

    We are working with the System.Uri team to see if this is something that they can fix this in the future release.

     

    Thanks

    Pratik

    Tuesday, November 4, 2008 5:11 PM
    Moderator

All replies

  • This is a known issue. The problem is that even if we escape the key value while creating the uri, the uri class unescapes the value and hence when the client sends the uri to the server on the wire, it has '/' character in the uri, instead of having the escaped value (%2F) for it.

     

    We are working with the System.Uri team to see if this is something that they can fix this in the future release.

     

    Thanks

    Pratik

    Tuesday, November 4, 2008 5:11 PM
    Moderator
  • Thanks for letting me know, much appreciated.
    Monday, November 17, 2008 5:41 AM