Professional ASP.NET 2.0 Security, Membership, and Role Management phần 8

Đây là một điểm mà các tính năng providerbased một chút khác biệt so với các tính năng mẫu. Các tính năng nhà cung cấp cần phải lưu trữ các ngoại lệ và rethrow nó bất cứ khi nào phương pháp khởi tạo tư nhân của họ được gọi là từ tài sản công cộng và phương pháp của họ. | SqlMembershipProvider gets installed against the user instance. The end result of this work is that an .mdf file is created in the file location specified by the connection string. As the last part of this work the provider infrastructure detaches the newly created .mdf file. 5. Within the new user instance the database file specified by AttachDBFilename is attached to the instance and registered in the metadata tables in the user instance s master database. If you are accustomed to working with databases as a named database in other versions of SQL Server this might seem a bit strange. However using the attach syntax in the connection string causes the SSE user instance to attach the database on your behalf. The connection string shown earlier exists in to allow developers that use Visual Studio to get up and running auto-magically with the application services. Rather than running manually to install the database scripts into a specific database on a database server you can write code against a feature like Membership and the database will automatically be created for you. From an ease-of-use perspective this is actually pretty powerful and makes features like Membership so straightforward to use that developers potentially don t need to understand or muck around with databases. Of course this rosy scenario actually has a few streaks on the window as you will shortly see. The automatic database creation behavior was originally intended for client applications such as ClickOnce apps. In a client environment a user instance makes a fair amount of sense because someone is actually running interactively on a machine with a well-established set of credentials. Furthermore while running in a client environment there is likely to be sufficient processing power on the machine to handle the overhead of user instancing. Just running the named SSE instance plus a user instance with the database tables in them incurs up to about .

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
2    77    2    14-06-2024
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.