WCF RIA Services
Guide deploying RIA Services Solutions
Usernames and roles inn Silverlight Applications
Authentication, Roles and Profiles
Walkthrough:Using Authentication Service with Silverlight Business Application
Install RIA Services on the Web Server
The RIA Services assemblies must be available on the Web server. It is recommended that RIA Services be installed on the Web server that will host your application. If this is not an option, due to lack of permissions or some other issue, you can also make them available on the Web server by either including them in the bin folder of your project when it is published or by installing them in the global assembly cache (GAC).
- Bin Deployment
When deploying your application, one option is to include the RIA Services assemblies in the bin folder of your project. To do this with in Visual Studio, you must select each of the Web project assembly references in the Solution Explorer that must be included and set the Copy Local property to True in the Properties window. The two assemblies that must always be included are
Setting these property values to True results in the assemblies getting copied to the bin folder the next time you build the solution. When the assemblies are copied to the bin folder, they will be copied to the Web server when you publish the site.
- If you are using Entity Framework to access a database, then you will also need to add a reference to the System.ServiceModel.DomainServices.EntityFramework.dll assembly.
- If you are using LINQ to SQL to access data, then you will need to add a reference to the Microsoft.ServiceModel.DomainServices.LinqToSql.dll assembly.
- GAC Deployment
Instead of copying the RIA Services assemblies in the Bin folder of every project that uses them, you can install the assemblies in the GAC. Any assemblies in the GAC are available to every application on the server. This approach is easier to maintain because an assembly only needs to be updated in the GAC instead of every Bin folder.
To install the RIA Services assemblies in the GAC on a Web server, run the following command.
msiexec /i RiaServices.msi SERVER=TRUE
empty lines and comments are excluded
(dir -include *.cs -recurse | select-string "^(\s*)//" -notMatch | select-string "^(\s*)$" -notMatch).Count
Brief description of what all parts are doing:
- dir -include *.cs -recurse : Lists all *.cs files, you can add additional extensions using a comma.
- select-string “^(\s*)//” -notMatch : Exclude comments.
- select-string “^(\s*)$” -notMatch : Exclude empty lines.