<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;Ck4FQn4_cSp7ImA9WhdbFUw.&quot;"><id>tag:blogger.com,1999:blog-4545357743674820312</id><updated>2011-10-13T06:01:53.049-07:00</updated><title>Creating Rich Business Applications using Silverlight 4 and WCF RIA Services</title><subtitle type="html" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://wunnavabk.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://wunnavabk.blogspot.com/" /><author><name>Bhaskar Kiran</name><uri>http://www.blogger.com/profile/16733072221262765186</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>2</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/BhaskarsBlog" /><feedburner:info uri="bhaskarsblog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;AkcGRHo-fCp7ImA9WxBaEUs.&quot;"><id>tag:blogger.com,1999:blog-4545357743674820312.post-5428489839779311948</id><published>2010-03-21T03:40:00.000-07:00</published><updated>2010-03-21T03:40:25.454-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-21T03:40:25.454-07:00</app:edited><title>Implementing Avatar Login (Profile Picture)</title><content type="html">&lt;strong&gt;&lt;span style="font-size: large;"&gt;Creating Rich Business Applications using Silverlight 4 and WCF RIA Services- Part 2&lt;/span&gt;&lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4545357743674820312-5428489839779311948?l=wunnavabk.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/V6sKTEnhJJgw3bmEIMCHMMk6F3k/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/V6sKTEnhJJgw3bmEIMCHMMk6F3k/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/V6sKTEnhJJgw3bmEIMCHMMk6F3k/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/V6sKTEnhJJgw3bmEIMCHMMk6F3k/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/BhaskarsBlog/~4/Kf2I8DW2hvo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://wunnavabk.blogspot.com/feeds/5428489839779311948/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://wunnavabk.blogspot.com/2010/03/implementing-avatar-login-profile.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4545357743674820312/posts/default/5428489839779311948?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4545357743674820312/posts/default/5428489839779311948?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BhaskarsBlog/~3/Kf2I8DW2hvo/implementing-avatar-login-profile.html" title="Implementing Avatar Login (Profile Picture)" /><author><name>Bhaskar Kiran</name><uri>http://www.blogger.com/profile/16733072221262765186</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://wunnavabk.blogspot.com/2010/03/implementing-avatar-login-profile.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkcNSXs6fSp7ImA9WxBaEUs.&quot;"><id>tag:blogger.com,1999:blog-4545357743674820312.post-5978022023325020369</id><published>2010-03-02T00:12:00.001-08:00</published><updated>2010-03-21T03:41:38.515-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-21T03:41:38.515-07:00</app:edited><title>Creating Rich Business Applications using Silverlight 4 and WCF RIA Services- Part 1</title><content type="html">Usually in any organization it is a good practice that whatever the applications are developed (ASP.NET, Win Forms, etc), will follow N-tier Architecture. Even in Silverlight also we can create N-tier Architecture but till SL 3 it was simple and easy. &lt;br /&gt;
It seemed Implementing N-tier Architecture on SL 4 to be little difficult.&lt;br /&gt;
But I was wrong, with the help of Max, Colin Blair&amp;nbsp; and David’s Blogs I was able to create a very rich Business Class N-Tier Application, which I wish to Share with you People.&lt;br /&gt;
First of all I would like to thank each of them personally&lt;br /&gt;
Thanks to &lt;b&gt;Max Paulousky&lt;/b&gt; who wrote an &lt;a href="http://www.codeproject.com/KB/silverlight/SilverlightBASkeleton.aspx"&gt;article on Code Project&lt;/a&gt; for creating N-Tier Business Application using Silverlight 3 and .net RIA Services.&lt;br /&gt;
Thanks to &lt;b&gt;Colin Blair&lt;/b&gt; for his nice &lt;a href="http://www.riaservicesblog.com/Blog/post/RIA-Services-Enterprise-Business-Application-The-Movie.aspx"&gt;videos&lt;/a&gt; on creating N-Tier architecture in SL 4&lt;br /&gt;
Thanks to &lt;b&gt;David Rousset&lt;/b&gt; for &lt;a href="http://blogs.msdn.com/davrous/archive/2009/12/18/silverlight-4-tutorial-adding-avatar-support-to-the-wcf-ria-services-business-template.aspx"&gt;Avatar Login&lt;/a&gt;&lt;br /&gt;
&lt;b&gt;Prerequisites:&lt;/b&gt; you’ll need Visual Studio 2010 Beta 2, Silverlight 4 Beta &amp;amp; WCF RIA Services in order to follow this tutorial or load the final project. You can find all the needed resources here: &lt;a href="http://silverlight.net/getstarted/silverlight-4-beta/#tools"&gt;http://silverlight.net/getstarted/silverlight-4-beta/#tools&lt;/a&gt;&lt;br /&gt;
&lt;b&gt;Power Commands for VS 2010&lt;/b&gt;: &lt;a href="http://visualstudiogallery.msdn.microsoft.com/en-us/e5f41ad9-4edc-4912-bca3-91147db95b99"&gt;http://visualstudiogallery.msdn.microsoft.com/en-us/e5f41ad9-4edc-4912-bca3-91147db95b99&lt;/a&gt;&lt;br /&gt;
Now let’s get started.&lt;br /&gt;
This Solution has 3 parts:&lt;br /&gt;
&lt;b&gt;1) &lt;/b&gt;&lt;b&gt;Creating N-Tier Architecture &lt;/b&gt;&lt;br /&gt;
&lt;b&gt;2) &lt;/b&gt;&lt;b&gt;Implementing Avatar Login (Profile Picture)&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;3) &lt;/b&gt;&lt;b&gt;CRUD Operations Using RIA Domain Services&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;I) &lt;/b&gt;&lt;b&gt;Creating N-Tier Architecture&lt;/b&gt;&lt;br /&gt;
Usually when we see any Web / Windows Application Solutions, they use specific Architecture like 2-tier, 3-tier etc. where the Project components are separated from the main application. &lt;br /&gt;
Likewise, we can also construct our Silverlight Application Structure, for this solution I will use 3-tier Architecture.&lt;br /&gt;
My Solution is classified as below:&lt;br /&gt;
&lt;i&gt;i) &lt;/i&gt;&lt;i&gt;Silverlight Client Project&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;ii) &lt;/i&gt;&lt;i&gt;ASP.Net project to host Silverlight Client&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;iii) &lt;/i&gt;&lt;i&gt;Business Layer for ASP.Net Project&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;iv) &lt;/i&gt;&lt;i&gt;Business Layer for Silverlight Project&lt;/i&gt;&lt;br /&gt;
So let’s create our project.&lt;br /&gt;
Fire-up our Visual Studio 2010&lt;br /&gt;
&lt;br /&gt;
Click on New Project, in the new Project Window select Silverlight Business Application.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://lh4.ggpht.com/_urEBX6tBl5U/S47MV3oGiwI/AAAAAAAAB9k/fy6HfQSZZHI/s1600-h/image%5B6%5D.png"&gt;&lt;img alt="image" border="0" height="339" src="http://lh4.ggpht.com/_urEBX6tBl5U/S4zIVvklYqI/AAAAAAAAB80/HjoO9f361zg/image_thumb%5B6%5D.png?imgmax=800" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: block; float: none; margin: 0px auto;" title="image" width="516" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://lh4.ggpht.com/_urEBX6tBl5U/S47MV3oGiwI/AAAAAAAAB9s/8BBLIz3IC8g/s1600-h/image%5B4%5D.png"&gt;&lt;/a&gt;&lt;br /&gt;
Note: we are using the Default Business Application Template to create the Solution and then we will transform it into &lt;a href="http://lh6.ggpht.com/_urEBX6tBl5U/S4zIWvhH66I/AAAAAAAAB60/4dRqNRvuodU/s1600-h/image10.png"&gt;&lt;img align="right" alt="image" border="0" height="345" src="http://lh3.ggpht.com/_urEBX6tBl5U/S4zIXKsijgI/AAAAAAAAB64/ZjV6y1IJYzw/image_thumb6.png?imgmax=800" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; margin-left: 0px; margin-right: 0px;" title="image" width="170" /&gt;&lt;/a&gt;our requirement.&lt;br /&gt;
&lt;br /&gt;
Provide the desired Project Name, Location and Solution Name and hit ok&lt;br /&gt;
Now our VS will create our Solution, Initially our Solution will have 2 Projects&lt;br /&gt;
1) Silverlight Client Application (BApp.Silverlight)&lt;br /&gt;
2) ASP.net Web Application which Will host our SL Client Application (BApp.Silverlight.Web)&lt;br /&gt;
By default our Visual Studio SL Template will provide Authentication Service, Login Screen, User Registration screen etc.&lt;br /&gt;
But this is not what we want; we want to customize our Application Structure, so let’s take the help of WCF RIA SERVICES to implement our Application Structure&lt;br /&gt;
Note: WCF RIA SERVICES is nothing but our old .NET RIA SERVICES. From SL 4 onwards RIA Services will implement WCF techniques to make the Server Call Secured and Much faster using Async Calls.&lt;br /&gt;
&lt;b&gt;Don’t forget to build your Application for some required Auto-Generated code&lt;/b&gt;&lt;br /&gt;
Ok let’s fire-up our Add new Project window by Right Clicking on the Solution and Add-&amp;gt;New Project (or File Menu-&amp;gt;Add-&amp;gt;New Project) and Select WCF RIA services Class Library&lt;br /&gt;
&lt;br /&gt;
Name the Project as BApp.AppServices and hit ok&lt;br /&gt;
Our VS will create 2 more projects&lt;br /&gt;
1) Silverlight Enabled Class Library(BApp.AppServices)&lt;br /&gt;
2) Class Library(BApp.AppServices.Web)&lt;br /&gt;
&lt;a href="http://lh5.ggpht.com/_urEBX6tBl5U/S4zIYIYAcbI/AAAAAAAAB9Q/9Du_tf9AeOs/s1600-h/image11%5B2%5D.png"&gt;&lt;img alt="image" border="0" height="239" src="http://lh3.ggpht.com/_urEBX6tBl5U/S4zIYjLw07I/AAAAAAAAB9Y/Gh69AgD4ugg/image11_thumb.png?imgmax=800" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline; margin-left: 0px; margin-right: 0px;" title="image" width="442" /&gt;&lt;/a&gt;&lt;a href="http://lh5.ggpht.com/_urEBX6tBl5U/S4zIYIYAcbI/AAAAAAAAB9Q/9Du_tf9AeOs/s1600-h/image11%5B2%5D.png"&gt;&lt;/a&gt;&lt;br /&gt;
Once the Project is created delete the Unwanted Class files from both the projects. Our solution should look like this&lt;br /&gt;
Now Move Models, Resources and Services Folders from BApp.Silverlight.Web to BApp.AppServices.Web&lt;br /&gt;
Copy all the References of BApp.Silverlight.Web to BApp.AppServices.Web.&lt;br /&gt;
&lt;span style="color: red;"&gt;Note: Once we install Power Commands for VS2010 we will get one handy utility in the context menu to copy and Paste the references.&lt;/span&gt; &lt;br /&gt;
&lt;a href="http://lh6.ggpht.com/_urEBX6tBl5U/S4zIZ2lWz8I/AAAAAAAAB7o/mqynxPqgV6s/s1600-h/image242.png"&gt;&lt;img align="right" alt="image" border="0" height="352" src="http://lh5.ggpht.com/_urEBX6tBl5U/S4zIam4aNcI/AAAAAAAAB7w/bD8vm2ZmbL4/image24_thumb1.png?imgmax=800" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; margin: 0px;" title="image" width="156" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://lh6.ggpht.com/_urEBX6tBl5U/S4zOqNC90UI/AAAAAAAAB70/nT9LQupWkhw/s1600-h/image153.png"&gt;&lt;img align="right" alt="image" border="0" height="353" src="http://lh4.ggpht.com/_urEBX6tBl5U/S4zIZdjic-I/AAAAAAAAB74/Sl75cpvkyXU/image15_thumb2.png?imgmax=800" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; margin: 0px;" title="image" width="158" /&gt;&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now Open any class file in BApp.AppServices.Web and Change the Namespace of all the Files in the Project from BApp.Silverlight.Web to BApp.AppServices.Web (using Quick Replace Ctrl + H).&lt;a href="http://lh5.ggpht.com/_urEBX6tBl5U/S4zOrU_jp7I/AAAAAAAAB8A/llvFov6H-D8/s1600-h/image8.png"&gt;&lt;img align="right" alt="image" border="0" height="211" src="http://lh6.ggpht.com/_urEBX6tBl5U/S4zOr5PiroI/AAAAAAAAB8E/YQal_0k7Lmc/image_thumb3.png?imgmax=800" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; margin-left: 0px; margin-right: 0px;" title="image" width="244" /&gt;&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And even in the Using Section’s also&lt;a href="http://lh4.ggpht.com/_urEBX6tBl5U/S4zOsZQOd0I/AAAAAAAAB8I/O8bmHIPm81k/s1600-h/image12.png"&gt;&lt;img align="right" alt="image" border="0" height="211" src="http://lh6.ggpht.com/_urEBX6tBl5U/S4zOtImxwrI/AAAAAAAAB8M/bYwiAsuWD9Q/image_thumb5.png?imgmax=800" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; margin-left: 0px; margin-right: 0px;" title="image" width="244" /&gt;&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now our ASP.net Project Changes are completed except clearing the Unwanted Files (that we will do later). Let’s move on to our Silverlight Client Changes.&lt;br /&gt;
Copy Assets, Helpers, Models, Web folders of BApp.Silverlight to BApp.AppServices project.&lt;br /&gt;
Now delete &lt;br /&gt;
a) &lt;b&gt;&lt;i&gt;&lt;span style="color: red;"&gt;Style.xaml&lt;/span&gt;&lt;/i&gt;&lt;/b&gt; from Assets folder in BApp.AppServices Project.&lt;br /&gt;
b) All the .CS files from Helpers Folder except &lt;b&gt;&lt;i&gt;&lt;span style="color: #ff8080;"&gt;ResourceWrapper.cs&lt;/span&gt;&lt;/i&gt;&lt;/b&gt; in BApp.AppServices Project.&lt;br /&gt;
Now Change the Namespace and Using sections to BApp.AppServices instead of BApp.Silverlight.&lt;br /&gt;
&lt;br /&gt;
Here is the Most Tricky Part. &lt;br /&gt;
It’s kind of a bug in Visual Studio 2010 B2 when we copy the Web folder from BApp.Silverlight to BApp.AppServices the project files won’t update automatically to accommodate the Resources References so we have to do it manually.&lt;br /&gt;
To do that we have to take our Projects (BApp.Silverlight and BApp.AppServices) offline and Edit the Project Files.&lt;br /&gt;
To do this right click on the BApp.AppServices Project and select Edit Project file in the context Menu. And change all resource includes&lt;br /&gt;
Include="..\bapp.Silverlight.web\resources\ErrorResources.Designer.cs"&amp;gt;&lt;br /&gt;
To&lt;br /&gt;
Include="..\bapp.AppServices.web\resources\ErrorResources.Designer.cs"&amp;gt;&lt;br /&gt;
Now we have to create a wrapper for our WebContext to do so Add a new Class in our BApp.AppServices project name it as WebContext and paste the Below Code&lt;br /&gt;
&lt;code&gt;&lt;/code&gt;&lt;br /&gt;
namespace BApp.AppServices&lt;br /&gt;
{&lt;br /&gt;
using System;&lt;br /&gt;
using System.Collections.Generic;&lt;br /&gt;
using System.ComponentModel;&lt;br /&gt;
using System.ComponentModel.DataAnnotations;&lt;br /&gt;
using System.Linq;&lt;br /&gt;
using System.Web.Ria.Data;&lt;br /&gt;
using System.Windows.Ria;&lt;br /&gt;
using System.Windows.Ria.Services;&lt;br /&gt;
using BApp.AppServices.Web;&lt;br /&gt;
/// &amp;lt;summary&amp;gt;&lt;br /&gt;
/// Context for the RIA application.&lt;br /&gt;
/// &amp;lt;/summary&amp;gt;&lt;br /&gt;
/// &amp;lt;remarks&amp;gt;&lt;br /&gt;
/// This context extends the base to make application services and types available&lt;br /&gt;
/// for consumption from code and xaml.&lt;br /&gt;
/// &amp;lt;/remarks&amp;gt;&lt;br /&gt;
public sealed partial class WebContext : WebContextBase&lt;br /&gt;
{&lt;br /&gt;
#region Extensibility Method Definitions&lt;br /&gt;
/// &amp;lt;summary&amp;gt;&lt;br /&gt;
/// This method is invoked from the constructor once initialization is complete and&lt;br /&gt;
/// can be used for further object setup.&lt;br /&gt;
/// &amp;lt;/summary&amp;gt;&lt;br /&gt;
partial void OnCreated();&lt;br /&gt;
#endregion&lt;br /&gt;
/// &amp;lt;summary&amp;gt;&lt;br /&gt;
/// Initializes a new instance of the WebContext class.&lt;br /&gt;
/// &amp;lt;/summary&amp;gt;&lt;br /&gt;
public WebContext()&lt;br /&gt;
{&lt;br /&gt;
this.OnCreated();&lt;br /&gt;
}&lt;br /&gt;
/// &amp;lt;summary&amp;gt;&lt;br /&gt;
/// Gets the context that is registered as a lifetime object with the current application.&lt;br /&gt;
/// &amp;lt;/summary&amp;gt;&lt;br /&gt;
/// &amp;lt;exception cref="InvalidOperationException"&amp;gt; is thrown if there is no current application,&lt;br /&gt;
/// no contexts have been added, or more than one context has been added.&lt;br /&gt;
/// &amp;lt;/exception&amp;gt;&lt;br /&gt;
/// &amp;lt;seealso cref="Application.ApplicationLifetimeObjects"/&amp;gt;&lt;br /&gt;
public new static WebContext Current&lt;br /&gt;
{&lt;br /&gt;
get&lt;br /&gt;
{&lt;br /&gt;
return ((WebContext)(WebContextBase.Current));&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
/// &amp;lt;summary&amp;gt;&lt;br /&gt;
/// Gets a user representing the authenticated identity.&lt;br /&gt;
/// &amp;lt;/summary&amp;gt;&lt;br /&gt;
public new User User&lt;br /&gt;
{&lt;br /&gt;
get&lt;br /&gt;
{&lt;br /&gt;
return ((User)(base.User));&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Now we can get rid of all unwanted things from our ASP.net Application and our Silverlight Client by deleting the Folders Models, Resources and Services in Asp.net Application and Compare and delete the files which are existing in BApp.AppServices from BApp.Silverlight&lt;br /&gt;
Make the Default.aspx file to Host the Silverlight Client Application by copying the HTML Markup of BApp.SilverlightTes&lt;a href="http://lh3.ggpht.com/_urEBX6tBl5U/S4zOujvwH_I/AAAAAAAAB8Y/AomUO1qu_9E/s1600-h/image%5B5%5D.png"&gt;&lt;img align="right" alt="image" border="0" height="251" src="http://lh5.ggpht.com/_urEBX6tBl5U/S4zOvISYJ4I/AAAAAAAAB8c/IiqVLSIUzWc/image_thumb%5B3%5D.png?imgmax=800" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; margin-left: 0px; margin-right: 0px;" title="image" width="331" /&gt;&lt;/a&gt;tPage.html and set as start up file.&lt;br /&gt;
So that we don’t need to keep more files in our ASP.Net Application. &lt;br /&gt;
Our solution should look like this.&lt;br /&gt;
Now add reference to BApp.AppServices to BApp.Silverlight, &lt;br /&gt;
BApp.AppServices.Web to BApp.Silverlight.Web &lt;br /&gt;
And remove the .net RIA services Link in BApp.Silverlight.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Make Necessary changes in the Namespaces and Using Sections in our Silverlight Client. And Clear all the errors by adding Namespaces in the Using Sections in all the XAML Pages&lt;a href="http://lh4.ggpht.com/_urEBX6tBl5U/S4zOvxAsdvI/AAAAAAAAB8g/6ad5VW5bDp8/s1600-h/image%5B10%5D.png"&gt;&lt;img align="right" alt="image" border="0" height="193" src="http://lh4.ggpht.com/_urEBX6tBl5U/S4zOwSg2HFI/AAAAAAAAB8k/x8wpwSwX4I8/image_thumb%5B6%5D.png?imgmax=800" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; margin-left: 0px; margin-right: 0px;" title="image" width="350" /&gt;&lt;/a&gt; &lt;br /&gt;
There will be an error regarding Actual Password&lt;br /&gt;
&lt;br /&gt;
&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;, &amp;quot;sans-serif&amp;quot;;"&gt;To rectify that error go to RegistrationDataExtensions.cs file in BApp.AppServices Models folder and change the property &lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0pt; mso-layout-grid-align: none;"&gt;&lt;span style="font-family: consolas; font-size: 9.5pt;"&gt;[&lt;span style="color: #2b91af;"&gt;Display&lt;/span&gt;(AutoGenerateField = &lt;span style="color: blue;"&gt;false&lt;/span&gt;)] &lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0pt; mso-layout-grid-align: none;"&gt;&lt;span style="color: blue; font-family: consolas; font-size: 9.5pt;"&gt;internal&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 9.5pt;"&gt; &lt;span style="color: blue;"&gt;string&lt;/span&gt; ActualPassword { &lt;span style="color: blue;"&gt;get&lt;/span&gt;; &lt;span style="color: blue;"&gt;set&lt;/span&gt;; } &lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;, &amp;quot;sans-serif&amp;quot;;"&gt;to &lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0pt; mso-layout-grid-align: none;"&gt;&lt;span style="font-family: consolas; font-size: 9.5pt;"&gt;[&lt;span style="color: #2b91af;"&gt;Display&lt;/span&gt;(AutoGenerateField = &lt;span style="color: blue;"&gt;false&lt;/span&gt;)] &lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0pt; mso-layout-grid-align: none;"&gt;&lt;span style="color: blue; font-family: consolas; font-size: 9.5pt;"&gt;public&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 9.5pt;"&gt; &lt;span style="color: blue;"&gt;string&lt;/span&gt; ActualPassword { &lt;span style="color: blue;"&gt;get&lt;/span&gt;; &lt;span style="color: blue;"&gt;set&lt;/span&gt;; } &lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;, &amp;quot;sans-serif&amp;quot;;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;, &amp;quot;sans-serif&amp;quot;;"&gt;We have to make a major change in App.XAML in order to AuthenticationContext to talk with our Silverlight client &lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0pt; mso-layout-grid-align: none;"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;, &amp;quot;sans-serif&amp;quot;;"&gt;First Navigate to APP.XAML.CS file in BApp.Silverlight and Add below line in Application_Startup method &lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0pt; mso-layout-grid-align: none;"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;, &amp;quot;sans-serif&amp;quot;;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0pt; mso-layout-grid-align: none;"&gt;&lt;span style="font-family: consolas; font-size: 9.5pt;"&gt;((&lt;span style="color: #2b91af;"&gt;WebAuthenticationService&lt;/span&gt;)&lt;span style="color: #2b91af;"&gt;WebContext&lt;/span&gt;.Current.Authentication).DomainContext = &lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;AuthenticationContext&lt;/span&gt;(); &lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0pt; mso-layout-grid-align: none;"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;, &amp;quot;sans-serif&amp;quot;;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0pt; mso-layout-grid-align: none;"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;, &amp;quot;sans-serif&amp;quot;;"&gt;Below this line &lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0pt; mso-layout-grid-align: none;"&gt;&lt;span style="color: blue; font-family: consolas; font-size: 9.5pt;"&gt;this&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 9.5pt;"&gt;.Resources.Add(&lt;span style="color: #a31515;"&gt;"WebContext"&lt;/span&gt;, &lt;span style="color: #2b91af;"&gt;WebContext&lt;/span&gt;.Current); &lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0pt; mso-layout-grid-align: none;"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;, &amp;quot;sans-serif&amp;quot;;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0pt; mso-layout-grid-align: none;"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;, &amp;quot;sans-serif&amp;quot;;"&gt;Your Code should look like &lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0pt; mso-layout-grid-align: none;"&gt;&lt;span style="color: blue; font-family: consolas; font-size: 9.5pt;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0pt; mso-layout-grid-align: none;"&gt;&lt;span style="color: blue; font-family: consolas; font-size: 9.5pt;"&gt;this&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 9.5pt;"&gt;.Resources.Add(&lt;span style="color: #a31515;"&gt;"WebContext"&lt;/span&gt;, &lt;span style="color: #2b91af;"&gt;WebContext&lt;/span&gt;.Current); &lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0pt; mso-layout-grid-align: none;"&gt;&lt;span style="font-family: consolas; font-size: 9.5pt;"&gt;((&lt;span style="color: #2b91af;"&gt;WebAuthenticationService&lt;/span&gt;)&lt;span style="color: #2b91af;"&gt;WebContext&lt;/span&gt;.Current.Authentication).DomainContext = &lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;AuthenticationContext&lt;/span&gt;(); &lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;, &amp;quot;sans-serif&amp;quot;;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;, &amp;quot;sans-serif&amp;quot;;"&gt;Now go to APP.XAML file and replace your &lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0pt; mso-layout-grid-align: none;"&gt;&lt;span style="color: blue; font-family: consolas; font-size: 9.5pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515; font-family: consolas; font-size: 9.5pt;"&gt;Application.ApplicationLifetimeObjects&lt;/span&gt;&lt;span style="color: blue; font-family: consolas; font-size: 9.5pt;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;, &amp;quot;sans-serif&amp;quot;;"&gt; section with &lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: blue; font-family: consolas; font-size: 9.5pt;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0pt; mso-layout-grid-align: none;"&gt;&lt;span style="color: blue; font-family: consolas; font-size: 9.5pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515; font-family: consolas; font-size: 9.5pt;"&gt;Application.ApplicationLifetimeObjects&lt;/span&gt;&lt;span style="color: blue; font-family: consolas; font-size: 9.5pt;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 9.5pt;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0pt; mso-layout-grid-align: none;"&gt;&lt;span style="color: #a31515; font-family: consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: consolas; font-size: 9.5pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515; font-family: consolas; font-size: 9.5pt;"&gt;appServices&lt;/span&gt;&lt;span style="color: blue; font-family: consolas; font-size: 9.5pt;"&gt;:&lt;/span&gt;&lt;span style="color: #a31515; font-family: consolas; font-size: 9.5pt;"&gt;WebContext&lt;/span&gt;&lt;span style="color: blue; font-family: consolas; font-size: 9.5pt;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 9.5pt;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0pt; mso-layout-grid-align: none;"&gt;&lt;span style="color: #a31515; font-family: consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: consolas; font-size: 9.5pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515; font-family: consolas; font-size: 9.5pt;"&gt;appServices&lt;/span&gt;&lt;span style="color: blue; font-family: consolas; font-size: 9.5pt;"&gt;:&lt;/span&gt;&lt;span style="color: #a31515; font-family: consolas; font-size: 9.5pt;"&gt;WebContext.Authentication&lt;/span&gt;&lt;span style="color: blue; font-family: consolas; font-size: 9.5pt;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 9.5pt;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0pt; mso-layout-grid-align: none;"&gt;&lt;span style="color: #a31515; font-family: consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: consolas; font-size: 9.5pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515; font-family: consolas; font-size: 9.5pt;"&gt;appsvc&lt;/span&gt;&lt;span style="color: blue; font-family: consolas; font-size: 9.5pt;"&gt;:&lt;/span&gt;&lt;span style="color: #a31515; font-family: consolas; font-size: 9.5pt;"&gt;FormsAuthentication&lt;/span&gt;&lt;span style="color: blue; font-family: consolas; font-size: 9.5pt;"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 9.5pt;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0pt; mso-layout-grid-align: none;"&gt;&lt;span style="color: #a31515; font-family: consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: consolas; font-size: 9.5pt;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515; font-family: consolas; font-size: 9.5pt;"&gt;appServices&lt;/span&gt;&lt;span style="color: blue; font-family: consolas; font-size: 9.5pt;"&gt;:&lt;/span&gt;&lt;span style="color: #a31515; font-family: consolas; font-size: 9.5pt;"&gt;WebContext.Authentication&lt;/span&gt;&lt;span style="color: blue; font-family: consolas; font-size: 9.5pt;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 9.5pt;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0pt; mso-layout-grid-align: none;"&gt;&lt;span style="color: #a31515; font-family: consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: consolas; font-size: 9.5pt;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515; font-family: consolas; font-size: 9.5pt;"&gt;appServices&lt;/span&gt;&lt;span style="color: blue; font-family: consolas; font-size: 9.5pt;"&gt;:&lt;/span&gt;&lt;span style="color: #a31515; font-family: consolas; font-size: 9.5pt;"&gt;WebContext&lt;/span&gt;&lt;span style="color: blue; font-family: consolas; font-size: 9.5pt;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 9.5pt;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0pt; mso-layout-grid-align: none;"&gt;&lt;span style="color: #a31515; font-family: consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: consolas; font-size: 9.5pt;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515; font-family: consolas; font-size: 9.5pt;"&gt;Application.ApplicationLifetimeObjects&lt;/span&gt;&lt;span style="color: blue; font-family: consolas; font-size: 9.5pt;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 9.5pt;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0pt; mso-layout-grid-align: none;"&gt;&lt;span style="font-family: consolas; font-size: 9.5pt;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;, &amp;quot;sans-serif&amp;quot;;"&gt;And Register (reference) your AppServices project by adding the below lines &lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0pt; mso-layout-grid-align: none;"&gt;&lt;span style="color: red; font-family: consolas; font-size: 9.5pt;"&gt;xmlns&lt;/span&gt;&lt;span style="color: blue; font-family: consolas; font-size: 9.5pt;"&gt;:&lt;/span&gt;&lt;span style="color: red; font-family: consolas; font-size: 9.5pt;"&gt;appServices&lt;/span&gt;&lt;span style="color: blue; font-family: consolas; font-size: 9.5pt;"&gt;="clr-namespace:BApp.AppServices;assembly=BApp.AppServices" &lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0pt; mso-layout-grid-align: none;"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;, &amp;quot;sans-serif&amp;quot;;"&gt;Replace the existing xmlns:res with the below one &lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0pt; mso-layout-grid-align: none;"&gt;&lt;span style="color: red; font-family: consolas; font-size: 9.5pt;"&gt;xmlns&lt;/span&gt;&lt;span style="color: blue; font-family: consolas; font-size: 9.5pt;"&gt;:&lt;/span&gt;&lt;span style="color: red; font-family: consolas; font-size: 9.5pt;"&gt;res&lt;/span&gt;&lt;span style="color: blue; font-family: consolas; font-size: 9.5pt;"&gt;="clr-namespace:BApp.AppServices.Resources;assembly=BApp.AppServices" &lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;, &amp;quot;sans-serif&amp;quot;;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;, &amp;quot;sans-serif&amp;quot;;"&gt;That’s it. Our application is ready for the First Run. &lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;, &amp;quot;sans-serif&amp;quot;;"&gt;Note: When we run our project it will Use the ASPNET database for Authentication and registration of new users. For using our own database for Authentication along with CRUD operations Please navigate to Part 2 of this Blog. &lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4545357743674820312-5978022023325020369?l=wunnavabk.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/xIoCwX9MUJMYyPf8vNytxXpqass/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/xIoCwX9MUJMYyPf8vNytxXpqass/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/xIoCwX9MUJMYyPf8vNytxXpqass/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/xIoCwX9MUJMYyPf8vNytxXpqass/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/BhaskarsBlog/~4/iBwuHzhNDVc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://wunnavabk.blogspot.com/feeds/5978022023325020369/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://wunnavabk.blogspot.com/2010/03/creating-rich-business-applications_02.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4545357743674820312/posts/default/5978022023325020369?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4545357743674820312/posts/default/5978022023325020369?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BhaskarsBlog/~3/iBwuHzhNDVc/creating-rich-business-applications_02.html" title="Creating Rich Business Applications using Silverlight 4 and WCF RIA Services- Part 1" /><author><name>Bhaskar Kiran</name><uri>http://www.blogger.com/profile/16733072221262765186</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/_urEBX6tBl5U/S4zIVvklYqI/AAAAAAAAB80/HjoO9f361zg/s72-c/image_thumb%5B6%5D.png?imgmax=800" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://wunnavabk.blogspot.com/2010/03/creating-rich-business-applications_02.html</feedburner:origLink></entry></feed>

