locked
IDataServiceStreamProvider2, GetReadStreamUri RRS feed

  • Question

  • Hi,

    After discovering that MLE wouldnt work with the project im working on (retrieved stream or stream URI no problem  but errored when trying to saving/persisting a new entities), the solution was to implement a named resource stream as per... http://blogs.msdn.com/b/astoriateam/archive/2010/11/12/named-resource-streams.aspx

    The only issue now is the GetReadStreamUri method, IStreamDataServiceProvider2 was implemented in the same way it was when implementing IStreamDataServiceProvider, with the GetReadStreamUri set as per the blog 'GetReadStreamUri – we return null to let the data service provide the default URI for the MR'. 

    Previously at run time the URI for the stream would be returned. Now however altho the stream is accessible, the method does not return the uri.

    The other odd behaviour I've found when debugging, is when the entity is accessed via the browser then the method is called in the class implementing IStreamDataServiceProvider2 and I can step thru it, however when called via the proxy in the domain.client solution, it does not step thru the code implementing the inteface in the domain.server solution.

    I have found a work around, building a uri from the id and appending the resource name which allows access to the stream, but i would prefer this to be server side not client side, and if possible not need the work around to build the uri.

    thanks

    J

    Tuesday, July 24, 2012 4:23 PM