Skip to main content
Nintex Community Menu Bar

Error: "System.InvalidCastException: Specified cast is not valid." When Attaching a Nintex Content Database

  • October 30, 2014
  • 0 replies
  • 499 views
  • Translate

Forum|alt.badge.img+10

Products: Nintex Workflow 2013, Nintex Workflow 2010, Nintex Workflow 2007

Summary

The error "Unexpected System.InvalidCastException: Specified cast is not valid.    at Nintex.Workflow.Administration.ContentDatabase.GetSiteIdsAndWebApplicationIdsInDatabase(String connectionString)     at Hhg=.1xg=.InitAttach(Vxg= context)     at Nintex.Workflow.Administration.DatabaseAttacher.Attach()     at Nintex.Workflow.AdministrationPages.DatabaseSettings.btnOk_Click(Object sender, EventArgs e)     at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint).” is thrown in the SharePoint ULS logs.

 

Filtering Criteria:

 

 

Process Product Category Level
w3wp.exe SharePoint Foundation Runtime Unexpected

 

Symptom

Database fails to mount in Central Administration Nintex Workflow Management Database Settings.

 

Cause

There is a null or otherwise invalid Guid value present in the dbo.WorkflowInstance table of the Nintex Content Database.

 

A valid Guid value should be of this format: 00000000-0000-0000-0000-000000000000

 

More Information here: GUID structure (Windows)

 

Resolution

  1. Launch SQL Management Studio and establish a connection to your SharePoint/Nintex SQL Server.
  2. Execute the following Query against the problematic Database:
    1. SELECT DISTINCT SiteId, WebApplicationID FROM WorkflowInstance
  3. You should see a collection of Site Collection ID's and Web Application ID's in the Make note of any rows that contain invalid or NULL values.
  4. For each row that has an invalid value, there should be another row that contains the correct set of values that would otherwise match. You will need to execute the following Query (Adjusted to fit your requirement) to update the invalid row:
    1. UPDATE WorkflowInstance SET WebApplicationID='YourGuidHere' WHERE WebApplicationID IS NULL
  5. Retry the attach operation.
Did this topic help you find an answer to your question?

0 replies

Be the first to reply!

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings