SAP,IIS和SSO - 此用户帐户无法使用Kerberos SSPI

时间:2011-09-02 21:26:12

标签: asp.net iis active-directory sap kerberos

我的目标是让内网用户的凭证通过asp.net网页传递给SAP RFC。

背景
我们的AD系统具有SAP SSO设置。用户无需输入用户名/密码即可打开SAP gui并登录。

我们正在使用ERPConnect在SAP中调用RFC。如果我们为连接字符串提供凭据,那么它很有用。如果网页在我们的本地计算机上运行,​​我们还可以使用以下代码来使用SSO。

Dim db As New SAPContext("ashost=sapsandbox.xxxsap.ad.xxx.com snc_mode=1 sysnr=00 SNC_QOP=9 snc_partnername=p:SAPUserAccount@xxxSAP.AD.XXX.COM SNC_LIB=C:\windows\system32\gsskrb5.dll")

当我们移动到运行IIS6的Windows 2003服务器计算机时,我们收到以下错误。

SAP_CMINIT3 : rc=20 > Connect to SAP gateway failed
Connect_PM  GWHOST=sapsandbox.xxxsap.ad.xxx.com, GWSERV=sapgw00, SYSNR=00

LOCATION    CPIC (TCP/IP) on local host
ERROR       GSS-API(maj): Miscellaneous Failure
           GSS-API(min): Kerberos SSPI not usable with this User account
           STOP! -- initial call to gss_indicate_mechs() failed
TIME        Fri Sep 02 14:13:47 201
RELEASE     710
COMPONENT   SNC (Secure Network Communication)
VERSION     5
RC          -1
MODULE      sncxxdl.c
LINE

我在IIS6网站上禁用了匿名访问。我还关注了如何在IIS6上启用kerberos身份验证的this文章。

有谁知道如何让这个工作?如果有更简单的方法可以使用它,我们可以转移到IIS7。

修改
我设置<identity impersonate="true" />,我现在收到一个新错误。

SAP_CMINIT3 : rc=20 > Connect to SAP gateway failed
Connect_PM  GWHOST=sapsandbox.xxxsap.ad.xxx.com, GWSERV=sapgw00, SYSNR=00

LOCATION    CPIC (TCP/IP) on local host
ERROR       GSS-API(maj): Miscellaneous Failure
           GSS-API(min): SSPI::AcqCredHdl(INI)==No credentials available
           in secur
           Could't acquire DEFAULT INITIATING credentials
TIME        Tue Sep 06 11:45:11 201
RELEASE     710
COMPONENT   SNC (Secure Network Communication)
VERSION     5
RC          -4
MODULE      snc

修改
我想我必须有AD设置才能使用SPN。这是我在this question上看到的内容 在前端应用程序的应用程序池帐户上设置SPN

1 个答案:

答案 0 :(得分:2)

不熟悉SAP,但 委派 是关键,除了SPN,AD必须信任发送kerberos机票的机器,我强烈建议阅读此内容文章:

Understanding Kerberos Double Hop