Getting 401 when trying to deploy with MSBUILD

  • 27 August 2009
  • 6 replies
  • 1 view

Badge +1

Hello


I have a K2 process (blackpearl) that  uses Infopath. I try to deploy the process with a MSBUILD script on another environment. When I run the script I got the an error when the script is in the following step:
  <Target Name="InfoPath Process and Event Deployment" Condition="$(InfoPath_Process_And_Event_Deployment) == 'true'">
    <SourceCode.DeploymentTasks.InfoPath.PublishFormTemplateTask TaskGuid="ef7b6fc6988a40f88f5b64c562ba608c" />
  </Target> 


Here is the output from MsBuild: 


Done building target "InfoPath Process and Event Deployment" in project "LOSBynett_RegisterOrderinvoice.K2.msbuild" -- FAILED.
Done building project "LOSBynett_RegisterOrderinvoice.K2.msbuild" -- FAILED.
Build FAILED.
LOSBynett_RegisterOrderinvoice.K2.msbuild(57,5): error : The request failed with HTTP status
401: Unauthorized.
    0 Warning(s)
    1 Error(s)


 


Can someone help me please.


Best regards Dag Efjestad 


 


6 replies

Badge +11

Check to see if the K2 service account is a SharePoint site collection administrator. 

Badge +1

Thanks for the answer:


I tried diffrent users, like the K2 service account, the user that I use to logon with - same result.


According to the log file the url requested is http://server/site/_vti_bin/K2SPFormsServices.asmx  


I dont know which service it's using but I got a message from the NTLM that says uses the user that I am logged in with. This user has access to K2 workspace, smartobjects, server etc.


 

Badge +1

Hello,


I ran the MSBUILD commend with the diag option to get som more information:
    ------ Task started: Publish InfoPath Form Template(s) with Form Services------
    *** InfoPath Form Template: RegisterOrderInvoice ***
    *** Checking if forms services is installed ***
    LOSBynett_RegisterOrderinvoice.K2.msbuild(57,5): error : The request failed with HTTP status 401: Unauthorized.
    Stack Trace:
       at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
       at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
       at SourceCode.SharePoint.WebServices.K2SPFormsServices.GetRootWebUrl()
       at SourceCode.Workflow.Design.InfoPath.SPHelper.GetRootSiteUrl(Boolean useDeploymentSiteUrl)
       at SourceCode.Workflow.Design.InfoPath.SPHelper.IsFormServicesInstalled()
       at SourceCode.DeploymentTasks.InfoPath.PublishFormTemplateTask.DeployFormTemplate(FormTemplateObject ftObj)
       at SourceCode.DeploymentTasks.InfoPath.PublishFormTemplateTask.Execute()
Done executing task "SourceCode.DeploymentTasks.InfoPath.PublishFormTemplateTask" -- FAILED.
Done building target "InfoPath Process and Event Deployment" in project "LOSBynett_RegisterOrderinvoice.K2.msbuild" -- FAILED.


Looks like this error is related to some security issues when using the formServiceExists service.


From Windows I got this event:


Event Type: Failure Audit
Event Source: Security
Event Category: Logon/Logoff
Event ID: 537
Date:  27.08.2009
Time:  16:54:55
User:  NT AUTHORITYSYSTEM
Computer: KRSK2TEST
Description:
Logon Failure:
  Reason:  An error occurred during logon
  User Name: TstK2Admin
  Domain:  A-E
  Logon Type: 3
  Logon Process: €÷G
  Authentication Package: NTLM
  Status code: 0xC000006D
  Substatus code: 0x0

Help!!

Badge +11

If the SharePoint server is on a different server than K2 (or K2 is load balanced) then double-check your Kerberos settings.

Badge +1

This is a standalone installation.


I run the installation script logged in as K2 application user. This user is a owner of the sharepoint site where the Infopath schema should be posted. I can access the url from a browser with this but I have not tried to use the web service.


 

Badge +1

I did a lot of things but I think that this registry setting did the trick: HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServiceslanmanserverparametersDisableStrictNameCecking

Reply