【问题标题】:Authenticating WCF Service - SQL Server对 WCF 服务进行身份验证 - SQL Server
【发布时间】:2014-12-23 22:06:09
【问题描述】:

我正在关注http://msdn.microsoft.com/en-us/library/ff647294.aspx 向 WCF 添加身份验证。我的 SQL Server 与开发服务器位于不同的机器上。在第 1 步中,我没有使用 SQLExpress,而是使用 SQL Server 2012。当我进入第 8 步:在用户存储中创建用户时,在 ASP.net 网站管理工具的安全选项卡下,我看到以下消息:

There is a problem with your selected data store. This can be caused by an invalid server name or     credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be redirected to a page where you can choose a new data store. 

The following message may help in diagnosing the problem:  Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.

所以看起来设置 Windows 身份验证是问题所在。我不确定在多步骤过程中我必须修改哪些内容才能将身份验证添加到我的 WCF。任何帮助将不胜感激。

【问题讨论】:

    标签: sql-server wcf authentication


    【解决方案1】:

    您的链接中的示例访问 SQL 服务器被授予本地用户 NetworkService。这是应用程序池的默认标识。

    在您的情况下,您不能使用本地用户帐户,因为 SQL Server 位于不同的计算机上。

    你需要:

    • 创建域帐户
    • 向该域帐户授予对 SQL 服务器的访问权限
    • 将您的应用程序池的标识更改为域帐户的标识

    【讨论】:

    • 你说的这三件事我觉得我不太明白怎么做。在 SQL Server Management Studio 中,在何处以及如何创建域帐户?我需要选择哪些选项才能使帐户成为域帐户?然后我认为在 IIS 中我必须更改应用程序池的标识,我看到两个选项,内置帐户或自定义帐户,我选择哪一个,对于任何一个选择,这个选择与我在上一步中创建的域帐户?
    猜你喜欢
    • 2011-08-29
    • 2012-07-28
    • 1970-01-01
    • 2011-02-20
    • 2011-09-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多