Posts Tagged WSP

SharePoint: You cannot deploy this solution on this type of server computer as it is configured. This solution must be installed on a server of type: front-end Web server

Scenario:

We tried to deploy wsp via Visual Studio 2013 on our development server, deployment stopped with following error:

You cannot deploy this solution on this type of server computer as it is configured. This solution must be installed on a server of type: front-end Web server

We tried using PowerShell, but it hangs at “Deploying”. Tried solution like adding “loopback check” but it didn’t work in case of wsp deployment.

Resolution:

Finally, disconnecting and connecting configuration database did the trick but at the cost of creating new CA.

Steps are:

  1. Run cmdlet to disconnect configuration database
  • Disconnect-SPConfigurationDatabase –Confirm:$false
  1. Close PowerShell window and open new PowerShell window
  2. Run cmdlet to connect configuration
  • $passphrase = ConvertTo-SecureString -String “sharepoint@2013” -asPlainText -Force
  • Connect-SPConfigurationDatabase -DatabaseServer SQLServerInstanceName -DatabaseName SharePoint_Config -Passphrase $passphrase
  • Start-Service SPTimerv4
  1. Run SharePoint Configuration wizard and created new central administration.

We were able to deploy solutions via Visual Studio but newly created Central Administration need to deploy every wsp.


Advertisements

Leave a Comment

SharePoint Workflow: Failed on Start (retrying)

Scenario:

We created a visual studio workflow which contains initiation form. Workflow was associated with multiple content types. Workflow works well when deployed using visual studio. When workflow deployed using WSP, it was crashed showing “Failed on Start (retrying)” or “Error Occurred” status.

Resolution:

When we add “Workflow Initiation Form” using “Add” -> “New Item”, following method is responsible for running workflow:

private
void StartListWorkflow()

{

SPWorkflowAssociation association = this.workflowList.WorkflowAssociations[new
Guid(this.associationGuid)];


this.Web.Site.WorkflowManager.StartWorkflow(workflowListItem, association, GetInitiationData());


SPUtility.Redirect(this.workflowList.DefaultViewUrl, SPRedirectFlags.UseSource, HttpContext.Current);

}

In the above method, following method looks for workflow association with the list:

SPWorkflowAssociation association = this.workflowList.WorkflowAssociations[new
Guid(this.associationGuid)];

But we have associated workflow with the content types, not with the list. This results in null value in the SPWorkflowAssociation type variable “association”. When “StartWorkflow” is called, it resulted in exception.

We changed the above line of code with following line:

SPWorkflowAssociation association = this.workflowList.ContentTypes[this.workflowListItem[“Content Type”].ToString()].WorkflowAssociations[new
Guid(this.associationGuid)];

In the above code, instead of finding association from list, workflow looks association using content type as workflow is associated with content type not list. This did the trick.


Comments (4)