【发布时间】:2012-06-22 11:09:02
【问题描述】:
我有一个本地 Windows 托管服务,它试图连接到 SQLExpress 的本地实例,但在连接字符串/本地服务需要使用的身份验证方面遇到了障碍。
这是托管服务的配置
<add key="..." value="Data Source=<machineName>\SQLEXPRESS;Persist Security Info=True; Integrated Security=True" />
有趣的是,这可行,但只提供对主数据库的访问。它不提供对服务所需的实际数据库的任何访问权限。我在 SQL Management Studio 中尝试了各种可能性,重新授予访问权限/安全性/用户,但无济于事。
我尝试过使用初始目录,但出现安全异常
<add key="..." value="Data Source=<machineName>\SQLEXPRESS;Persist Security Info=True;inital catalog=<dbName>; Integrated Security=True" />
我也在做这样的假设
一个。托管服务使用的登录是一个红鲱鱼,这确实是一个 SQLServer 问题。
b.如果 SQLServer 不是本地的,则托管服务将需要 AD 凭据。
【问题讨论】:
标签: sql-server windows-services