tailieunhanh - Apress Expert C sharp 2005 (Phần 12)
Tham khảo tài liệu 'apress expert c sharp 2005 (phần 12)', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | 2 27 06 1 33 PM Page 524 524 CHAPTER 10 WEB FORMS UI If you want to use Windows authentication change the configuration to this add key CslaAuthentication value Windows Of course that change would require coding changes. To start the PTPrincipal and PTIdentity classes should be removed from as they would no longer be needed. Also the login logout functionality implemented in this chapter would become unnecessary. Specifically the Login form and the code to display that form would be removed from the UI project. Local Data Portal The file also controls how the application uses the data portal. To have the website interact directly with the database use the following with your connection string changed to the connection string for your database xml version encoding utf-8 configuration appSettings add key CslaAuthentication value Csla appSettings connectionStrings add name PTracker connectionString your connection string providerName add name Security connectionString your connection string providerName connectionStrings Because LocalProxy is the default for the data portal no actual data portal configuration is required so the only settings in the configuration file are to control authentication and to provide the database connection strings. Tip In the code download for this book the PTracker and Security database files are in the solution directory not in the website s App_Data directory. This means that you can t use a local data portal from the website without first copying the database files into the App_Data directory and changing the connection strings accordingly. Remote Data Portal with Remoting To have the data portal use an application server and communicate using the remoting channel the configuration would look like this xml version encoding utf-8 configuration appSettings add key CslaAuthentication value Csla add key CslaDataPortalProxy value .
đang nạp các trang xem trước