<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>RIA Services: A DomainService IS A WCF Service – Add Service Reference</title><link>http://blogs.msdn.com/b/brada/archive/2009/11/22/ria-services-a-domainservice-is-a-wcf-service-add-service-reference.aspx</link><description>I made the fairly bold statement at my PDC09 talk that a DomainService IS A WCF Service.&amp;#160; That is, everything you know about a WCF service should be true of a DomainService.&amp;#160; I didn’t have time to get into this in my talk, so I thought I’d hit</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: RIA Services: A DomainService IS A WCF Service – Add Service Reference</title><link>http://blogs.msdn.com/b/brada/archive/2009/11/22/ria-services-a-domainservice-is-a-wcf-service-add-service-reference.aspx#9966959</link><pubDate>Sun, 21 Feb 2010 04:33:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9966959</guid><dc:creator>Rodrigo A</dc:creator><description>&lt;p&gt;@Evan: I didn't find a nice solution for authenticating a client, but the code below works. Basically, you call Login on the AuthenticationService, store the cookie, and send this cookie whenever you need to.&lt;/p&gt;
&lt;p&gt;AuthenticationServiceClient context = new AuthenticationServiceClient(&amp;quot;BasicHttpBinding_AuthenticationService&amp;quot;);&lt;/p&gt;
&lt;p&gt;using (OperationContextScope operationContext = new OperationContextScope(context.InnerChannel))&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;QueryResult&amp;lt;User&amp;gt; result = context.Login(&amp;quot;testuser&amp;quot;, &amp;quot;testpassword!&amp;quot;, false, null);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;// Store cookie somewhere&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;HttpResponseMessageProperty response = (HttpResponseMessageProperty)OperationContext.Current.IncomingMessageProperties[HttpResponseMessageProperty.Name];&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;sharedCookie = response.Headers[&amp;quot;Set-Cookie&amp;quot;];&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;// Later&lt;/p&gt;
&lt;p&gt;OtherServiceClient context = new OtherServiceClient(&amp;quot;BasicHttpBinding_OtherService&amp;quot;);&lt;/p&gt;
&lt;p&gt;using (OperationContextScope operationContext = new OperationContextScope(context.InnerChannel))&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;// Add stored cookie&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;HttpRequestMessageProperty request = new HttpRequestMessageProperty();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;request.Headers[HttpRequestHeader.Cookie] = sharedCookie;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;OperationContext.Current.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = request;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;context.SomeOperationThatRequiresAuthentication();&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9966959" width="1" height="1"&gt;</description></item><item><title>re: RIA Services: A DomainService IS A WCF Service – Add Service Reference</title><link>http://blogs.msdn.com/b/brada/archive/2009/11/22/ria-services-a-domainservice-is-a-wcf-service-add-service-reference.aspx#9958671</link><pubDate>Fri, 05 Feb 2010 08:45:19 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9958671</guid><dc:creator>Aggelos Mpimpoudis</dc:creator><description>&lt;p&gt;How is possible to create references in ChangeSetEntries in order to submit a simple hierarchy like Report (1) -&amp;gt; ReportEntry (n), back to server?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9958671" width="1" height="1"&gt;</description></item><item><title>re: RIA Services: A DomainService IS A WCF Service – Add Service Reference</title><link>http://blogs.msdn.com/b/brada/archive/2009/11/22/ria-services-a-domainservice-is-a-wcf-service-add-service-reference.aspx#9956918</link><pubDate>Tue, 02 Feb 2010 12:57:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9956918</guid><dc:creator>Evan M</dc:creator><description>&lt;p&gt;Great article Brad. One quick question. When decorating the service with RequiresAuthentication, how do you authenticate a client?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Evan&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9956918" width="1" height="1"&gt;</description></item><item><title>re: RIA Services: A DomainService IS A WCF Service – Add Service Reference</title><link>http://blogs.msdn.com/b/brada/archive/2009/11/22/ria-services-a-domainservice-is-a-wcf-service-add-service-reference.aspx#9943297</link><pubDate>Mon, 04 Jan 2010 10:07:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9943297</guid><dc:creator>Pragati</dc:creator><description>&lt;p&gt;Hi rjacobs,&lt;/p&gt;
&lt;p&gt;Plz chk the link &amp;amp; the changes done by Konkani in crossdomain file &amp;nbsp;- &lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://forums.silverlight.net/forums/p/43293/313526.aspx"&gt;http://forums.silverlight.net/forums/p/43293/313526.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;My issue has got solved with this, hope the same for you.&lt;/p&gt;
&lt;p&gt;Pragati&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9943297" width="1" height="1"&gt;</description></item><item><title>re: RIA Services: A DomainService IS A WCF Service – Add Service Reference</title><link>http://blogs.msdn.com/b/brada/archive/2009/11/22/ria-services-a-domainservice-is-a-wcf-service-add-service-reference.aspx#9942675</link><pubDate>Thu, 31 Dec 2009 19:53:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9942675</guid><dc:creator>Paul P</dc:creator><description>&lt;p&gt;I'm getting that problem that results in this error:&lt;/p&gt;
&lt;p&gt;An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:&lt;/p&gt;
&lt;p&gt;System.NullReferenceException: Object reference not set to an instance of an object.&lt;/p&gt;
&lt;p&gt; &amp;nbsp; at System.ServiceModel.Description.ServiceMetadataBehavior.MetadataExtensionInitializer.GenerateMetadata()&lt;/p&gt;
&lt;p&gt;According to Google, I'm not the only one. &amp;nbsp;No one has posted what they've done to solve that though. &amp;nbsp;Any ideas?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9942675" width="1" height="1"&gt;</description></item><item><title>re: RIA Services: A DomainService IS A WCF Service – Add Service Reference</title><link>http://blogs.msdn.com/b/brada/archive/2009/11/22/ria-services-a-domainservice-is-a-wcf-service-add-service-reference.aspx#9942215</link><pubDate>Wed, 30 Dec 2009 09:43:35 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9942215</guid><dc:creator>Andréi TV</dc:creator><description>&lt;p&gt;Hi, &lt;/p&gt;
&lt;p&gt;Is there a way to host a domainService in a console app or a windows service ?&lt;/p&gt;
&lt;p&gt;I've been through all the web to find something about this topic.&lt;/p&gt;
&lt;p&gt;thank you.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9942215" width="1" height="1"&gt;</description></item><item><title>re: RIA Services: A DomainService IS A WCF Service – Add Service Reference</title><link>http://blogs.msdn.com/b/brada/archive/2009/11/22/ria-services-a-domainservice-is-a-wcf-service-add-service-reference.aspx#9942214</link><pubDate>Wed, 30 Dec 2009 09:43:24 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9942214</guid><dc:creator>Andréi TV</dc:creator><description>&lt;p&gt;Hi, &lt;/p&gt;
&lt;p&gt;Is there a way to host a domainService in a console app or a windows service. &lt;/p&gt;
&lt;p&gt;I've been through all the web to find something about this topic.&lt;/p&gt;
&lt;p&gt;thank you.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9942214" width="1" height="1"&gt;</description></item><item><title>re: RIA Services: A DomainService IS A WCF Service – Add Service Reference</title><link>http://blogs.msdn.com/b/brada/archive/2009/11/22/ria-services-a-domainservice-is-a-wcf-service-add-service-reference.aspx#9941508</link><pubDate>Mon, 28 Dec 2009 07:25:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9941508</guid><dc:creator>Pragati</dc:creator><description>&lt;p&gt;Hi rjacobs, please let me know the solution if you get any. My email id is - pragati.dukale@revalanalytics.com&lt;/p&gt;
&lt;p&gt;I'm still with the same problem for SL appln.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9941508" width="1" height="1"&gt;</description></item><item><title>re: RIA Services: A DomainService IS A WCF Service – Add Service Reference</title><link>http://blogs.msdn.com/b/brada/archive/2009/11/22/ria-services-a-domainservice-is-a-wcf-service-add-service-reference.aspx#9941136</link><pubDate>Fri, 25 Dec 2009 11:48:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9941136</guid><dc:creator>rjacobs</dc:creator><description>&lt;p&gt;I'm also running up against the same problem as pragati. &amp;nbsp;My situation requires mt tohhost the domain services in a completely seperate web site from the silverlight app. &amp;nbsp;When I try to add the domain service as a service reference to the silverlight app, I get the above mentioned errors. &amp;nbsp;The domain service work fine in a traditional asp page amd wcf service when added as a service reference.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9941136" width="1" height="1"&gt;</description></item><item><title>re: RIA Services: A DomainService IS A WCF Service – Add Service Reference</title><link>http://blogs.msdn.com/b/brada/archive/2009/11/22/ria-services-a-domainservice-is-a-wcf-service-add-service-reference.aspx#9940530</link><pubDate>Wed, 23 Dec 2009 14:22:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9940530</guid><dc:creator>Pragati</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I've done the same way as per blog. But, I used the service asynchonously like - &lt;/p&gt;
&lt;p&gt;private CustDomainService.CustDomainServiceClient objClient = new prjTestRIAservice.CustDomainService.CustDomainServiceClient(&amp;quot;BasicHttpBinding_CustDomainService&amp;quot;); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public MainPage()&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;InitializeComponent(); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;objClient.GetCustomersAsync();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;objClient.GetCustomersCompleted += new EventHandler&amp;lt;prjTestRIAservice.CustDomainService.GetCustomersCompletedEventArgs&amp;gt;(objClient_GetCustomersCompleted);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;void objClient_GetCustomersCompleted(object sender, prjTestRIAservice.CustDomainService.GetCustomersCompletedEventArgs e)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var lstdata = e.Result;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;grdTest.ItemsSource = lstdata.RootResults;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt;*******************************************&lt;/p&gt;
&lt;p&gt;I'm getting error like - &lt;/p&gt;
&lt;p&gt;'prjTestRIAservice.CustDomainService.QueryResultOfCustomers' does not implement inherited abstract member 'System.Windows.Ria.Services.QueryResult.GetIncludedResults()'&lt;/p&gt;
&lt;p&gt;and&lt;/p&gt;
&lt;p&gt;'prjTestRIAservice.CustDomainService.QueryResultOfCustomers' does not implement inherited abstract member 'System.Windows.Ria.Services.QueryResult.GetRootResults()'&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9940530" width="1" height="1"&gt;</description></item></channel></rss>