<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Saurabh Pant's Weblog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/saurabh/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/saurabh/feed.xml</link>
    <description>Ramblings on .NET ...</description>
    <lastBuildDate>Tue, 16 Apr 2019 05:50:02 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Dev Connections 2014</title>
      <link>https://docs.microsoft.com/archive/blogs/saurabh/dev-connections-2014</link>
      <pubDate>Tue, 16 Sep 2014 21:29:58 GMT</pubDate>
      <dc:creator><![CDATA[Saurabh]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/saurabh/2014/09/16/dev-connections-2014/</guid>
      <description><![CDATA[I must have done something right at DevConnections 2013 last year, that they have invited me back...]]></description>
      <content:encoded><![CDATA[<p>I must have done something right at DevConnections 2013 last year, that they have invited me back for Dev Connections 2014.</p>
<p>I will be presenting two sessions -</p>
<p><strong>Microsoft Azure Offerings for Web Developers</strong><br />This session will focus on what Microsoft Azure offers to web developers. We'll focus on Azure website capabilities, including how Azure makes it easy to build scalable, real-world web applications. We'll also touch on Azure Web Role and Azure virtual machine capabilities. Last, we'll talk about helper services that provide a compelling platform for web apps on Azure, such as Azure Cache, Traffic Manager, Content Delivery Network, and Active Directory. This introductory session will cover the breadth of Azure offerings.</p>
<p><strong>Microsoft Azure Redis Cache</strong><br />Microsoft Azure Redis Cache is a dedicated cache service based on the open-source Redis Cache engine. In this session we'll introduce users to Redis and the features it offers. We'll discuss the architecture of the Azure Redis Cache service and delve into the capabilities it offers in addition to basic Redis hosting. We'll also review end-to-end real-world scenarios leveraging Redis Cache in conjunction with other Azure services.</p>
<p>Looking forward to it.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>TechEd North America 2014</title>
      <link>https://docs.microsoft.com/archive/blogs/saurabh/teched-north-america-2014</link>
      <pubDate>Wed, 14 May 2014 13:16:00 GMT</pubDate>
      <dc:creator><![CDATA[Saurabh]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/saurabh/2014/05/14/teched-north-america-2014/</guid>
      <description><![CDATA[Introduction to Windows Azure Redis Cache
Microsoft Azure Redis Cache is a secure, dedicated cache...]]></description>
      <content:encoded><![CDATA[<p><strong>Introduction to Windows Azure Redis Cache</strong></p>
<p style="text-align: left;">Microsoft Azure Redis Cache is a secure, dedicated cache service from Microsoft, based on the OSS Redis Cache engine. In this session we will firstly introduce users to Redis and the features it offers. Next we will talk about the architecture of the Azure Redis Cache Service and dwell into the capabilities that it offers in addition to basic Redis hosting. Lastly, we will review end to end real world scenarios leveraging Redis Cache in conjunction with other Azure services.</p>
<p style="text-align: left;"><strong>Learn How to Easily Move Your ASP.NET Application to the Cloud with Microsoft Azure</strong></p>
<p>You&rsquo;ve got lots of ASP.NET applications running in-house or at a host, but when it comes time to move those apps to the cloud, there are some architectural things to consider to ensure your app scales. Join us for this practical walkthrough that covers all the things you need to know to scale your existing ASP.NET app to the cloud.</p>
<p>For those not at the conference, I believe video recordings of the talks will be available online.</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Deploying Application built using RIA Services RC</title>
      <link>https://docs.microsoft.com/archive/blogs/saurabh/deploying-application-built-using-ria-services-rc</link>
      <pubDate>Tue, 16 Mar 2010 00:24:00 GMT</pubDate>
      <dc:creator><![CDATA[Saurabh]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/saurabh/2010/03/16/deploying-application-built-using-ria-services-rc/</guid>
      <description><![CDATA[Update :: The official WCF RIA Services troubleshooting guide can now be found...]]></description>
      <content:encoded><![CDATA[<p>Update :: The official WCF RIA Services troubleshooting guide can now be found <a href="https://mail.microsoft.com/owa/redir.aspx?C=534645f3e3824180a5d757c880e35929&amp;URL=http%3a%2f%2fmsdn.microsoft.com%2fen-us%2flibrary%2fff426913(v%3dVS.91).aspx" target="_blank">here</a>.</p>
<p>&nbsp;</p>
<p>Original Post::</p>
<p>Today at MIX &lsquo;10 we <a href="https://blogs.msdn.com/brada/archive/2010/03/15/silverlight-4-and-ria-services-release-candidate-available-now.aspx" target="_blank" mce_href="https://blogs.msdn.com/brada/archive/2010/03/15/silverlight-4-and-ria-services-release-candidate-available-now.aspx">announced</a> the public availability of WCF RIA Services RC bits.</p>
<p>A few months back, at PDC &lsquo;09 when we released our Beta bits we received strong feedback around making deployment of RIA Services applications easier and asking for more guidance around deployment scenarios.</p>
<p>With our latest RC bits we believe that we now do have an intuitive deployment story and I cover it in some depth in the blog post below.</p>
<p>In this blog I talk about Deployment Scenarios for RIA Services RC bits that <a href="https://forums.silverlight.net/forums/t/167013.aspx" target="_blank" mce_href="https://forums.silverlight.net/forums/t/167013.aspx">only support Dev 10/.NET 4/SL 4</a>.</p>
<p>I do realize a set of folks are still consuming RIA Services Beta bits that only support VS 2008/.NET 3.5/SL 3, primarily because those are &lsquo;Go Live&rsquo; bits. For those folks I will be posting a separate blog soon focusing primarily on deployment using the Beta bits.</p>
<p></p>
<p><strong><span style="font-size: small;" size="3"></span></strong>&nbsp;</p>
<p><strong><span style="font-size: small;" size="3">Configuring the Deployment Server</span></strong></p>
<p>You have your application ready and it works great on your development machine. Now you want to deploy it to a server and share the awesomeness &hellip;</p>
<p>The first thing you will need is a server with .NET 4 RC installed. If the server has RIA services installed as well, even better.</p>
<p><span style="font-size: x-small;" size="2">Shared Hosters</span>:&nbsp;</p>
<p>We have worked with our partner hosters and have the following hosters supporting both .NET 4 RC and RIA Services RC today &hellip;</p>
<ul>
<li><a href="https://labs.discountasp.net/" target="_blank" mce_href="https://labs.discountasp.net/">DiscountASP</a></li>
<li><a href="https://vs2010host.com/" target="_blank" mce_href="https://vs2010host.com/">OrcsWeb</a></li>
<li><span style="font-size: x-small;" size="2"><a href="https://www.asphostcentral.com/" mce_href="https://www.asphostcentral.com/">ASPHostCentral</a></span><span style="font-size: x-small;" size="2">&nbsp;</span></li>
</ul>
<p><span style="font-size: x-small;" size="2">NOTE - ASPHostCentral has a set of some blog posts here [<a href="https://webhosting.asphostcentral.com/post/2010/03/02/WCF-RIA-Service-Hosting-WCF-RIA-Service-Configuration-in-a-Shared-HostingServer.aspx" mce_href="https://webhosting.asphostcentral.com/post/2010/03/02/WCF-RIA-Service-Hosting-WCF-RIA-Service-Configuration-in-a-Shared-HostingServer.aspx">1</a>, <a href="https://webhosting.asphostcentral.com/post/2010/02/22/WCF-RIA-Service-Hosting-Error-Message-Load-Operation-Failed-for-query-GetUser.aspx" mce_href="https://webhosting.asphostcentral.com/post/2010/02/22/WCF-RIA-Service-Hosting-Error-Message-Load-Operation-Failed-for-query-GetUser.aspx">2</a>, <a href="https://webhosting.asphostcentral.com/post/2010/02/22/WCF-RIA-Service-Hosting-Error-Message-This-collection-already-contains-an-address-with-scheme-http.aspx" mce_href="https://webhosting.asphostcentral.com/post/2010/02/22/WCF-RIA-Service-Hosting-Error-Message-This-collection-already-contains-an-address-with-scheme-http.aspx">3</a>] to help you with you RIA Services Deployment as well.</span></p>
<p><span style="font-size: x-small;" size="2">In House Servers</span>:</p>
<p>If you are setting up an in house server, you can download .NET 4 RC from <a href="https://www.microsoft.com/downloads/details.aspx?FamilyID=a9ef9a95-58d2-4e51-a4b7-bea3cc6962cb&amp;displaylang=en" target="_blank" mce_href="https://www.microsoft.com/downloads/details.aspx?FamilyID=a9ef9a95-58d2-4e51-a4b7-bea3cc6962cb&amp;displaylang=en">here</a>.&nbsp;</p>
<p>To install RIA Service RC on your server, download the MSI locally from <a href="https://www.microsoft.com/downloads/details.aspx?FamilyID=c224fdb4-edd0-493a-af1f-474c54a69db8&amp;displaylang=en" target="_blank" mce_href="https://www.microsoft.com/downloads/details.aspx?FamilyID=c224fdb4-edd0-493a-af1f-474c54a69db8&amp;displaylang=en">here</a> and then run it as such -</p>
<p>msiexec /i RIAServices.msi /SERVER=true<strong></strong></p>
<p>More details on this option are in Deepesh&rsquo;s blog <a href="https://blogs.msdn.com/deepm/archive/2010/03/15/are-you-a-hoster-and-want-to-support-ria-services.aspx" target="_blank" mce_href="https://blogs.msdn.com/deepm/archive/2010/03/15/are-you-a-hoster-and-want-to-support-ria-services.aspx">here</a>.</p>
<p><span style="font-size: x-small;" size="2"></span>&nbsp;</p>
<p><span style="font-size: x-small;" size="2">BIN Deployment</span>:</p>
<p>If you have access to a .NET 4 RC server but do not have permissions to install RIA Services on it, you can choose to carry the RIA Services bits in the Web Applications BIN folder.</p>
<p>If you are using the Visual Studio Build-&gt;Publish option to deploy your application, make sure the following three assemblies under the Web Application-&gt;References have been marked as Copy Local = True</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/saurabh/WindowsLiveWriter/DeployingRIAServicesApplications_F53D/image7.png" original-url="https://blogs.msdn.com/blogfiles/saurabh/WindowsLiveWriter/DeployingRIAServicesApplications_F53D/image7.png" mce_href="https://blogs.msdn.com/blogfiles/saurabh/WindowsLiveWriter/DeployingRIAServicesApplications_F53D/image7.png"><img style="display: inline; border-width: 0px;" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/saurabh/WindowsLiveWriter/DeployingRIAServicesApplications_F53D/image7_thumb.png" original-url="https://blogs.msdn.com/blogfiles/saurabh/WindowsLiveWriter/DeployingRIAServicesApplications_F53D/image7_thumb.png" width="462" height="311" mce_src="https://blogs.msdn.com/blogfiles/saurabh/WindowsLiveWriter/DeployingRIAServicesApplications_F53D/image7_thumb.png" /></a></p>
<p>If you are copying the bits over manually to your deployment server, copy the above three assemblies to the Web Applications BIN folder right next to your [WebAppName].dll</p>
<p mce_keep="true">&nbsp;</p>
<p><span style="font-size: x-small;" size="2">Deploying LINQtoSQL Applications</span>:</p>
<p>Starting with RIA Services RC, the RIA Services LINQtoSQL Provider has been moved to the <a href="https://www.microsoft.com/downloads/details.aspx?FamilyID=7b43bab5-a8ff-40ed-9c84-11abb9cda559&amp;displaylang=en" target="_blank" mce_href="https://www.microsoft.com/downloads/details.aspx?FamilyID=7b43bab5-a8ff-40ed-9c84-11abb9cda559&amp;displaylang=en">RIA Services Toolkit</a>.</p>
<p>If you have are deploying an application that uses L2S you will need to either manually deploy the Microsoft.ServiceModel.DomainServices.LinqToSql assembly in your servers GlobalAssemblyCache or make sure it is copied to the Web Apps BIN folder.</p>
<p><span style="font-size: x-small;" size="2"></span>&nbsp;</p>
<p><span style="font-size: x-small;" size="2">Azure Support</span>:</p>
<p>Since RIA Services RC bits only support .NET 4 while Azure currently only support .NET 3.5, it is not possible to deploy a RIA Services RC application to Azure.</p>
<p>We are working closely with the Azure team to bring .NET 4 support to Azure.</p>
<p><strong><span style="font-size: small;" size="3"></span></strong>&nbsp;</p>
<p><strong><span style="font-size: small;" size="3">Configuring IIS</span></strong></p>
<p>RIA Services supports IIS6/IIS7 deployments.</p>
<p>However WCF (and by association RIA Services) has a limitation that it <strong>does not support MultipleAuthenticationSchemas enabled </strong>in IIS.</p>
<p>So if you are using Forms Authentication in your application (if you built your application using the Business Application template, Forms Auth is the default there) you need to make sure that for the IIS VirtualRoot that hosts your WebApp Forms Auth is enabled. Forms Auth + Anonymous will also work fine but Forms Auth + Integrated Auth is not supported.</p>
<p>Similarly if you are using Windows Authentication in your application (for a default Web Application no Authentication Mode is specified in the Web Config and the default Authentication Mode&nbsp; is Windows) you need to make sure that for your WebApp only Integrated Auth enabled.</p>
<p>If you do not have access to your servers IIS settings (most hosters will give you an option to choose the Authentication Mode for your Web Application) you will need to work with your Server Administrator to get those changed.</p>
<p>I talk later about detecting whether IIS is configured correctly for your Web application.</p>
<p><strong><span style="font-size: small;" size="3"></span></strong>&nbsp;</p>
<p><strong><span style="font-size: small;" size="3">Deploying the Application</span></strong></p>
<p>Once you have the deployment server set up, RIA Services installed or Bin Deployed and IIS configured, deploying the application is as simple as copying the bits over.&nbsp;</p>
<p>A typical Web Application hosting a Silverlight Application will look something like this -</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/saurabh/WindowsLiveWriter/DeployingRIAServicesApplications_F53D/image_8.png" original-url="https://blogs.msdn.com/blogfiles/saurabh/WindowsLiveWriter/DeployingRIAServicesApplications_F53D/image_8.png" mce_href="https://blogs.msdn.com/blogfiles/saurabh/WindowsLiveWriter/DeployingRIAServicesApplications_F53D/image_8.png"><img style="display: inline; border-width: 0px;" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/saurabh/WindowsLiveWriter/DeployingRIAServicesApplications_F53D/image_thumb_3.png" original-url="https://blogs.msdn.com/blogfiles/saurabh/WindowsLiveWriter/DeployingRIAServicesApplications_F53D/image_thumb_3.png" width="173" height="137" mce_src="https://blogs.msdn.com/blogfiles/saurabh/WindowsLiveWriter/DeployingRIAServicesApplications_F53D/image_thumb_3.png" /></a></p>
<p>The ClientBin folder contains the .xap, while the Bin folder contains the [WebAppName].dll + any bin copied assemblies.</p>
<p>If everything is in place, browsing to the .aspx should download and launch the Silverlight Application.&nbsp;</p>
<p>If you do not see the Silverlight Application being downloaded successfully when you browse to your web site, it is most likely because your ASP.NET server or&nbsp; IIS have not been configured correctly. In this blog I do not dwell on debugging Silverlight deployment issues, there is lot of good material available on that online.</p>
<p>However if you can download the Silverlight Application fine but your calls to the DomainService are failing, then it is a RIA Services deployment issue. Below I talk in more detail about trouble shooting such failures &hellip;</p>
<p><strong><span style="font-size: small;" size="3"></span></strong>&nbsp;</p>
<p><strong><span style="font-size: small;" size="3">Troubleshooting Deployment Issues</span></strong></p>
<p>The flow chart below shows the various platform involved in data or error information successfully making it down from a DomainService to the Silverlight Client.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/saurabh/WindowsLiveWriter/DeployingRIAServicesApplications_F53D/image14.png" original-url="https://blogs.msdn.com/blogfiles/saurabh/WindowsLiveWriter/DeployingRIAServicesApplications_F53D/image14.png" mce_href="https://blogs.msdn.com/blogfiles/saurabh/WindowsLiveWriter/DeployingRIAServicesApplications_F53D/image14.png"><img style="width: 455px; display: inline; height: 274px; border-width: 0px;" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/saurabh/WindowsLiveWriter/DeployingRIAServicesApplications_F53D/image14_thumb.png" original-url="https://blogs.msdn.com/blogfiles/saurabh/WindowsLiveWriter/DeployingRIAServicesApplications_F53D/image14_thumb.png" width="449" height="225" mce_src="https://blogs.msdn.com/blogfiles/saurabh/WindowsLiveWriter/DeployingRIAServicesApplications_F53D/image14_thumb.png" /></a></p>
<p><span style="font-size: x-small;" size="2">CustomErrors:</span></p>
<p>Exceptions thrown at the DomainServices layer make it down to the Silverlight client and if unhandled show up as client exceptions.</p>
<p>If the Web App&rsquo;s web.config has Custom Errors enabled (the default is Off), then the exceptions will typically contain enough information to help the user debug the exception.</p>
<p>&lt;customErrors mode="On"/&gt;</p>
<p>Since the application worked fine in the development environment and is failing on deployment, the failure typically has to do with the Server environment not being setup correctly. For example, connection string mismatch between development and deployment environments is a common cause of failures.</p>
<p><span style="font-size: x-small;" size="2"></span>&nbsp;</p>
<p><span style="font-size: x-small;" size="2">404/NotFound</span>:</p>
<p>Unfortunately any exception thrown in the RIA Service Host or anywhere lower in the pipeline (WCF/ASP.NET/IIS) all show up in Silverlight as <em>404/NotFound. </em></p>
<p>Option #1 - To get to the actual error information an Http diagnostic tool is need. <a href="https://www.fiddler2.com/fiddler2/version.asp" target="_blank" mce_href="https://www.fiddler2.com/fiddler2/version.asp">Fiddler</a> is a popular option. It gives you access to the to the Http response body where the actual error information is available.</p>
<p>Option #2 - Not being able to get the error information in Silverlight is a limitation of the Silverlight&rsquo;s Browser Networking Stack which RIA Services uses internally.</p>
<p>Another option to get to the error info for debugging is to temporarily get your application to use the <a href="https://msdn.microsoft.com/en-us/library/dd920295(VS.95).aspx" target="_blank" mce_href="https://msdn.microsoft.com/en-us/library/dd920295(VS.95).aspx">Silverlight Client Networking Stack</a>. To do so, all you need to do is add the following line of code to your SL Application. It will force all http web request to go via the Client Networking Stack and thus make the error code available on the Client.</p>
<pre class="csharpcode">WebRequest.RegisterPrefix(<span class="str">"https://"</span>, 
  WebRequestCreator.ClientHttp);</pre>
<p>In case you were wondering &ndash; There are certain limitations to using Client networking stack (especially around authentication support) and hence RIA services does not use it as its default networking stack.</p>
<p>If using Fiddler or the Client stack you are still seeing a 404 response, then that really is the error code the server is returning. We then need to move to the next stage of troubleshooting.</p>
<p><span style="font-size: x-small;" size="2"></span>&nbsp;</p>
<p><span style="font-size: x-small;" size="2">Browsing to the .SVC</span></p>
<p>For every DomainService, a WCF Service is created at runtime using the ASP.NET feature of Virtual Path Providers. More details on the dynamic .SVC file creation can be found in my blog post <a href="https://blogs.msdn.com/saurabh/archive/2009/11/23/understanding-the-wcf-in-wcf-ria-services.aspx" target="_blank" mce_href="https://blogs.msdn.com/saurabh/archive/2009/11/23/understanding-the-wcf-in-wcf-ria-services.aspx">here</a>.</p>
<p>Since it is a virtual file you will not see a physical .svc in your deployed project, but it will exist at runtime. Being able to browse to the .SVC can be key to debugging RIA Services deployment issues.</p>
<p>For a given DomainService the path to its .SVC can be determined using the following convention:</p>
<p>[BaseURI] + [DomainServiceNameWithNamespace].svc with all &ldquo;<b>.</b>&rdquo; in the DomainServiceFullName replaced by &ldquo;<b>-</b>&ldquo;</p>
<p>So HRApp.Web.OrganizationService deployed the domain https://www.RIAServicesApps.com will be exposed as &ndash; https://www.RIAServicesApps.com/HRApp-Web-OrganizationService.svc</p>
<p>If everything is setup correctly you will see a default WCF Service page, else you will see an error message telling you what is wrong.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/saurabh/WindowsLiveWriter/DeployingRIAServicesApplications_F53D/image24.png" original-url="https://blogs.msdn.com/blogfiles/saurabh/WindowsLiveWriter/DeployingRIAServicesApplications_F53D/image24.png" mce_href="https://blogs.msdn.com/blogfiles/saurabh/WindowsLiveWriter/DeployingRIAServicesApplications_F53D/image24.png"><img style="display: inline; border-width: 0px;" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/saurabh/WindowsLiveWriter/DeployingRIAServicesApplications_F53D/image24_thumb.png" original-url="https://blogs.msdn.com/blogfiles/saurabh/WindowsLiveWriter/DeployingRIAServicesApplications_F53D/image24_thumb.png" width="409" height="305" mce_src="https://blogs.msdn.com/blogfiles/saurabh/WindowsLiveWriter/DeployingRIAServicesApplications_F53D/image24_thumb.png" /></a></p>
<p>If you get a 404 on browsing to the .SVC, the DomainService was not setup correctly</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/saurabh/WindowsLiveWriter/DeployingRIAServicesApplications_F53D/image28.png" original-url="https://blogs.msdn.com/blogfiles/saurabh/WindowsLiveWriter/DeployingRIAServicesApplications_F53D/image28.png" mce_href="https://blogs.msdn.com/blogfiles/saurabh/WindowsLiveWriter/DeployingRIAServicesApplications_F53D/image28.png"><img style="display: inline; border-width: 0px;" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/saurabh/WindowsLiveWriter/DeployingRIAServicesApplications_F53D/image28_thumb.png" original-url="https://blogs.msdn.com/blogfiles/saurabh/WindowsLiveWriter/DeployingRIAServicesApplications_F53D/image28_thumb.png" width="414" height="300" mce_src="https://blogs.msdn.com/blogfiles/saurabh/WindowsLiveWriter/DeployingRIAServicesApplications_F53D/image28_thumb.png" /></a>&nbsp;</p>
<p>One common cause for this issue is missing sections in the Web config.</p>
<p>At development time when a DomainService is added to a project using the DomainService Wizard, the right Web Config entries are automatically made by the Wizard. However these entries sometimes get lost at deployment time, especially if the Web Config has to manually be merged for deployment.</p>
<p>Below are the Web Config sections need by RIA Services -</p>
<pre class="csharpcode"><span class="kwrd">&lt;</span><span class="html">configuration</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">system.webServer</span><span class="kwrd">&gt;</span>
        <span class="kwrd">&lt;</span><span class="html">modules</span> <span class="attr">runAllManagedModulesForAllRequests</span><span class="kwrd">="true"</span><span class="kwrd">&gt;</span>
            <span class="kwrd">&lt;</span><span class="html">add</span> <span class="attr">name</span><span class="kwrd">="DomainServiceModule"</span> <span class="attr">preCondition</span><span class="kwrd">="managedHandler"</span>
<span class="attr">type</span><span class="kwrd">="System.ServiceModel.DomainServices.Hosting.DomainServiceHttpModule, System.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"</span> <span class="kwrd">/&gt;</span>
        <span class="kwrd">&lt;/</span><span class="html">modules</span><span class="kwrd">&gt;</span>
        <span class="kwrd">&lt;</span><span class="html">validation</span> <span class="attr">validateIntegratedModeConfiguration</span><span class="kwrd">="false"</span> <span class="kwrd">/&gt;</span>
    <span class="kwrd">&lt;/</span><span class="html">system.webServer</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">system.web</span><span class="kwrd">&gt;</span>
        <span class="kwrd">&lt;</span><span class="html">httpModules</span><span class="kwrd">&gt;</span>
            <span class="kwrd">&lt;</span><span class="html">add</span> <span class="attr">name</span><span class="kwrd">="DomainServiceModule"</span> 
<span class="attr">type</span><span class="kwrd">="System.ServiceModel.DomainServices.Hosting.DomainServiceHttpModule, System.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"</span> <span class="kwrd">/&gt;</span>
        <span class="kwrd">&lt;/</span><span class="html">httpModules</span><span class="kwrd">&gt;</span>
        <span class="kwrd">&lt;</span><span class="html">compilation</span> <span class="attr">debug</span><span class="kwrd">="true"</span> <span class="attr">targetFramework</span><span class="kwrd">="4.0"</span> <span class="kwrd">/&gt;</span>
    <span class="kwrd">&lt;/</span><span class="html">system.web</span><span class="kwrd">&gt;</span>

    <span class="kwrd">&lt;</span><span class="html">system.serviceModel</span><span class="kwrd">&gt;</span>
        <span class="kwrd">&lt;</span><span class="html">serviceHostingEnvironment</span> <span class="attr"><strong>aspNetCompatibilityEnabled</strong></span><span class="kwrd">="true"</span>
            <span class="attr"><strong>multipleSiteBindingsEnabled</strong></span><span class="kwrd">="true"</span> <span class="kwrd">/&gt;</span>
    <span class="kwrd">&lt;/</span><span class="html">system.serviceModel</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">configuration</span><span class="kwrd">&gt;</span></pre>
<p></p>
<p></p>
<p><span class="kwrd">If browsing to the .SVC succeeds just fine but communicating with the Domain Service from within the Silverlight Application returns a 404 response code, then most likely your DomainSerivce at runtime is running into an exception in the WCF stack. In the data/error Flow diagram at the beginning of this section I represent these exceptions with the dark blue box. </span></p>
<p></p>
<p></p>
<p></p>
<p><span style="font-size: x-small;" size="2"></span>&nbsp;</p>
<p><span style="font-size: x-small;" size="2">WCF Exceptions</span></p>
<p><span class="kwrd">Hitting exceptions in the WCF stack is rare for RIA Services applications. </span></p>
<p><span class="kwrd">One known cause is that you might be hitting the default WCF quota for Maximum number of nodes in a de-serialized graph - <em>'Maximum number of items that can be serialized or deserialized in an object graph is 65536'</em>. If you are indeed inadvertently sending large amounts of data consider constraining it </span>&nbsp;</p>
<p><span class="kwrd">Another cause could be that RIA Services is running into an exception trying to (de)serialize your Object Graph, though this is very uncommon.</span></p>
<p><span class="kwrd">The only option to get to the bottom of these sort of issues is to enable <a href="https://msdn.microsoft.com/en-us/library/ms730342.aspx" target="_blank" mce_href="https://msdn.microsoft.com/en-us/library/ms730342.aspx">WCF tracing</a> in your Web Site.</span><span class="kwrd"><strong>&nbsp;</strong></span></p>
<p><span style="font-size: small;" size="3"><strong></strong></span>&nbsp;</p>
<p><span style="font-size: small;" size="3"><strong>In Conclusion</strong></span></p>
<p><span class="kwrd">Hopefully the deployment and troubleshooting information above will help you successfully deploy your RIA Services Application. Please do you the comments section to provide feedback or for items not addressed by this blog post.</span></p>
<p><span class="kwrd"></span>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Understanding the WCF in ‘WCF RIA Services’</title>
      <link>https://docs.microsoft.com/archive/blogs/saurabh/understanding-the-wcf-in-wcf-ria-services</link>
      <pubDate>Mon, 23 Nov 2009 23:23:00 GMT</pubDate>
      <dc:creator><![CDATA[Saurabh]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/saurabh/2009/11/23/understanding-the-wcf-in-wcf-ria-services/</guid>
      <description><![CDATA[At PDC 2009 we (RIA Services Team) announced the re-branding of Microsoft .NET RIA Services to...]]></description>
      <content:encoded><![CDATA[<P>At PDC 2009 we (RIA Services Team) announced the re-branding of Microsoft .NET RIA Services to <STRONG>Windows Communication Foundation (WCF) RIA Services.&nbsp; </STRONG>We backed this branding change with a new Preview release, that has RIA Services built heavily on the WCF stack.</P>
<P>In this post I plan to talk briefly about the motivation behind aligning RIA Services with WCF and then dig deep into how exactly RIA Services consumes WCF.</P>
<P><STRONG><FONT size=3>RIA Services on WCF: Best of both worlds</FONT></STRONG></P>
<P>Ever since we announced RIA Services at MIX '09, we have heard strong customers feedback that they would like a consolidated services story from Microsoft. Acting on that feedback, over the last few months RIA Services has spent a significant amount of effort aligning closely with WCF. The Data Services team at their end has been working on a similar alignment with WCF as well.</P>
<P>By centering all our service offerings around WCF we are maximizing developer knowledge transfer and skill reuse, both in the short and the long term.</P>
<P>For more details on the alignment and the motivation behind it please also check out <A href="https://blogs.msdn.com/endpoint/archive/2009/11/18/the-wcf-services-ecosystem.aspx" mce_href="https://blogs.msdn.com/endpoint/archive/2009/11/18/the-wcf-services-ecosystem.aspx">this post</A> by the WCF team. </P>
<P><A href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/saurabh/WindowsLiveWriter/UnderstandingtheWCFinWCFRIAServices_F638/image_2.png" original-url="https://blogs.msdn.com/blogfiles/saurabh/WindowsLiveWriter/UnderstandingtheWCFinWCFRIAServices_F638/image_2.png" mce_href="https://blogs.msdn.com/blogfiles/saurabh/WindowsLiveWriter/UnderstandingtheWCFinWCFRIAServices_F638/image_2.png"><IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/saurabh/WindowsLiveWriter/UnderstandingtheWCFinWCFRIAServices_F638/image_thumb.png" original-url="https://blogs.msdn.com/blogfiles/saurabh/WindowsLiveWriter/UnderstandingtheWCFinWCFRIAServices_F638/image_thumb.png" width=458 height=345 mce_src="https://blogs.msdn.com/blogfiles/saurabh/WindowsLiveWriter/UnderstandingtheWCFinWCFRIAServices_F638/image_thumb.png"></A> </P>
<P>I strongly believe that with WCF RIA Services our users get the best of both worlds - </P>
<UL>
<LI>They get all the simplicity and productivity of the RIA Services Prescriptive Programming Model and Tooling </LI>
<LI>And if need be, they can dig deep into our services infrastructure and harness all the power and flexibility that WCF has to offer&nbsp;<STRONG><FONT size=3>&nbsp;</FONT></STRONG></LI></UL>
<P mce_keep="true"><STRONG><FONT size=3>Understanding RIA Services use of WCF</FONT></STRONG></P>
<P>To help users better understand how RIA Services uses WCF, in the following section I walkthrough what happens under the covers when a user creates a simple DomainService and then communicated with it.</P>
<P><STRONG>1. </STRONG><STRONG>‘Add new DomainService Class’</STRONG></P>
<P>Lets assume an application developer opens up the ‘Add new Domain Service Class’ item template and adds a new Domain Service. </P>
<P>The item template, besides producing a skeletal Domain Service Class, adds the right assembly references and registers an Http modules in the Web.Config. By default it registers an httpModule for Cassini (for Visual Studio F5 experience) and one for IIS, as shown below.</P>
<DIV class=csharpcode>
<DIV class=csharpcode>
<DIV class=csharpcode><PRE class=alt><SPAN class=kwrd>&lt;?</SPAN><SPAN class=html>xml</SPAN> <SPAN class=attr>version</SPAN><SPAN class=kwrd>="1.0"</SPAN>?<SPAN class=kwrd>&gt;</SPAN></PRE><PRE><SPAN class=kwrd>&lt;</SPAN><SPAN class=html>configuration</SPAN><SPAN class=kwrd>&gt;</SPAN></PRE><PRE class=alt>&nbsp;</PRE><PRE>  <SPAN class=kwrd>&lt;</SPAN><SPAN class=html>system.web</SPAN><SPAN class=kwrd>&gt;</SPAN></PRE><PRE class=alt>    <STRONG><SPAN class=kwrd>&lt;</SPAN><SPAN class=html>httpModules</SPAN><SPAN class=kwrd>&gt;</SPAN></STRONG></PRE><PRE>      <STRONG><SPAN class=kwrd>&lt;</SPAN><SPAN class=html>add</SPAN> <SPAN class=attr>name</SPAN><SPAN class=kwrd>="DomainServiceModule"</SPAN> </STRONG></PRE><PRE class=alt><SPAN class=attr><STRONG>type</STRONG></SPAN><SPAN class=kwrd><STRONG>="System.Web.Ria.Services.DomainServiceHttpModule, </STRONG></PRE><PRE><STRONG>System.Web.Ria"</STRONG></SPAN><STRONG> <SPAN class=kwrd>/&gt;</SPAN></STRONG></PRE><PRE class=alt><STRONG>    <SPAN class=kwrd>&lt;/</SPAN><SPAN class=html>httpModules</SPAN><SPAN class=kwrd>&gt;</SPAN></STRONG></PRE><PRE>    <SPAN class=kwrd>&lt;</SPAN><SPAN class=html>compilation</SPAN> <SPAN class=attr>debug</SPAN><SPAN class=kwrd>="true"</SPAN> <SPAN class=attr>targetFramework</SPAN><SPAN class=kwrd>="4.0"</SPAN> <SPAN class=kwrd>/&gt;</SPAN> </PRE><PRE class=alt>  <SPAN class=kwrd>&lt;/</SPAN><SPAN class=html>system.web</SPAN><SPAN class=kwrd>&gt;</SPAN></PRE><PRE>  </PRE><PRE class=alt>  <SPAN class=kwrd>&lt;</SPAN><SPAN class=html>system.webServer</SPAN><SPAN class=kwrd>&gt;</SPAN></PRE><PRE>    <SPAN class=kwrd>&lt;</SPAN><SPAN class=html>validation</SPAN> <SPAN class=attr>validateIntegratedModeConfiguration</SPAN><SPAN class=kwrd>="false"</SPAN><SPAN class=kwrd>/&gt;</SPAN></PRE><PRE class=alt>    <SPAN class=kwrd>&lt;</SPAN><SPAN class=html>modules</SPAN> <SPAN class=attr>runAllManagedModulesForAllRequests</SPAN><SPAN class=kwrd>="true"</SPAN><SPAN class=kwrd>&gt;</SPAN></PRE><PRE>      <STRONG><SPAN class=kwrd>&lt;</SPAN><SPAN class=html>add</SPAN> <SPAN class=attr>name</SPAN><SPAN class=kwrd>="DomainServiceModule"</SPAN> <SPAN class=attr>preCondition</SPAN><SPAN class=kwrd>="managedHandler"</SPAN></STRONG></PRE><PRE class=alt><SPAN class=attr><STRONG>type</STRONG></SPAN><SPAN class=kwrd><STRONG>="System.Web.Ria.Services.DomainServiceHttpModule, </STRONG></PRE><PRE><STRONG>System.Web.Ria"</STRONG></SPAN><STRONG> <SPAN class=kwrd>/&gt;</SPAN></STRONG></PRE><PRE class=alt>    <SPAN class=kwrd>&lt;/</SPAN><SPAN class=html>modules</SPAN><SPAN class=kwrd>&gt;</SPAN></PRE><PRE>    <SPAN class=kwrd>&lt;</SPAN><SPAN class=html>validation</SPAN> <SPAN class=attr>validateIntegratedModeConfiguration</SPAN><SPAN class=kwrd>="false"</SPAN> <SPAN class=kwrd>/&gt;</SPAN></PRE><PRE class=alt>  <SPAN class=kwrd>&lt;/</SPAN><SPAN class=html>system.webServer</SPAN><SPAN class=kwrd>&gt;</SPAN></PRE><PRE>&nbsp;</PRE></DIV>
<STYLE type=text/css>





.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</STYLE>
</DIV></DIV>
<P>
<STYLE type=text/css>








.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</STYLE>
</P>
<DIV class=csharpcode><PRE><SPAN class=kwrd></SPAN></PRE></DIV>
<STYLE type=text/css>







.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</STYLE>

<P><STRONG>2.</STRONG> <STRONG>Domain Service Code</STRONG></P>
<P>The developer then goes ahead and adds Business logic to his DomainService.The methods exposed via the DomainService can be broken into two broad categories – </P>
<P><STRONG>CRUD operations –</STRONG> Query, Update, Named Update and Delete operations. These operations follow the RIA Services prescriptive guideline and rely on the RIA Services framework. This is added functionality that RIA Services introduces on top of WCF and is not available to Core WCF Services.</P>
<P><STRONG>Service Operation/ Invoke&nbsp;Operations</STRONG> - These are [Invoke] operation in the RIA Services terminology and Service Operations in WCF terminology. These methods are independent of the RIA Services concept of ChangeSet (ChangeSet applies only to the CRUD operations above) and are ‘Online/Direct’ methods that communicate with the Server immediately when invoked.</P>
<P>Below is the code for the OrganizationService DomainService we use in our canonical <A href="https://code.msdn.microsoft.com/RiaServices/Release/ProjectReleases.aspx?ReleaseId=2387" mce_href="https://code.msdn.microsoft.com/RiaServices/Release/ProjectReleases.aspx?ReleaseId=2387">RIA Services walkthrough</A>.</P>
<DIV class=csharpcode><PRE class=alt><SPAN class=kwrd>namespace</SPAN> HRApp.Web</PRE><PRE>{</PRE><PRE class=alt>    [EnableClientAccess()]</PRE><PRE>    <SPAN class=kwrd>public</SPAN> <SPAN class=kwrd>class</SPAN> OrganizationService : </PRE><PRE class=alt>        LinqToEntitiesDomainService&lt;AdventureWorks_DataEntities&gt;</PRE><PRE>    {</PRE><PRE class=alt>        <SPAN class=preproc>#region</SPAN> CRUD    </PRE><PRE>        <SPAN class=kwrd>public</SPAN> IQueryable&lt;Employee&gt; GetEmployee(){…}        </PRE><PRE class=alt>        <SPAN class=kwrd>public</SPAN> <SPAN class=kwrd>void</SPAN> InsertEmployee(Employee employee) {…}        </PRE><PRE>        <SPAN class=kwrd>public</SPAN> <SPAN class=kwrd>void</SPAN> UpdateEmployee(Employee currentEmployee) {…}        </PRE><PRE class=alt>        <SPAN class=kwrd>public</SPAN> <SPAN class=kwrd>void</SPAN> DeleteEmployee(Employee employee) {…}</PRE><PRE>        <SPAN class=kwrd>public</SPAN> IQueryable&lt;Employee&gt; GetSalariedEmployee(){…}</PRE><PRE class=alt>        [RequiresAuthentication()]</PRE><PRE>        <SPAN class=kwrd>public</SPAN> <SPAN class=kwrd>void</SPAN> ApproveSabbatical(Employee current) {…}   </PRE><PRE class=alt>        <SPAN class=preproc>#endregion</SPAN></PRE><PRE>    </PRE><PRE class=alt>       <SPAN class=preproc>#region</SPAN> ServiceOperations</PRE><PRE>        <SPAN class=kwrd>public</SPAN> <SPAN class=kwrd>string</SPAN> Echo(<SPAN class=kwrd>string</SPAN> msg) {…}</PRE><PRE class=alt>        <SPAN class=kwrd>public</SPAN> DateTime GetServerDateTime(){…}</PRE><PRE>       <SPAN class=preproc>#endregion</SPAN></PRE><PRE class=alt>    }</PRE><PRE>}</PRE></DIV>
<STYLE type=text/css>


.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</STYLE>

<P><B>3. WCF Channel on Client</B></P>
<P>The RIA Services Framework on the Client contains a <EM>WebDomainClient:DomainClient</EM> whose purpose is to help the SL client communicate with a WCF service represention of the Domain Service. The <EM>WebomainClient </EM>uses a WCF Client Chanel for this cummunication.</P>
<P>The&nbsp;Channel is created by using WCF’s ChannelFactory and by passing to it a WCF Service Contract that was generated from the Domain Service (more on the contract creation later). The ChanelFactory creates a WCF client proxy based on the supplied contract. The generated proxy takes care of communication/(de)serialization between Client and Server.</P>
<P>The RIA Services <EM><A href="https://msdn.microsoft.com/en-us/library/ee707370(VS.91).aspx" mce_href="https://msdn.microsoft.com/en-us/library/ee707370(VS.91).aspx">DomainContext</A>&nbsp;</EM>utilizes the <EM>WebDomainClient </EM>for Client-Server communication and the context itself is WCF agnostic.</P>
<P><B></B></P>
<P><B>4. </B><B>Dynamic .SVC generation</B></P>
<P>By default DomainServices do not have a physical .SVC file generated for them at Design Time. </P>
<P>However each DomainService has a virtual .SVC associated with it. The .SVC represents the WCF Service that services requests for that particular DomainService. For a given DomainService the path to its .SVC can be determined using the following convention: </P>
<P>[SilverlightApplicationBaseURI] + [DomainServiceFullName].svc (With all “<B>.</B>” replaced by “<B>-</B>“)</P>
<P>So HRApp.Web.OrganizationService is exposed as – <A href="https://[ApplicationBaseURI]/HRApp-Web-OrganizationService.svc" mce_href="https://[ApplicationBaseURI]/HRApp-Web-OrganizationService.svc">https://[ApplicationBaseURI]/HRApp-Web-OrganizationService.svc</A></P>
<P>At RunTime when the first request (within a particular Application Domain) is made for a DomainService's .SVC file , the registered httpModules intercept the call and RIA Services writes out an in memory .SVC file on the fly.</P>
<P>Below is what the dynamically generated svc file looks like for the OrganizationService defined above - </P>
<DIV class=csharpcode><PRE class=alt>&lt;%@ ServiceHost Service=”HRApp.Web.OrganizationService” </PRE><PRE>Factory=”System.Web.Ria.DomainServiceHostFactory”</PRE><PRE class=alt>%&gt;</PRE></DIV>
<STYLE type=text/css>


.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</STYLE>

<STYLE type=text/css>


.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</STYLE>

<DIV class=csharpcode>&nbsp;</DIV>
<P>The .SVC refers to the DomainService Type and a ServiceHostFactory. The default RIA Services&nbsp; HostFactory instantiates the default RIA Services ServiceHost, which in turn is responsible for extracting the WCF Service Contract from the DomainService (See the ‘Generating a WCF Contract’ paragraph below for more details) and also for hosting the service. </P>
<P>A request for the DomainService .SVC in any folder under the Web Application root is redirected to [WebAppRoot]/Services/[DomainService].svc using ASP.net URL rewriting. The service is thus accessible under any folder in the WebApp. Hence even if a&nbsp;.XAP is moved around under the hosting Web App Root, the Silverlight App's relative reference to the DomainService is not broken.&nbsp;</P>
<P>NOTE - If a physical .svc file with the right file name (as per convention) is present in the ~/Services folder, that is used to define the Service Contract and no virtual .SVC file is generated. </P>
<P><B></B></P>
<P><B>5. </B><B>Generating the WCF Contract:</B></P>
<P>Each WCF service needs to have a <A href="https://msdn.microsoft.com/en-us/library/system.servicemodel.description.servicedescription.aspx" mce_href="https://msdn.microsoft.com/en-us/library/system.servicemodel.description.servicedescription.aspx">ServiceDescription</A> and one or more <A href="https://msdn.microsoft.com/en-us/library/system.servicemodel.description.contractdescription.aspx" mce_href="https://msdn.microsoft.com/en-us/library/system.servicemodel.description.contractdescription.aspx">ContractDescriptions</A> for it. </P>
<P><B></B></P>
<P><A href="https://msdn.microsoft.com/en-us/library/system.servicemodel.servicehost.aspx" mce_href="https://msdn.microsoft.com/en-us/library/system.servicemodel.servicehost.aspx">ServiceHosts</A> are responsible for extracting descriptions from a service and hosting the service. The standard ServiceHost in WCF produces descriptions based on WCF attributes such as [ServiceContract] and [OperationContract]. In RIA Services we provide a custom ServiceHost which does this based on a RIA Service Attributes and Conventions.</P>
<P>Here is how DomainService operations are mapped to the WCF Contract:</P>
<P><STRONG>Query operations – </STRONG></P>
<P>Each Query operation shows up as a ServiceOperation in the WCF Contract, but with its signature modified. </P>
<P>The ServiceHost creates an operation description for each query operation. The return type is changed to QueryResult&lt;T&gt; such that it can return additional information such as count. It also adds a QueryOperationBehavior which through a custom operation Invoker takes care of applying cache policies, validating parameters and composing queries.</P>
<P><B>Insert, Update, Delete operations – </B></P>
<P>For all CUD operations the ServiceHost generates one top-level SubmitChanges operation description. Again, it adds a custom behavior which injects a custom operation invoker. The signature of SubmitChanges is <EM>ChangeSet SubmitChanges(ChangeSet changeSet)</EM>. The returned ChangeSet contains auto-generated values from the server.</P>
<P><B>Invoke Operations – </B></P>
<P>Invoke Operations are the RIA Services equivalent of WCF ServiceOperations. All Invoke Operations show up in the WCF Contract as Service Operations. </P>
<P>For the OrganizationService Domain Service we had defined earlier, below is what the WCF Contract looks like to the “Add Service Reference” dialog - </P>
<P><A href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/saurabh/WindowsLiveWriter/UnderstandingtheWCFinWCFRIAServices_F638/image_6.png" original-url="https://blogs.msdn.com/blogfiles/saurabh/WindowsLiveWriter/UnderstandingtheWCFinWCFRIAServices_F638/image_6.png" mce_href="https://blogs.msdn.com/blogfiles/saurabh/WindowsLiveWriter/UnderstandingtheWCFinWCFRIAServices_F638/image_6.png"><IMG style="BORDER-RIGHT-WIDTH: 0px; WIDTH: 397px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; HEIGHT: 202px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/saurabh/WindowsLiveWriter/UnderstandingtheWCFinWCFRIAServices_F638/image_thumb_2.png" original-url="https://blogs.msdn.com/blogfiles/saurabh/WindowsLiveWriter/UnderstandingtheWCFinWCFRIAServices_F638/image_thumb_2.png" width=296 height=143 mce_src="https://blogs.msdn.com/blogfiles/saurabh/WindowsLiveWriter/UnderstandingtheWCFinWCFRIAServices_F638/image_thumb_2.png"></A> </P>
<P>Attached to this post is also the full generated WCF Contract for the OrganizationService (the file was produced by doing an Add Service Reference to the Domain Service's WCF endpoint)</P>
<P><B>6. </B><B>Default Endpoints:</B></P>
<P>The RIA Services ServiceHost creates the following endpoints by default -&nbsp; </P>
<P>a) For Silverlight Client: SOAP w/binary endpoint. Address = “binary”, Binding = CustomBinding consisting of HttpTransportBindingElement and BinaryMessageEncodingBindingElement.</P>
<P>b) For AJAX Client: JSON REST endpoint. Address = “”, Binding = WebHttpBinding w/JSON as the format.</P>
<P>c) For other clients : SOAP w/XML endpoint. Address = “soap”, Binding = BasicHttpBinding consisting of HttpTransportBindingElement and TextMessageEncodingBindingElement.</P>
<P>The blog post <A href="https://blogs.msdn.com/brada/archive/2009/11/22/ria-services-a-domainservice-is-a-wcf-service-add-service-reference.aspx" target=_blank mce_href="https://blogs.msdn.com/brada/archive/2009/11/22/ria-services-a-domainservice-is-a-wcf-service-add-service-reference.aspx">here</A> describes how one can consume the SOAP XML endpoint in a WindowsForms application. <A href="https://code.msdn.microsoft.com/RiaServices/Release/ProjectReleases.aspx?ReleaseId=3587" target=_blank mce_href="https://code.msdn.microsoft.com/RiaServices/Release/ProjectReleases.aspx?ReleaseId=3587">Here</A> is a Sample of the same endpoint being consumed in a WPF application.</P>
<P><STRONG><FONT size=3>Summary</FONT></STRONG></P>
<P>Above we discussed in some detail how RIA Services uses WCF under the covers. Hopefully this helps folks better understand the RIA Services alignment with WCF.</P>
<P>In a future post I&nbsp; plan to discuss how WCF extensibility (e.g. custom behaviors) can be applied to Domain Services. In the meanwhile <A href="https://code.msdn.microsoft.com/RiaServices/Release/ProjectReleases.aspx?ReleaseId=3576" target=_blank mce_href="https://code.msdn.microsoft.com/RiaServices/Release/ProjectReleases.aspx?ReleaseId=3576">here</A> is a Sample that demos this.</P>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/09/92/77/54/Add%20Service%20Reference%20Generated%20WCF%20Contract%20.cs" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-09-92-77-54/Add-Service-Reference-Generated-WCF-Contract-.cs">Add Service Reference Generated WCF Contract .cs</a></p>]]></content:encoded>
    </item>
    <item>
      <title>.NET RIA Services</title>
      <link>https://docs.microsoft.com/archive/blogs/saurabh/net-ria-services</link>
      <pubDate>Thu, 19 Mar 2009 12:42:00 GMT</pubDate>
      <dc:creator><![CDATA[Saurabh]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/saurabh/2009/03/19/net-ria-services/</guid>
      <description><![CDATA[Over the last year&nbsp;I have been working on .NET RIA Services, a preview of which just went...]]></description>
      <content:encoded><![CDATA[<P>Over the last year&nbsp;I have been working on <A title=".NET RIA Services" href="https://silverlight.net/forums/t/80529.aspx" mce_href="https://silverlight.net/forums/t/80529.aspx">.NET RIA Services</A>, a preview of which just went public at MIX.</P>
<P><A href="https://blogs.msdn.com/brada/" mce_href="https://blogs.msdn.com/brada/">Brad Abrams</A> does a great job on his blog of answering the obvious question you might have - <A href="https://blogs.msdn.com/brada/archive/2009/03/19/what-is-net-ria-services.aspx" mce_href="https://blogs.msdn.com/brada/archive/2009/03/19/what-is-net-ria-services.aspx">What is .NET RIA Services?</A>.&nbsp;Also be sure to check out his <A href="https://videos.visitmix.com/MIX09/T40F" mce_href="https://videos.visitmix.com/MIX09/T40F">session at MIX</A> on the same topic. </P>
<P><A href="https://www.nikhilk.net/" mce_href="https://www.nikhilk.net/">Nikhil Kothari</A> presented a great <A href="https://videos.visitmix.com/MIX09/T41F" mce_href="https://videos.visitmix.com/MIX09/T41F">session</A> on .NET RIA Services at MIX as well.</P>
<P>A good resource for getting started with RIA Services is <A href="https://code.msdn.microsoft.com/Project/Download/FileDownload.aspx?ProjectName=RiaServices&amp;DownloadId=5147" mce_href="https://code.msdn.microsoft.com/Project/Download/FileDownload.aspx?ProjectName=RiaServices&amp;DownloadId=5147">this wakthrough</A> that guides you through building your first Silverlight RIA Services Application. Once you are ready to dig deeper into individual feature areas, <A href="https://download.microsoft.com/download/F/B/8/FB8CA635-296B-487F-965C-8148F08B5319/riaservicesoverviewpreview.pdf" mce_href="https://download.microsoft.com/download/F/B/8/FB8CA635-296B-487F-965C-8148F08B5319/riaservicesoverviewpreview.pdf">this doc</A> should help with that. If like me you learn by stepping through working code, you will find the sample applications <A href="https://code.msdn.microsoft.com/RiaServices" mce_href="https://code.msdn.microsoft.com/RiaServices">here</A>&nbsp;helpful.</P>
<P>As with any preview release <A href="https://silverlight.net/forums/53.aspx" mce_href="https://silverlight.net/forums/53.aspx">feedback</A> is welcome and greatly appreciated.</P>]]></content:encoded>
    </item>
    <item>
      <title>.NET Framework 3.5 - Client Application Services</title>
      <link>https://docs.microsoft.com/archive/blogs/saurabh/net-framework-3-5-client-application-services</link>
      <pubDate>Fri, 16 May 2008 17:01:00 GMT</pubDate>
      <dc:creator><![CDATA[Saurabh]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/saurabh/2008/05/16/net-framework-3-5-client-application-services/</guid>
      <description><![CDATA[I&nbsp;wrote the blog post below about 6 months back and just realised that I never actually got...]]></description>
      <content:encoded><![CDATA[<P>I&nbsp;wrote the blog post below about 6 months back and just realised that I never actually got around to posting it. I the spirit of 'better late than never' here it is ...&nbsp;</P>
<P><B>&nbsp;</B><B>.NET Framework 3.5 - Client Application Services</B></P>
<P>In .NET Framework 3.5, ASP.NET<INS cite=mailto:Saurabh%20Pant dateTime=2007-08-30T17:41> </INS>provides built in <A href="https://msdn2.microsoft.com/en-us/library/bb547119(VS.90).aspx#Examples" mce_href="https://msdn2.microsoft.com/en-us/library/bb547119(VS.90).aspx#Examples">Web Application Services</A> that provide access to features such as forms authentication, roles, and profile properties. These services provide building blocks to enable super-common scenarios and as a result can provide significant productivity wins and time-savings for developers. </P>
<P>The <A href="https://msdn2.microsoft.com/en-us/library/bb384339(VS.90).aspx" mce_href="https://msdn2.microsoft.com/en-us/library/bb384339(VS.90).aspx">Client Application Services</A> feature enables the Client developers to seamlessly leverage these Web Application Services from within their Client Applications. The feature also supports Occasionally Connect scenarios, enabling connected client applications to continue working even on loss of connectivity. </P>
<P><A href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/saurabh/WindowsLiveWriter/.NETFramework.5ClientApplicationServices_C17F/clip_image002_2.gif" original-url="https://blogs.msdn.com/blogfiles/saurabh/WindowsLiveWriter/.NETFramework.5ClientApplicationServices_C17F/clip_image002_2.gif" mce_href="https://blogs.msdn.com/blogfiles/saurabh/WindowsLiveWriter/.NETFramework.5ClientApplicationServices_C17F/clip_image002_2.gif"><IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=184 alt=clip_image002 src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/saurabh/WindowsLiveWriter/.NETFramework.5ClientApplicationServices_C17F/clip_image002_thumb.gif" original-url="https://blogs.msdn.com/blogfiles/saurabh/WindowsLiveWriter/.NETFramework.5ClientApplicationServices_C17F/clip_image002_thumb.gif" width=244 border=0 mce_src="https://blogs.msdn.com/blogfiles/saurabh/WindowsLiveWriter/.NETFramework.5ClientApplicationServices_C17F/clip_image002_thumb.gif"></A></P>
<P>Consider the following scenario facilitated by this feature …</P>
<P>An enterprise leverages .NET 3.5 and exposes Authentication, Roles and Profile Application Services from their existing web servers. The enterprise has a mixture of Ajax, Silverlight and Rich Client applications, all of which are used by a typical employee on daily basis. The employee can now use one set of credentials to logon to all these applications and any preferences/settings modified at one location are reflects for all applications.&nbsp; When the employee is away from the corporate network, say on a flight, she can still continues to use her Client Application by logging on in the offline mode using the same credentials. Also, say an employee gets promoted to be a manager, all the enterprise needs to do is add her to the manager role on the server and now managerial data is available to her across all her web and client applications. </P>
<P>The heavy lifting involved in enabling the scenario above today lies in the underlying plumbing code; With Client Application Services in .NET 3.5 this plumbing is now taken care of by the framework itself, significantly boosting developer productivity.</P>
<P>Let’s walk through a scenario and see how easy it is to now add Web Settings support to your application -&nbsp; </P>
<P>Part 1: Create the web site – </P>
<P>1. In Orcas Beta2, Create a new ASP.NET Web Application </P>
<P>2. Set the authentication mode to Windows Authentication</P>
<P>&lt;authentication mode="windows"/&gt;</P>
<P>3. Fill in the profile section of the web.config.&nbsp; </P>
<P>&lt;profile enabled="true"&gt;</P>
<P>&lt;properties&gt;</P>
<P>&lt;add name="Text" type="string" readOnly="false" defaultValue="DefaultText" serializeAs="String" allowAnonymous="false"/&gt;</P>
<P>&lt;add name="Color" type="string" readOnly="false" defaultValue="white" serializeAs="String" allowAnonymous="false" /&gt;</P>
<P>&lt;/properties&gt;</P>
<P>&lt;/profile&gt;</P>
<P>4. Enable this property to be accessed via web services by adding this section to Web Config</P>
<P>&lt;system.web.extensions&gt;</P>
<P>&lt;scripting&gt;</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;webServices&gt;</P>
<P>&lt;profileService enabled="true" readAccessProperties="Text, Color" writeAccessProperties="Text, Color"/&gt;</P>
<P>Part 2: Create the Client Application – </P>
<P>1. Right click on the solution and add a new project (works the same for WPF or WinForms)</P>
<P>2. Right click on the new client project and select properties</P>
<P>3. In the Services tab, enable application services, select windows auth and fill in the services url for the Web Settings Service. For now it is the development server URL, in production this would be your ASP.NET web site.</P>
<P><A href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/saurabh/WindowsLiveWriter/.NETFramework.5ClientApplicationServices_C17F/clip_image004_2.jpg" original-url="https://blogs.msdn.com/blogfiles/saurabh/WindowsLiveWriter/.NETFramework.5ClientApplicationServices_C17F/clip_image004_2.jpg" mce_href="https://blogs.msdn.com/blogfiles/saurabh/WindowsLiveWriter/.NETFramework.5ClientApplicationServices_C17F/clip_image004_2.jpg"><IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=207 alt=clip_image004 src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/saurabh/WindowsLiveWriter/.NETFramework.5ClientApplicationServices_C17F/clip_image004_thumb.jpg" original-url="https://blogs.msdn.com/blogfiles/saurabh/WindowsLiveWriter/.NETFramework.5ClientApplicationServices_C17F/clip_image004_thumb.jpg" width=244 border=0 mce_src="https://blogs.msdn.com/blogfiles/saurabh/WindowsLiveWriter/.NETFramework.5ClientApplicationServices_C17F/clip_image004_thumb.jpg"></A></P>
<P>4. In the settings tab, click on “Load Web Settings” ... this will pull down all the metadata for the profile properties defined on the server for the Windows User you are currently working as. ( If you were using Forms Authentication in your Application you would be prompted by the designer to enter you Forms Credentials before being able to download the settings meta data)</P>
<P><A href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/saurabh/WindowsLiveWriter/.NETFramework.5ClientApplicationServices_C17F/clip_image006_2.jpg" original-url="https://blogs.msdn.com/blogfiles/saurabh/WindowsLiveWriter/.NETFramework.5ClientApplicationServices_C17F/clip_image006_2.jpg" mce_href="https://blogs.msdn.com/blogfiles/saurabh/WindowsLiveWriter/.NETFramework.5ClientApplicationServices_C17F/clip_image006_2.jpg"><IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=207 alt=clip_image006 src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/saurabh/WindowsLiveWriter/.NETFramework.5ClientApplicationServices_C17F/clip_image006_thumb.jpg" original-url="https://blogs.msdn.com/blogfiles/saurabh/WindowsLiveWriter/.NETFramework.5ClientApplicationServices_C17F/clip_image006_thumb.jpg" width=244 border=0 mce_src="https://blogs.msdn.com/blogfiles/saurabh/WindowsLiveWriter/.NETFramework.5ClientApplicationServices_C17F/clip_image006_thumb.jpg"></A></P>
<P>We are now ready to go!&nbsp; We can have strongly typed, async read-write access to your Web settings.&nbsp; These settings will stay in sync no matter where you change them (WinForms/WPF/Asp.Net/AJAX/Silverlight Application), they are reflected everywhere!</P>
<P>Examples:</P>
<P>Windows Forms code – </P>
<P>private void Form1_Load(object sender, EventArgs e)</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BackColor = Color.FromName(Properties.Settings.Default.Color);</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; private void button1_Click(object sender, EventArgs e)</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Properties.Settings.Default.Color = this.textBox1.Text;&nbsp;&nbsp; </P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BackColor = Color.FromName(Properties.Settings.Default.Color);</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Properties.Settings.Default.Save();</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</P>
<P><A href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/saurabh/WindowsLiveWriter/.NETFramework.5ClientApplicationServices_C17F/clip_image008_2.gif" original-url="https://blogs.msdn.com/blogfiles/saurabh/WindowsLiveWriter/.NETFramework.5ClientApplicationServices_C17F/clip_image008_2.gif" mce_href="https://blogs.msdn.com/blogfiles/saurabh/WindowsLiveWriter/.NETFramework.5ClientApplicationServices_C17F/clip_image008_2.gif"><IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=244 alt=clip_image008 src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/saurabh/WindowsLiveWriter/.NETFramework.5ClientApplicationServices_C17F/clip_image008_thumb.gif" original-url="https://blogs.msdn.com/blogfiles/saurabh/WindowsLiveWriter/.NETFramework.5ClientApplicationServices_C17F/clip_image008_thumb.gif" width=238 border=0 mce_src="https://blogs.msdn.com/blogfiles/saurabh/WindowsLiveWriter/.NETFramework.5ClientApplicationServices_C17F/clip_image008_thumb.gif"></A></P>
<P>ASP.NET Server side code – </P>
<P>function loadColor()</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Sys.Services.ProfileService.load(["Color"], loadCompleteCallback, loadSaveFailed, "");&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; function btnSaveColor()</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Sys.Services.ProfileService.properties["Color"] = document.form1.theColor.value;</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Sys.Services.ProfileService.save(null, saveCompleteCallback, loadSaveFailed, "");</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</P>
<P><A href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/saurabh/WindowsLiveWriter/.NETFramework.5ClientApplicationServices_C17F/clip_image010_2.jpg" original-url="https://blogs.msdn.com/blogfiles/saurabh/WindowsLiveWriter/.NETFramework.5ClientApplicationServices_C17F/clip_image010_2.jpg" mce_href="https://blogs.msdn.com/blogfiles/saurabh/WindowsLiveWriter/.NETFramework.5ClientApplicationServices_C17F/clip_image010_2.jpg"><IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=198 alt=clip_image010 src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/saurabh/WindowsLiveWriter/.NETFramework.5ClientApplicationServices_C17F/clip_image010_thumb.jpg" original-url="https://blogs.msdn.com/blogfiles/saurabh/WindowsLiveWriter/.NETFramework.5ClientApplicationServices_C17F/clip_image010_thumb.jpg" width=244 border=0 mce_src="https://blogs.msdn.com/blogfiles/saurabh/WindowsLiveWriter/.NETFramework.5ClientApplicationServices_C17F/clip_image010_thumb.jpg"></A></P>
<P>Source Code:</P>
<P>The attached sample code contains the above Client scenario enabled with additional Forms Authentication (Login/Logout), Roles and Offline support. </P>
<P>It also contains a Web Site with using the same Authentication and Profile service.</P>
<P>Additional Resources:</P>
<P>Web Application Services Overview …</P>
<P><A href="https://msdn2.microsoft.com/en-us/library/bb547119(VS.90).aspx#Examples" mce_href="https://msdn2.microsoft.com/en-us/library/bb547119(VS.90).aspx#Examples">https://msdn2.microsoft.com/en-us/library/bb547119(VS.90).aspx#Examples</A></P>
<P>Client Application Services Overview …</P>
<P><A href="https://msdn2.microsoft.com/en-us/library/bb384339(VS.90).aspx" mce_href="https://msdn2.microsoft.com/en-us/library/bb384339(VS.90).aspx">https://msdn2.microsoft.com/en-us/library/bb384339(VS.90).aspx</A></P>
<P>Client Application Services end to end walkthrough …</P>
<P><A href="https://blogs.msdn.com/winformsue/archive/2007/05/20/client-application-services-in-windows-forms-end-to-end-walkthrough-available.aspx" mce_href="https://blogs.msdn.com/winformsue/archive/2007/05/20/client-application-services-in-windows-forms-end-to-end-walkthrough-available.aspx">https://blogs.msdn.com/winformsue/archive/2007/05/20/client-application-services-in-windows-forms-end-to-end-walkthrough-available.aspx</A></P>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/08/51/50/38/ClientApplicationServices%20-%20Sample.zip" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-08-51-50-38/ClientApplicationServices-_2D00_-Sample.zip">ClientApplicationServices - Sample.zip</a></p>]]></content:encoded>
    </item>
    <item>
      <title>VS Live 2008 Orlando - Silverlight 2 Talk</title>
      <link>https://docs.microsoft.com/archive/blogs/saurabh/vs-live-2008-orlando-silverlight-2-talk</link>
      <pubDate>Tue, 13 May 2008 12:59:00 GMT</pubDate>
      <dc:creator><![CDATA[Saurabh]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/saurabh/2008/05/13/vs-live-2008-orlando-silverlight-2-talk/</guid>
      <description><![CDATA[Later today,&nbsp;I present @ VS Live the following talk ...
Building Rich Internet Application...]]></description>
      <content:encoded><![CDATA[<P>Later today,&nbsp;I present @ <A class="" title="VS Live Orlando 2008" href="https://vslive.com/2008/orlando/" mce_href="https://vslive.com/2008/orlando/">VS Live</A> the following talk ...</P>
<P><STRONG><A class="" id=vm12 title=vm12 name=vm12></A>Building Rich Internet Application using Microsoft Silverlight 2.0</STRONG><BR>In this session, we will build a Video Search Web Site using Silverlight 2.0. The session will demo – how to use Visual Studio to create a Sliverlight applications, how to create UI using XAML markup and code, how to retrieve data from a web service, how to manipulate &nbsp;data with XML and LINQ, how to persist user settings using local storage, how to interact with browser using HTML DOM, how to use the SL OpenFile dialog etc …</P>
<P>Attached are the Source code/Presentaion/DemoScript for the talk .</P>
<P>Guthrie’s Silverlight Tips, Tricks, Tutorials and Links Page are available <A class="" href="https://weblogs.asp.net/scottgu/pages/silverlight-posts.aspx" mce_href="https://weblogs.asp.net/scottgu/pages/silverlight-posts.aspx">here</A>.&nbsp;</P>
<P>The MIX sessions I referred to are available online <A class="" href="https://sessions.visitmix.com/" mce_href="https://sessions.visitmix.com/">here</A>.&nbsp;&nbsp;</P>
<P>In particular, the talk above was modeled after Joe Stegman and Mike Harsh's&nbsp;<A class="" href="https://sessions.visitmix.com/" mce_href="https://sessions.visitmix.com/"><FONT color=#006ff7>MIX 08 session</FONT></A> of the same name, the code for which is availabe <A class="" href="https://blogs.msdn.com/mharsh/archive/2008/03/05/slides-and-demos-from-my-mix-08-talk.aspx" mce_href="https://blogs.msdn.com/mharsh/archive/2008/03/05/slides-and-demos-from-my-mix-08-talk.aspx"><FONT color=#006ff7>here</FONT></A>.</P>
<P>The UX Skin that&nbsp;I demoed was created by Corrina and she has bloged about it <A class="" href="https://blogs.msdn.com/corrinab/archive/2008/03/24/a-new-control-skin-set.aspx" mce_href="https://blogs.msdn.com/corrinab/archive/2008/03/24/a-new-control-skin-set.aspx">here</A>.</P>
<P>The page demoing the Silverlight 2 Beta 1 controls is available <A class="" href="https://blogs.msdn.com/kathykam/archive/2008/03/05/silverlight-2-beta-1-control-samples.aspx" mce_href="https://blogs.msdn.com/kathykam/archive/2008/03/05/silverlight-2-beta-1-control-samples.aspx">here</A></P>
<P mce_keep="true">Enjoy !!!<BR></P>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/08/50/08/60/VS%20Live%20-%20Upload.zip" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-08-50-08-60/VS-Live-_2D00_-Upload.zip">VS Live - Upload.zip</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Avanade Tech Summit - Silverlight Talk</title>
      <link>https://docs.microsoft.com/archive/blogs/saurabh/avanade-tech-summit-silverlight-talk</link>
      <pubDate>Tue, 22 Apr 2008 16:46:00 GMT</pubDate>
      <dc:creator><![CDATA[Saurabh]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/saurabh/2008/04/22/avanade-tech-summit-silverlight-talk/</guid>
      <description><![CDATA[I am presenting at the Avanade Tech Summit in Seattle today on "Building a Rich Internet Application...]]></description>
      <content:encoded><![CDATA[<P>I am presenting at the Avanade Tech Summit in Seattle today on "Building a Rich Internet Application using Silverlight 2.0". Slides for the presentaion are attached to this post ...</P>
<P>The App I plan to build on stage is the same one Joe Stegman and Mike Harsh built during their <A class="" href="https://sessions.visitmix.com/" mce_href="https://sessions.visitmix.com/">MIX 08 session</A> of the same name, and the code for which is availabe <A class="" href="https://blogs.msdn.com/mharsh/archive/2008/03/05/slides-and-demos-from-my-mix-08-talk.aspx" mce_href="https://blogs.msdn.com/mharsh/archive/2008/03/05/slides-and-demos-from-my-mix-08-talk.aspx">here</A>.</P>
<P mce_keep="true">&nbsp;</P>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/08/41/72/21/AvanadeSLTalk.pptx" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-08-41-72-21/AvanadeSLTalk.pptx">AvanadeSLTalk.pptx</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Smart Client: Whats new in Orcas?</title>
      <link>https://docs.microsoft.com/archive/blogs/saurabh/smart-client-whats-new-in-orcas</link>
      <pubDate>Mon, 26 Mar 2007 06:43:00 GMT</pubDate>
      <dc:creator><![CDATA[Saurabh]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/saurabh/2007/03/26/smart-client-whats-new-in-orcas/</guid>
      <description><![CDATA[Am presenting the following talk at DevConnections today - 
VMS311:&nbsp;Smart Clients: What's New...]]></description>
      <content:encoded><![CDATA[<P>Am presenting the following talk at DevConnections today - </P>
<P><STRONG>VMS311:&nbsp;Smart Clients: What's New in Visual Studio "Orcas"?<BR></STRONG><A class="" href="https://blogs.msdn.com/saurabh" mce_href="https://blogs.msdn.com/saurabh"><STRONG>Saurabh&nbsp;Pant</STRONG></A><BR>Visual Studio "Orcas" is about making the rapid application development experience even easier. In this overview we will introduce new features that allow Smart Clients to go where they never have before: including Occasionally Connected Systems, SQL Server Compact Edition, Client App Services, N-Tier Data, ClickOnce Deployment enhancements, as well as out-of-the-box ways to future proof your existing applications: including Windows Forms / WPF Integration, and Vista enhancements. Add to that the designer productivity enhancements and see an exciting new wave of smart client development.&nbsp;&nbsp;</P>
<P>If you were at the session&nbsp;the side deck is attached to this post as promised. </P>
<P>As always feedback/thoughts are welcome. Feel free to contact me through this blog is you would like additional information on any of the technologies discussed.&nbsp;</P>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/01/95/14/39/NewInOrcas_DevConn07.pptx" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-01-95-14-39/NewInOrcas_5F00_DevConn07.pptx">NewInOrcas_DevConn07.pptx</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Live From Redmond: Client Application Services in Orcas</title>
      <link>https://docs.microsoft.com/archive/blogs/saurabh/live-from-redmond-client-application-services-in-orcas</link>
      <pubDate>Mon, 27 Nov 2006 16:15:00 GMT</pubDate>
      <dc:creator><![CDATA[Saurabh]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/saurabh/2006/11/27/live-from-redmond-client-application-services-in-orcas/</guid>
      <description><![CDATA[[Update]&nbsp;
My&nbsp;introductory post&nbsp;to Client Application Services is available here...]]></description>
      <content:encoded><![CDATA[<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Arial','sans-serif'">[Update]&nbsp;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Arial','sans-serif'">My&nbsp;introductory post&nbsp;to Client Application Services is available here <A href="https://blogs.msdn.com/saurabh/archive/2008/05/16/net-framework-3-5-client-application-services.aspx">https://blogs.msdn.com/saurabh/archive/2008/05/16/net-framework-3-5-client-application-services.aspx</A>&nbsp;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Arial','sans-serif'"></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Arial','sans-serif'">[Original Post]&nbsp;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Arial','sans-serif'">Continuing further along in with our "Live from Redmond" series I shall be presenting the following talk on Nov 27th ...</SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Arial','sans-serif'"><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Arial','sans-serif'">Have attached the&nbsp;slide deck from the talk. The actual presentation&nbsp;can be viewed online at any time through the registration link below.</SPAN></SPAN></P>
<P><SPAN><SPAN style="FONT-SIZE: 12pt"><FONT face=Arial><SPAN>Live From Redmond: Client Application Services in Orcas</SPAN>&nbsp;<STRONG>&nbsp;&nbsp;</STRONG></FONT></SPAN></SPAN></P>
<P><SPAN><SPAN style="FONT-SIZE: 12pt"></SPAN></SPAN><SPAN><SPAN style="FONT-SIZE: 12pt"><FONT face=Arial><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Arial','sans-serif'"><STRONG>27th Nov&nbsp;2006 </STRONG>[<A class="" title="Click here to register" href="https://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032312759&amp;EventCategory=4&amp;culture=en-US&amp;CountryCode=US" target=_blank mce_href="https://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032312759&amp;EventCategory=4&amp;culture=en-US&amp;CountryCode=US"><FONT color=#006ff7>Click&nbsp;here to register</FONT></A>]&nbsp;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Arial','sans-serif'"><SPAN id=eventInfo_lblEventDescription><SPAN style="FONT-SIZE: 12pt"><FONT face=Arial><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Arial','sans-serif'">Client Application Services&nbsp;are&nbsp;a new set of features in Orcas that&nbsp;enable application to authenticate users, get roles for the&nbsp;user and persisting&nbsp;user settings&nbsp;on a server.&nbsp;These&nbsp;Client Application Services work in conjugation with the Web Application Services&nbsp;for Authentication, Roles and Profiles also new in Orcas.&nbsp;Additionally these Client Application Services support Occasionally Connected Applications by supporting offline Authenticatoin, Roles and Profiles,&nbsp;where they work&nbsp;against a local cache instead of an online server.</SPAN><SPAN style="COLOR: blue"></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Arial','sans-serif'">This webcast will&nbsp;provide an introduction Client Application Services&nbsp;as well as examples of how&nbsp;to use the services in you own applications.</SPAN></P></FONT></SPAN></SPAN></SPAN></FONT></SPAN></SPAN>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/01/16/13/35/ClientApplicationServices%20MSDN%20Talk.ppt" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-01-16-13-35/ClientApplicationServices-MSDN-Talk.ppt">ClientApplicationServices MSDN Talk.ppt</a></p>]]></content:encoded>
    </item>
  </channel>
</rss>