04-25-07 06:19 PM
Hi Tom,
did you ensure that user.UserName is of the following format:
"WinNT://domain/username"?
Other formats are not supported.
Cheers,
Stefan
"Tom" <Tom@discussions.microsoft.com> wrote in message
news:DCA1A678-BD51-4516-909A-2C4F799F730B@microsoft.com...
>I am trying to connect to CMS SP2 using the following code but I am getting
> an error,
>
> Microsoft.ContentManagement.Publishing.CmsAccessDeniedException: The
> windows
> credentials provided could not be validated. --->
> System.Runtime.InteropServices.COMException (0x80041BF3): Login attempt
> failed. Access is denied.\r\n at
> Microsoft.ContentManagement.Interop.Publishing.CmsApplicationContextClass.
AuthenticateAsUser(String
> ServerAccountName, String password, RcwPublishingMode Mode, String
> ClientAccountName, String authenticationType, String
> remoteMachineAddress)\r\n at
> Microsoft.ContentManagement.Publishing.CmsApplicationContext.AuthenticateA
sUser(String
> serverAccountName, String password, PublishingMode mode)\r\n --- End of
> inner exception stack trace ---\r\n at
> Microsoft.ContentManagement.Publishing.CmsApplicationContext.AuthenticateA
sUser(String
> serverAccountName, String password, PublishingMode mode)\r\n at
> CMS.CMSWebServices.Service.CMSLoginCheck(CmsUser user, String& loginError)
> in
> c:\\inetpub\\wwwroot\\CMSWebServices\\Ap
p_Code\\Service.cs:line 465"
>
> Here is the code...
>
> public CmsApplicationContext cmsContext1 = new CmsApplicationContext();
> cmsContext.AuthenticateAsUser(user.UserName, user.Password,
> PublishingMode.Unpublished);
>
> Where user.UserName is a CMS Admin
>
> Can anyone help out?
>
> Thanks
>
> Tom
>
>
[ Post a follow-up to this message ]
|