MOSS & SSO 系列3

  以下是在MOSS2007中开发SSO时经常遇到的错误代码,做个标记!
  下面正在做SSO密码修改部分,很多人都遇到一些同样的问题,简单代码如下:
   WindowsImpersonationContext wic = null;
   
try
   
{
    wic 
= CreateIdentity("administrator""iswind""iswind").Impersonate(); //提升权限
    string [] args = new string[2];
    
//userName
    args[0= "username";
    
//pwd
    args[1= "12345678";
    
//应用名
    string AppName = "SSOApp";

    
string domainAndName = "iswind\\username"
    Credentials.SetUserCredentials(AppName,domainAndName,args);
   }

   
catch (SingleSignonException ex)
   
{
    
throw ex;
   }

   
finally
   
{
    wic.Undo();
   }
 错误提示信息:服务器应用程序不可用
 
The system can add the credentials successfully, but it throws an error when the other application is trying to read it. The error thrown is “Using A call into SPS Single Sign-on failed. The error code returned was '-2140995583'.”

The error found 
in Event Viewer: “The Microsoft Single Sign-on (SSOSrv) service failed to retrieve credentials for user GICDEV\ncs3, enterprise application definition 8a9b6ddd-3542-4774-98cc-aa08aeabebea. The error returned was 0x80630001.”

 恩,还是权限问题,-2140995583估计是这个问题代号,目前还没有搜索到呢,不过普遍反映如果如上代码在
WinForm或者Console中可以正常工作,继续探索中。。。。

Error Code

Meaning

When Thrown

Bubbled Behavior

How To Overcome

-2140993974

SSO is not configured

Failure when SSO has not been setup via Central Administration

Critical error logged in ULS with error code.

If SSO is not configured then configure from Central Admin.

-2140993973

SSO Wrong Version

SSO config setting or master secret has changed and change has not reflected.

Critical error logged in ULS with error code.

Not applicable. Self healing error.

-2140995575

Failed to connect to SQL Server

Creation of the SSO database fails.

Critical error logged in ULS with error code.
Error logged in application event log.

Check SQL connectivity.
Check permissions for the account running the MS SSO service.

-2140995576

SharePoint Central administration virtual root not found

The SSO folder under 12\Template\Admin\SSO does not exist. This check performed while configuring master secret server. Either a call into Configuration.ConfigureSecretServer via OM or the UI page to configure SSO can throw this error.

Error logged in ULS with error code.

Or error returned to calling function

Repair the product installation.
Most likely the files were not copied properly

-2140995588

Web application not running with windows authentication.

When a custom webpart is placed on a page in a non-windows auth web app.
SSO CANNOT WORK WITH FORMS AUTHENTICATION.

Error logged in ULS with error code.

Or error returned to calling function.

Check authentication providers for the web application. If you have a requirement to have the web app behind FBA, then SSO cannot work.

-2140995589

SQL Server not supported.

If the SQL server specified to host the SSO db is not greater than or equal to SQL Server 2000 SP3.

Error logged in ULS with error code.

Or error returned to calling function.

Check SQL Server patching and version numbers.
http://support.microsoft.com/kb/321185
Minimum required is SQL Server 2000 SP3

-2147023143

Failure to connect to the Microsoft Single-SignOn Service.

Failure to connect to the MS SingleSign On Service. Either when the service is not started or the service has a logon failure.

Error logged in ULS with error code

-


The above information is indicative of the errors that you may encounter while working with Single SignOn on MOSS 2007. This is only for troubleshooting purposes.

posted @ 2008-07-07 19:07  pccai  阅读(1525)  评论(0编辑  收藏  举报