SilverlightShow: WCF RIA Services Part 10 - Exposing Domain Services To Other Clients Comments http://www.silverlightshow.net/ Silverlight articles, Silverlight tutorials, Silverlight videos, Silverlight samples SilverlightShow.net http://www.rssboard.org/rss-specification Argotic Syndication Framework 2008.0.2.0, http://www.codeplex.com/Argotic en-US estoychev@completit.com (Emil Stoychev) Re: WCF RIA Services Part 10 - Exposing Domain Services To Other Clients <p>For your scenario, I think you need to add the Composition attribute I talked about in part 5 to treat the tasks as child objects that are "contained" by the Customer. Either that or you need to expose a query method for Tasks. Client side will not generate entities unless there is a top level query method for that entity type or it is part of a Composition property on another entity.</p> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx#comment9116 brian.noyes http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx Tue, 26 Mar 2013 14:16:55 GMT Re: WCF RIA Services Part 10 - Exposing Domain Services To Other Clients <p>Hi Brian,</p> <p>Your post is very useful.... Thanks for this nice post... Now I have a little bit Complex Business Object where two objects have a relation between them. Like, Customer object holds a list of Task object (TaskList). Association and Composition is present there. Which means A Customer may have 0 or more Tasks but without Customer there is not Task. Now when I use WCF Ria Soap Service in Client I only get the Customer Object but the property TaskList as declared in Customer Object does not exist. I don't know why..? I think the previous pot from Mirrow faced the same scenario. How can I expose this property in Customer object? Thank you for any help........</p> <p>  Deepto</p> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx#comment9110 deepto.it http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx Tue, 26 Mar 2013 07:42:50 GMT Re: WCF RIA Services Part 10 - Exposing Domain Services To Other Clients <p>Hi Brian,<br /> I receive only the basic data types, any complex type like the Customer on the Task class is not available at the client side. Is there any solution to get these types send over the wire?</p> <p>Mirrow</p> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx#comment7823 Mirrow http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx Tue, 10 Apr 2012 11:38:41 GMT Re: WCF RIA Services Part 10 - Exposing Domain Services To Other Clients <p>Hi Mark,</p> <p>No, the pseudo-svc file address they create would probably not be securable with web.config alone since ASP.NET won't see it as a file - it just lets the RIA Services HTTP Module handle the request.</p> <p>As far as the separate sites goes, that is definitely the problem - secure session cookies can't cross domains. So the only way it would work is if you host your RIA domain services in the same site as your CAS auth services. If you do that, you will have to use the overloaded constructor on the DomainContext class that takes a Uri so that you can point it to the other site because the default behavior is to assume the RIA Services are exposed from the hosting site for the Silverlight app.</p> <p>Brian</p> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx#comment7643 brian.noyes http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx Thu, 08 Mar 2012 15:03:32 GMT Re: WCF RIA Services Part 10 - Exposing Domain Services To Other Clients <p>Brian - thanks for your answers</p> <p>Re: my first question, I can surely do as you suggest, but a better question would have been is the svc that the soap endpoint exposes securable with the web.config file as a normal file would be?  It's hard to know since their is no svc file per-se, just the underlying domainservice.cs file  </p> <p>As to the authentication question, I have two sites, both hosted in Azure:  </p> <p>1) Silverlight web host which authenticates against an aspnetdb hosted in SQL Azure<br /> 2) CAS web site which authenticates against the same aspnetdb.   </p> <p>I suspect my problem may be that these two are in separate sites.  I ran into problems combining the sites because the SL site is .Net4 based, but I could only get the CAS site to work properly as a .Net3.5 site.  When I targeted the CAS site to .Net4, none of the JSON entries for application services were added to the web.config file.  I also find it difficult in general to combine multiple web apps on the same virtual machine in Azure, mostly from a visual-studio publishing standpoint.  If you think hosting the SL app and the CAS app in the same web site will unify the authentication I'll pursue this further, and of course any pointers you have for doing so are appreciated!</p> <p>Thanks<br /> Mark</p> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx#comment7641 markaarnold http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx Thu, 08 Mar 2012 14:51:09 GMT Re: WCF RIA Services Part 10 - Exposing Domain Services To Other Clients <p>Brian - thanks for your answers</p> <p>Re: my first question, I can surely do as you suggest, but a better question would have been is the svc that the soap endpoint exposes securable with the web.config file as a normal file would be?  It's hard to know since their is no svc file per-se, just the underlying domainservice.cs file  </p> <p>As to the authentication question, I have two sites, both hosted in Azure:  </p> <p>1) Silverlight web host which authenticates against an aspnetdb hosted in SQL Azure<br /> 2) CAS web site which authenticates against the same aspnetdb.   </p> <p>I suspect my problem may be that these two are in separate sites.  I ran into problems combining the sites because the SL site is .Net4 based, but I could only get the CAS site to work properly as a .Net3.5 site.  When I targeted the CAS site to .Net4, none of the JSON entries for application services were added to the web.config file.  I also find it difficult in general to combine multiple web apps on the same virtual machine in Azure, mostly from a visual-studio publishing standpoint.  If you think hosting the SL app and the CAS app in the same web site will unify the authentication I'll pursue this further, and of course any pointers you have for doing so are appreciated!</p> <p>Thanks<br /> Mark</p> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx#comment7640 markaarnold http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx Thu, 08 Mar 2012 14:20:36 GMT Re: WCF RIA Services Part 10 - Exposing Domain Services To Other Clients <p>Hi Mark,</p> <p>For debugging you can just remove the Deny users=? and leave off the RequiresAuthentication attribute. But it depends on what other dependencies on identity you have in your service and client side to say whether that will really work for you.</p> <p>I'm not clear on your second part - are you saying you also have a WPF client that will be consuming the domain service? To do that you would want to set up the ASP.NET Authentication Service that is part of the framework (see links for "Client Application Services"). It uses the same ASP.NET cookies for auth that RIA Services does, so should be able to hit that, establish the secure session and then hit the domain service as long as they are on the same site. Haven't tried this, you would have to lift the cookie that gets returned somehow and then associate it with the domain service call. Not sure where to point you for that. </p> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx#comment7636 brian.noyes http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx Wed, 07 Mar 2012 17:43:11 GMT Re: WCF RIA Services Part 10 - Exposing Domain Services To Other Clients <p>Hi Brian - thanks for the article.  I've secured my Silverlight app by setting deny users=? in the hosting site's web.config.   Not surprisingly I can see in Fiddler that calling the new soap endpoint sends the login page back to the caller (WPF app).  I have two questions about this:</p> <p>First - how can I modify web.config to easily allow anonymous access just for testing?  I tried excluding the domainservice.cs file as well as the project-web-service.svc file but no luck.<br /> <br /> Second - how do you recommend the client authenticate to the service?  My WPF client will have already to the same aspnetdb used behind the Silverlight app and soap service - I'm hoping I can tap into a cookie etc and pass it along with the service call.</p> <p>Thanks as always!<br /> Mark</p> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx#comment7635 markaarnold http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx Wed, 07 Mar 2012 16:49:41 GMT Re: WCF RIA Services Part 10 - Exposing Domain Services To Other Clients thanks for your information ,,, <a href="http://www.sanggarseo.web.id/">karanganyar online</a> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx#comment7611 rohmansah http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx Sun, 04 Mar 2012 08:48:48 GMT Re: WCF RIA Services Part 10 - Exposing Domain Services To Other Clients <p>RynoB,</p> <p>Sorry, but I can't think what it would be off the top of my head, looks like you are doing the exact same thing as I have done but for some reason it is not recognizing that type for the changeset. The only thing I can think is to really inspect the type being returned from your first line of code - the problem with the var keyword is you don't really know what you are working with. See if it matches the type it is complaining about, and if not, try to figure out what you are really getting back.</p> <p>Otherwise, I'd say you would have to take it up on the forums at <a href="http://forums.silverlight.net/53.aspx">http://forums.silverlight.net/53.aspx</a></p> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx#comment7222 brian.noyes http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx Wed, 16 Nov 2011 15:45:33 GMT Re: WCF RIA Services Part 10 - Exposing Domain Services To Other Clients <p>Hi Brain,</p> <p>I'm using the SOAP endpoint</p> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx#comment7214 RynoB http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx Tue, 15 Nov 2011 16:34:38 GMT Re: WCF RIA Services Part 10 - Exposing Domain Services To Other Clients <p>Hi RynoB,</p> <p>Could you clarify - Are you using the SOAP endpoint or the JSON one?</p> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx#comment7212 brian.noyes http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx Tue, 15 Nov 2011 16:04:25 GMT Re: WCF RIA Services Part 10 - Exposing Domain Services To Other Clients <p>Hi,</p> <p>I hope someone is still paying attention to the comments because I really need some clarity on a issue. I have taken the approach Brain showed and is currently consuming my Domain Service from a ASP.NET client.</p> <p>I'm running into issues as soon as I'm trying to submit the changeset back to the service using the following:<br /> <br /> </p> <div class="reCodeBlock" style="border: 1px solid #7f9db9; overflow-y: auto;"> <div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #000000;">var paymentInstruction = proxy.GetPaymentInstructionsById(paymentInstructionId).RootResults.SingleOrDefault();</code></span></div> <div style="background-color: #f8f8f8;"><span style="margin-left: 0px !important;"> </span></div> <div style="background-color: #ffffff;"><span><code>                    </code><span style="margin-left: 60px !important;"><code style="color: #000000;">paymentInstruction.TLPaymentStatusId = (</code><code style="color: #006699; font-weight: bold;">int</code><code style="color: #000000;">) PaymentStatus.Processed;</code></span></span></div> <div style="background-color: #f8f8f8;"><span style="margin-left: 0px !important;"> </span></div> <div style="background-color: #ffffff;"><span><code>                    </code><span style="margin-left: 60px !important;"><code style="color: #000000;">var changeEntry = </code><code style="color: #006699; font-weight: bold;">new</code> <code style="color: #000000;">ChangeSetEntry</code></span></span></div> <div style="background-color: #f8f8f8;"><span><code>                                          </code><span style="margin-left: 126px !important;"><code style="color: #000000;">{</code></span></span></div> <div style="background-color: #ffffff;"><span><code>                                              </code><span style="margin-left: 138px !important;"><code style="color: #000000;">Entity = paymentInstruction,</code></span></span></div> <div style="background-color: #f8f8f8;"><span><code>                                              </code><span style="margin-left: 138px !important;"><code style="color: #000000;">Operation = DomainOperation.Update</code></span></span></div> <div style="background-color: #ffffff;"><span><code>                                          </code><span style="margin-left: 126px !important;"><code style="color: #000000;">};</code></span></span></div> <div style="background-color: #f8f8f8;"><span style="margin-left: 0px !important;"> </span></div> <div style="background-color: #ffffff;"><span><code>                    </code><span style="margin-left: 60px !important;"><code style="color: #000000;">proxy.SubmitChanges(</code><code style="color: #006699; font-weight: bold;">new</code> <code style="color: #000000;">ChangeSetEntry[] {changeEntry}); </code><code style="color: #008200;">//This line here causing the System.Runtime.Serialization.SerializationException exception message</code></span></span></div> <div style="background-color: #f8f8f8;"><span style="margin-left: 0px !important;"> </span></div> <p style="background-color: #ffffff;"><span><code>                    </code><span style="margin-left: 60px !important;"><code style="color: #000000;">proxy.Close();</code></span></span></p> <p style="background-color: #ffffff;"> </p> </div> <p> As soon as I hit:</p> <pre style="background: white; color: black; font-family: consolas;">proxy.SubmitChanges(<span style="color: blue;">new</span> <span style="color: #2b91af;">ChangeSetEntry</span>[] {changeEntry}); </pre> <p>the I get the following exception:</p> <p><strong>Type 'Proj.Web.CDSDomainService.PaymentInstruction' with data contract name 'PaymentInstruction:http://schemas.datacontract.org/2004/07/Proj.Domain.Entities' is not expected. Consider using a DataContractResolver or add any types not known statically to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding them to the list of known types passed to DataContractSerializer.</strong> </p> <p>I've taken pretty much exactly every exact same step in this post and did nothing different.</p> <p>One thing I did noticed was that my generated proxy code did not have any QueryResultOfXXX objects as shown in the example code using SOAP.</p> <p>I would really appreciate any help.</p> <p>Thanks</p> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx#comment7206 RynoB http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx Tue, 15 Nov 2011 06:46:10 GMT Re: WCF RIA Services Part 10 - Exposing Domain Services To Other Clients <p>Hi,</p> <p>I hope someone is still paying attention to the comments because I really need some clarity on a issue. I have taken the approach Brain showed and is currently consuming my Domain Service from a ASP.NET client.</p> <p>I'm running into issues as soon as I'm trying to submit the changeset back to the service using the following:<br /> <br /> </p> <div class="reCodeBlock" style="border: 1px solid #7f9db9; overflow-y: auto;"> <div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"><code style="color: #000000;">var paymentInstruction = proxy.GetPaymentInstructionsById(paymentInstructionId).RootResults.SingleOrDefault();</code></span></div> <div style="background-color: #f8f8f8;"><span style="margin-left: 0px !important;"> </span></div> <div style="background-color: #ffffff;"><span><code>                    </code><span style="margin-left: 60px !important;"><code style="color: #000000;">paymentInstruction.TLPaymentStatusId = (</code><code style="color: #006699; font-weight: bold;">int</code><code style="color: #000000;">) PaymentStatus.Processed;</code></span></span></div> <div style="background-color: #f8f8f8;"><span style="margin-left: 0px !important;"> </span></div> <div style="background-color: #ffffff;"><span><code>                    </code><span style="margin-left: 60px !important;"><code style="color: #000000;">var changeEntry = </code><code style="color: #006699; font-weight: bold;">new</code> <code style="color: #000000;">ChangeSetEntry</code></span></span></div> <div style="background-color: #f8f8f8;"><span><code>                                          </code><span style="margin-left: 126px !important;"><code style="color: #000000;">{</code></span></span></div> <div style="background-color: #ffffff;"><span><code>                                              </code><span style="margin-left: 138px !important;"><code style="color: #000000;">Entity = paymentInstruction,</code></span></span></div> <div style="background-color: #f8f8f8;"><span><code>                                              </code><span style="margin-left: 138px !important;"><code style="color: #000000;">Operation = DomainOperation.Update</code></span></span></div> <div style="background-color: #ffffff;"><span><code>                                          </code><span style="margin-left: 126px !important;"><code style="color: #000000;">};</code></span></span></div> <div style="background-color: #f8f8f8;"><span style="margin-left: 0px !important;"> </span></div> <div style="background-color: #ffffff;"><span><code>                    </code><span style="margin-left: 60px !important;"><code style="color: #000000;">proxy.SubmitChanges(</code><code style="color: #006699; font-weight: bold;">new</code> <code style="color: #000000;">ChangeSetEntry[] {changeEntry}); </code><code style="color: #008200;">//This line here causing the System.Runtime.Serialization.SerializationException exception message</code></span></span></div> <div style="background-color: #f8f8f8;"><span style="margin-left: 0px !important;"> </span></div> <p style="background-color: #ffffff;"><span><code>                    </code><span style="margin-left: 60px !important;"><code style="color: #000000;">proxy.Close();</code></span></span></p> <p style="background-color: #ffffff;"> </p> </div> <p> As soon as I hit:</p> <pre style="background: white; color: black; font-family: consolas;">proxy.SubmitChanges(<span style="color: blue;">new</span> <span style="color: #2b91af;">ChangeSetEntry</span>[] {changeEntry}); </pre> <p>the I get the following exception:</p> <p><strong>Type 'Proj.Web.CDSDomainService.PaymentInstruction' with data contract name 'PaymentInstruction:http://schemas.datacontract.org/2004/07/Proj.Domain.Entities' is not expected. Consider using a DataContractResolver or add any types not known statically to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding them to the list of known types passed to DataContractSerializer.</strong> </p> <p>I've taken pretty much exactly every exact same step in this post and did nothing different.</p> <p>One thing I did noticed was that my generated proxy code did not have any QueryResultOfXXX objects as shown in the example code using SOAP.</p> <p>I would really appreciate any help.</p> <p>Thanks</p> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx#comment7205 RynoB http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx Mon, 14 Nov 2011 15:07:24 GMT Re: WCF RIA Services Part 10 - Exposing Domain Services To Other Clients <p>Very nice article.</p> <p>Thanks a lottt.</p> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx#comment7169 prathibha http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx Mon, 07 Nov 2011 17:21:05 GMT RE: WCF RIA Services Part 10 - Exposing Domain Services To Other Clients <p>Jason, you are probably missing a reference to the RIA Services Toolkit server libraries in the web host.</p> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx#comment5980 Brian Noyes http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx Tue, 26 Apr 2011 15:01:48 GMT RE: WCF RIA Services Part 10 - Exposing Domain Services To Other Clients <p>I am sorry that I can not expose this interface into IIS in order to make other client invoke. Those likes WPF or Winform.</p> <p>I would list the warning as shown below:</p> <p> </p> <p>Warning 2 The element 'system.serviceModel' has invalid child element 'domainServices'. List of possible elements expected: 'behaviors, bindings, client, comContracts, commonBehaviors, diagnostics, serviceHostingEnvironment, extensions, protocolMapping, services, standardEndpoints, tracking, routing'. F:\Sample\WcfRiaServicesWPF\CSWcfRiaServicesWPF\TaskManager.Web\Web.config 35 6 TaskManager.Web<br> </br></p> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx#comment5976 Jason Wang http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx Tue, 26 Apr 2011 06:10:22 GMT RE: WCF RIA Services Part 10 - Exposing Domain Services To Other Clients Hi Cleyton, that is not something I can cover decently here in the comments. All I can do is promise to address it in a future webcast, article, or webcast. Take a look at Part 9 and my discussion about breaking up the RIA services libraries on the client side. That is where most of the overlap exists - in how you factor your Prism modules to set up the RIA Services linkages. Prism features include modularity, regions, commands, events, and navigation. None of which have any direct impact on the way RIA Services works or vice versa. The two complement each other nicely. RIA Services provides a great way to get data into your Prism application and facilitate displaying and editing data in the views. Prism provides the way to structure your libraries that support the application, plug their views into the main application, navigate between views, and communicate between them. Really no directly overlap in functionality other than RIA Service links to the server projects influences how you factor your assemblies, which again I discussed in general in Part 9, and which really has to be thought through on an application by application basis to decide what the right factoring is based on the deployment scenarios and use cases. http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx#comment5431 Brian Noyes http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx Fri, 04 Feb 2011 15:18:43 GMT RE: WCF RIA Services Part 10 - Exposing Domain Services To Other Clients <p>Hi Brian,</p> <p>Your first webcast was. Thanks very much for that.</p> <p>I am also starting to read your 10 articles on Silverlight and RIA Services.</p> <p>One thing that I <strong>cannot figure out is how to build a Silverlight + RIA Services + PRISM app</strong>. I would like to build a <strong>composite</strong> application using <strong>PRISM</strong> but I also would like to <strong>take advantage of RIA services features like proxy generation (client context), DomainService, etc..</strong></p> <p>To learn Prism I used a VS 2010 template provided by David Hill (Microsoft). It starts with a simple application with only two modules. However, the <strong>data is hard coded (DataItem, DataItems classes).<br /> </strong> <br /> 1 - I was wondering if you could show us <strong>how to use RIA Services instead of using the hard code data?</strong></p> <p>2 - Could you also please show us <strong>how to work with many to many relations with RIA  Services and EF?<br /> </strong> <br /> Cheers</p> <p>Cleyton</p> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx#comment5426 Cleyton http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx Fri, 04 Feb 2011 02:11:15 GMT RE: WCF RIA Services Part 10 - Exposing Domain Services To Other Clients <p> The most comprehensive article I've found on the subject so far, though I had to find out the hard way what the limitations are (and they indeed make RIA Services OData almost useless).</p> <p>One thing I missed though was this, which I quote from <a href="http://blogs.msdn.com/b/brada/archive/2010/03/16/silverlight-4-ria-services-ready-for-business-exposing-odata-services.aspx" class="at_item">Brad Abrams</a>: </p> <p style="background: white; mso-line-height-alt: 5.85pt;"><span lang="EN" style="font-family: 'segoe ui','sans-serif'; color: #333333; font-size: 9pt; mso-ansi-language: en;">The format of the URL is the namespace+typename for the domainservice with dots replaced by dashs followed by “.svc/Odata/”.  So if the DomainService class is </span><span lang="EN" style="line-height: 115%; font-family: 'segoe ui','sans-serif'; color: #333333; font-size: 9pt; mso-ansi-language: en; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: en-us; mso-bidi-language: ar-sa;">MyApp.Web.DishViewDomainService then the URL would be <a href="http://localhost:30045/myapp-web-DishViewDomainService.svc/OData/" title="http://localhost:30045/myapp-web-DishViewDomainService.svc/OData/"><span style="color: #0066dd;">http://localhost:30045/myapp-web-DishViewDomainService.svc/OData/</span></a></span></p> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx#comment5313 PerH http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx Fri, 14 Jan 2011 00:32:23 GMT RE: WCF RIA Services Part 10 - Exposing Domain Services To Other Clients <p>Hi,</p> <p> </p> <p>This is very nice article . I hope to use the OData end points in my applications.</p> <p> Thanks,</p> <p>Thani</p> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx#comment5276 Thanigainathan http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx Sun, 09 Jan 2011 17:41:31 GMT RE: WCF RIA Services Part 10 - Exposing Domain Services To Other Clients <p>Hi Brian,</p> <p>Nice Series, I was in you WPF master class in Belgium last year.</p> <p>Currently I am struggling with a project where I want to reuse the Ria Services of a silverlight app in a WP7 app.</p> <p>Since Consuming an OData service is the only built in support for WP7 at this moment, I exposed my Ria Service as an OData endpoint. All works fine except. When consuming a plain old WCF Data Service the entity references are created into the model I generated with the DataSvcUtil. But this is not the case when I consume a WCF Ria Service that was exposed as a OData Endpoint.</p> <p>Any Ideas? Or suggestions on Reusing existing WCF Ria Services on a WP7 app without losing entity references.</p> <p>Thx in advance.</p> <p> </p> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx#comment5270 Stijn Liesenborghs http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx Sat, 08 Jan 2011 11:20:35 GMT RE: WCF RIA Services Part 10 - Exposing Domain Services To Other Clients @David: thank you so much! http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx#comment5258 hngdoan http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx Fri, 07 Jan 2011 06:39:31 GMT RE: WCF RIA Services Part 10 - Exposing Domain Services To Other Clients <p>I think it is not good to expose some of the domain services to your clients.</p> <p>Regards,</p> <p><a href="http://bizworx.org/blog/">Lean Blog</a></p> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx#comment5253 angelika http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx Fri, 07 Jan 2011 06:16:49 GMT RE: WCF RIA Services Part 10 - Exposing Domain Services To Other Clients <p>@ hngdoan - Thanks, will look into getting that fixed.</p> <p>David - How on earth did I miss your articles when I was putting mine together? I would have definitely linked to it. Your part on consuming in HTML 5 rocks.</p> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx#comment5229 Brian Noyes http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx Wed, 05 Jan 2011 01:15:54 GMT RE: WCF RIA Services Part 10 - Exposing Domain Services To Other Clients <p>Sorry, here is the proper link : <a href="http://blogs.msdn.com/b/davrous/archive/2010/12/14/how-to-open-a-wcf-ria-services-application-to-other-type-of-clients-the-json-endpoint-4-5.aspx">How to open a WCF RIA Services application to other type of clients: the JSON endpoint (4/5)</a></p> <p>Regards,</p> <p>David</p> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx#comment5227 David Rousset http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx Tue, 04 Jan 2011 14:06:52 GMT RE: WCF RIA Services Part 10 - Exposing Domain Services To Other Clients <p>Hi,</p> <p> Very good article indeed!</p> <p> @hngdoan: I've posted an article on how to consume the JSON endpoint from a non .NET client (HTML5/jQuery) here : http://blogs.msdn.com/b/davrous/archive/2010/12/14/how-to-open-a-wcf-ria-services-application-to-other-type-of-clients-the-json-endpoint-4-5.aspx </p> <p> It's part of my 5 articles series on how to open RIA Services to other type of clients.</p> <p>Bye,</p> <p>David Rousset</p> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx#comment5226 David Rousset http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx Tue, 04 Jan 2011 14:05:01 GMT RE: WCF RIA Services Part 10 - Exposing Domain Services To Other Clients <p>Very good article!</p> <p>There is a duplicate of heading "Consuming the SOAP Endpoint From a .NET Client". It's "Consuming the OData Endpoint from .NET Client".</p> <p>And how to consuming service from not .NET client?</p> http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx#comment5223 hngdoan http://www.silverlightshow.net/items/WCF-RIA-Services-Part-10-Exposing-Domain-Services-To-Other-Clients.aspx Tue, 04 Jan 2011 07:00:31 GMT