WCF Ria services

Source: Internet
Author: User
Tags to domain visual studio 2010

Http://msdn.microsoft.com/zh-cn/library/ee707344 (V = vs.91). aspx

 

Solution to problems encountered during debugging:

View code

1 , Submit operation failed. An error occurred while updating entries. For more information, see internal exceptions. Innerexception message: cannot have a unique index ' Ak_employee_loginid ' Of

Image'HumanResources. Employee'Insert duplicate key rows.
The statement has been terminated.
Cause:

Employee. managerid is a foreign key and is associated with other tables. Therefore, you need to assign a value to it.
As follows:
Modify the following items in the organizationservice. CS file of hrapp. Web. csproj:

Public VoidInsertemployee (employee)
{
,,,
Employee. managerid= 288;
...
}

2, Cannot register a user
The error message "cannot connect to the Database" is displayed.
If the connection string is configured, modify the following items in the web. config file of hrapp. Web. csproj:

<! -- < Add name = " Applicationservices " Connectionstring = " Data Source =. \ sqlexpress; Integrated Security = sspi; attachdbfilename = | datadirectory | \ aspnetdb. MDF; user instance = true " Providername = " System. Data. sqlclient "   /> -->
To:
< Add name = " Applicationservices " Connectionstring = " Data Source = yoursqlserver; initial catalog = aspnetdb; user id = sa; Password = yourpwd "   />

If your SQL database does not have aspnetdb, run"C: \ windows \ Microsoft. NET \ framework \ v2.0.50727 \ aspnet_regsql.exe", Which is created through the ASP. net SQL Server Installation Wizard.

 

WCF Ria services WCF Ria services

WCF Ria services simplifiesProgram(RIA) deployment of the N-layer solution (for example, Silverlight application. A common problem in developing a n-layer Ria solution is to coordinate the application logic between the middle layer and the presentation layer. To create the best user experience, you want your RIA Services Client to know the application logic residing on the server, but do not want to develop or maintain the application logic on both the presentation layer and the middle layer. Ria services solves the preceding problems by providing the application logic on the server for the RIA Services Client, but you do not need to manually copy the framework components, tools, and services of the programming logic. You can create an RIA Services Client that knows the business rules and automatically updates the client each time you recompile the solution using the latest intermediate layer logic.

Displays a simplified N-tier application. Ria services defines the boxes between the presentation layer and the data access layer (DAL) to simplify layer-N deployment using the RIA Services Client.

 

Ria services adds tools to Visual Studio 2010 to allow you to link client and server projects in a single solution, andCodeGenerate code for the client project. The framework component supports descriptive patterns used to write application logic so that the application logic can be reused on the presentation layer. Provides services for common solutions (such as identity authentication and user settings management) to shorten development time.

WCF Integration

In Ria services, add a domain service to publish data from a server project to a client project. The RIA services framework implements each domain service as a Windows Communication Foundation (WCF) service. Therefore, you can apply the concept from the WCF Service to the domain service during custom configuration. For more information, see domain service.

Security of the RIA services Solution

To ensure that your application can properly handle security issues related to public domain services, you must carefully consider how to implement domain services. For more information, see Security of WCF Ria services.

Tools and documentation

In addition to correctly installing and configuring Visual Studio 2010, Silverlight developer runtime, SDK, and other essential programs, it is also required that the WCF Ria services and the WCF Ria services toolkit be correctly installed and configured to perform drills according to the drill and operation guide topics. These rehearsals also require the installation and configuration of SQL Server 2008 R2 express with advanced services and the installation of adventureworks OLTP and Lt databases.

For a detailed description of the required programs, see topics in the required node of the WCF Ria services. Before continuing this drill, follow the instructions provided here to ensure that you encounter as few problems as possible during this Ria services drill.

Topic

Prerequisites for WCF Ria services

    • Walkthrough: install and configure SQL Server 2008 R2 express with advanced services

    • Walkthrough: Install adventureworks OLTP and Lt Sample Database

Create a RIA services Solution

    • Walkthrough: demonstrate Ria services

    • Walkthrough: Create an RIA services Solution
    • Walkthrough: use the "Silverlight business application" template
    • Walkthrough: Create a RIA services class library
    • Walkthrough: localized business applications
    • How to Create a domain service using an entity defined by Poco
    • How to: add or remove the RIA services link
    • Use domain service wizard

Security of WCF Ria services

Deployment and localization of RIA services solutions

    • Troubleshooting of deployment of RIA services solutions

    • Troubleshooting of deployment of RIA services solutions
    • Walkthrough: localized business applications

Middle Layer

    • Domain Service

      • Walkthrough: Add a query method

      • How to: add business logic to the domain service
      • How to Create a domain service using an entity defined by Poco
      • How to: Use https for domain services
    • Data
      • Composite hierarchy

      • Model
      • Inheritance in the Data Model
      • Complex types
      • Shared object
      • Walkthrough: sharing entities between multiple domain services
      • How to: Add a metadata class
      • How to: verify data
      • Manage data concurrency
        1. How to enable open concurrency check

        2. How to: Add explicit transactions to domain services
    • Share code
      • How to: share code through source files

      • Walkthrough: Create a RIA services class library

Silverlight Client

    • Client code generation

    • Domaincontext and operations
    • Domaindatasource
    • Handle errors on the client
    • Custom generated code
      • How to: Add computing attributes on the client

Access non-Silverlight clients

    • ASP. NET Client

    • Walkthrough: Use domain services in ASP. NET Applications

Authentication, role, and configuration file

    • How to: enable authentication in RIA services

    • How to: Enable roles in RIA services
    • How to: Enable the configuration file in RIA services
    • How to: create custom authorization attributes
    • Walkthrough: Use the authentication service for Silverlight business applications
    • Walkthrough: Use the authentication service for the Silverlight Navigation Application

End-to-end solution

    • Drill: retrieve and display data in the domain service

    • Walkthrough: edit data in the domain service
    • Walkthrough: display data in a Silverlight business application
    • Walkthrough: Display related data in the Silverlight business application

Reference

For more information, see Other resources

Offline Ria services documentation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.