Connecting to SQL Server Using Integrated Security from ASP.NET

[ Team LiB ] Recipe Connecting to SQL Server Using Integrated Security from Problem You want to coordinate Windows security accounts between an application and SQL Server. | Team LiB Recipe Connecting to SQL Server Using Integrated Security from Problem You want to coordinate Windows security accounts between an application and SQL Server. Solution Connect to SQL Server from using Windows Authentication in SQL Server. Discussion Connecting to a SQL Server database provides two different authentication modes Windows Authentication Uses the current security identity from the Windows NT or Windows 2000 user account to provide authentication information. It does not expose the user ID and password and is the recommended method for authenticating a connection. SQL Server Authentication Uses a SQL Server login account providing a user ID and password. Integrated security requires that the SQL Server is running on the same computer as IIS and that all application users are on the same domain so that their credentials are available to IIS. The following areas of the application need to be configured Configure the application so that Integrated Windows Authentication is enabled and Anonymous Access is disabled. The file establishes the authentication mode that the application uses and that the application will run as or impersonate the user. Add the following elements to the file Authentication mode Windows identity impersonate true The connection string must contain attributes that tell the SQL Server that integrated security is used. Use the Integrated Security SSPI attribute-and-value pair instead of the User ID and Password attributes in the connection string. The older attribute-and-value pair Trusted_Connection Yes is also supported. Add users and groups from the domain and set their access permissions as required. By default applications run in the context of a local user ASPNET on IIS. The account has limited permissions and is local to the IIS computer and therefore not recognized as a user on remote computers. To overcome this limitation when SQL Server is not on the .

Bấm vào đây để xem trước nội dung
TÀI LIỆU MỚI ĐĂNG
214    143    1    29-04-2024
137    154    2    29-04-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.