简体   繁体   English

将Windows客户端上的SQL Server凭据存储到Access SQL Server的位置

[英]Where Store SQL Server credentials on Windows Client to Access SQL Server

I have a Windows service running under a local system account on all company clients. 我在所有公司客户端上的本地系统帐户下运行Windows服务。 But my service needs to access SQL Server 2008 R2 which is on a central SQL Server instance. 但我的服务需要访问位于中央SQL Server实例上的SQL Server 2008 R2。

My problem is how to securely store the login credentials for the SQL Server connection and access them with C#. 我的问题是如何安全地存储SQL Server连接的登录凭据并使用C#访问它们。 Or is there another opportunity to connect to SQL Server? 或者是否有另一个连接到SQL Server的机会?

What are best practices for such a scenario? 这种情况的最佳做法是什么?

The best approach would be to run the Windows Service under a dedicated domain account. 最好的方法是在专用域帐户下运行Windows服务。 This way username and password would not need to be stored on the local computer at all. 这样,用户名和密码根本不需要存储在本地计算机上。 You could use integrated security instead and grant SQL Server access to that domain account. 您可以使用集成安全性,并授予SQL Server对该域帐户的访问权限。

If that's not an option for you, you will need to encrypt the sensitive data in your configuration file. 如果这不适合您,则需要加密配置文件中的敏感数据。 You might want to take a look at SectionInformation.ProtectSection method. 您可能想看看SectionInformation.ProtectSection方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 SQL 服务器 Windows 使用不同凭据进行身份验证 - SQL Server Windows Authentication with different credentials SQL Server Windows Auth使用登录用户以外的其他凭据 - SQL Server Windows Auth using other Credentials than logged on User 通过客户端服务器框架将Windows身份传递给SQL Server - Pass Windows Identity through Client Server framework to SQL Server Windows桌面客户端/服务器应用程序的SQL Server安全配置选项 - SQL Server Security Configuration Options for Windows Desktop Client/Server application 无法从C#中的客户端(控制台应用程序)通过WCF服务(已通过Windows身份验证)访问SQL Server - Unable to access SQL Server from WCF service (Windows authenticated) from client (console application) in C# 在.NET中存储业务值的位置 - SQL Server应用程序 - Where to store business values in .NET - SQL Server applications 什么是最佳的.NET智能客户端SQL Server数据库访问解决方案? - What is the best .NET smart client SQL server database access solution? 在 SQL Server 中存储歌曲的持续时间 - Store duration of song in SQL Server 在SQL Server中存储空值 - Store Null value in SQL Server SQL Server作为Web服务客户端 - SQL Server as a Web Service Client
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM