主数据服务:未经授权

时间:2015-07-06 15:05:19

标签: sql-server iis master-data-services

我在新的SQL Server(Windows 2012 Standard with SQL Server 2014,Enterprise Edition)上安装了主数据服务。最初我在安装过程中使用了非个人AD帐户(对于数据库和网络应用程序也是如此),但是当我尝试导航到localhost/mds时,我最终会在"未授权"页。

我卸载了MDS,删除了webapp和数据库,并使用我自己的凭据重新安装。没有骰子。

搜索显示我需要确保为服务器和MDS应用程序启用了Windows身份验证。我还禁用了匿名身份验证。

服务器:

Server authentication

MDS app:

MDS authentication

我还确保NTLM是服务器和应用程序级别上第一个可用的提供程序:

Providers

我甚至将我的用户权限分配给运行MDS应用程序的路径(C:\ Program Files \ Microsoft SQL Server \ 120 \ Master Data Services \ WebApplication),以及该文件夹中的config.web文件

显然IIS已安装Windows身份验证:

enter image description here

我已经知道该做什么了。我没有IIS专家,唯一的错误信息是" Unauthorized"。 IIS日志也不是很有用:

2015-07-06 14:19:33 ::1 GET /MDS/ - 80 - ::1 Mozilla/5.0+(Windows+NT+6.3;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/43.0.2357.130+Safari/537.36 - 401 2 5 304
2015-07-06 14:19:33 ::1 GET /MDS/ - 80 <account_name> ::1 Mozilla/5.0+(Windows+NT+6.3;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/43.0.2357.130+Safari/537.36 - 302 0 0 927
2015-07-06 14:19:33 ::1 GET /MDS/Unauthorized.aspx - 80 <account_name> ::1 Mozilla/5.0+(Windows+NT+6.3;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/43.0.2357.130+Safari/537.36 - 200 0 0 10
2015-07-06 14:21:03 ::1 GET /MDS/ - 80 <account_name> ::1 Mozilla/5.0+(Windows+NT+6.3;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/43.0.2357.130+Safari/537.36 - 302 0 0 173
2015-07-06 14:21:03 ::1 GET /MDS/Unauthorized.aspx - 80 <account_name> ::1 Mozilla/5.0+(Windows+NT+6.3;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/43.0.2357.130+Safari/537.36 - 200 0 0 2

我还确保已配置并安装this list中的每个角色和功能。

我有什么方法能够以某种方式获取更多信息吗? &#34;访问被拒绝&#34;并没有给我很多工作,IIS日志也没有多大帮助。

我不是IIS专家,我猜这个问题实际上是什么,我只是不知道在哪里看。

非常感谢信息。

谢谢!

1 个答案:

答案 0 :(得分:1)

事实证明,MDS在我的AD用户名之后以某种方式附加了“$”。所以 SchmitzIT 不知怎的变成了 SchmitzIT $

我们发现这是挖掘mdm.tbluser表时的问题。其中包含的sid与sys.syslogins中的SID不同。

如果您想验证用户是否正确,请使用以下代码段:

SELECT 'S-1-5-21-' 
+CAST(CAST(CAST(REVERSE(CONVERT(binary(4),'0x'+sys.fn_varbintohexsubstring(0,sid,13,4),1)) as varbinary(4)) as bigint) as varchar(10)) 
+'-'+CAST(CAST(CAST(REVERSE(CONVERT(binary(4),'0x'+sys.fn_varbintohexsubstring(0,sid,17,4),1)) as varbinary(4)) as bigint) as varchar(10)) 
+'-'+CAST(CAST(CAST(REVERSE(CONVERT(binary(4),'0x'+sys.fn_varbintohexsubstring(0,sid,21,4),1)) as varbinary(4)) as bigint) as varchar(10)) 
+'-'+CAST(CAST(CAST(REVERSE(CONVERT(binary(4),'0x'+sys.fn_varbintohexsubstring(0,sid,25,4),1)) as varbinary(4)) as bigint) as varchar(10)) 
, *
FROM sys.syslogins

然后我们从sys.syslogins中为我的用户帐户获取了正确的值,并手动更改了mdm.tblUser表以反映正确的sid和用户名。

相关问题