Opening FlowMaster, the following error occurs: "System.InvalidOperationException: DragDrop registr


Applies To   
Product(s): FlowMaster
Version(s): 08.01.071.00 and later
Area:  Installation
Original Author: Terry Foster, Bentley Technical Support Group

Problem

The following error occurs when attempting to open FlowMaster

InvalidOperationException Details
---------------------------
Press Ctrl-C to copy details to clipboard:
 
 
 
System.InvalidOperationException: DragDrop registration did not succeed. ---> System.Threading.ThreadStateException: Current thread must be set to single thread apartment (STA) mode before OLE calls can be made. Ensure that your Main function has STAThreadAttribute marked on it.
 
   at System.Windows.Forms.Control.SetAcceptDrops(Boolean accept)
 
   --- End of inner exception stack trace ---
 
...

Solution

First, ensure that your antivirus / security software is not interfering with FlowMaster. Check the quarantine or history area, add an exception if needed, or try temporarily disabling it to see if it allows FlowMaster to operate correctly.

Option 1 - With FlowMaster build 10.03.00.03

To try to help with the with the issue, contact Bentley Technical Support for the latest patch.

Option 2 - With FlowMaster build 08.11.01.03 or 08.11.00.03

Browse to C:\Program Files (x86)\Bentley\FlowMaster. Double-click on the file FlowMaster.starter.exe. If the program launches without issue, point your FlowMaster shortcut to the FlowMaster.starter.exe file in the FlowMaster installation folder, instead of FlowMaster.exe.

Option 3 - With FlowMaster build 08.01.071.00

  1. Make sure that you installed version 08.01.071.00 of FlowMaster.  The below patch will only work with this version.  You can download this version from the Bentley SELECTservices.

  2. Make a backup of your existing FlowMaster.starter.exe file.  This is located in your FlowMaster install folder. 

  3. Download the following patched executable:
    ftp://ftp.bentley.com/pub/knowledgebase/attachments/FlowMaster.Starter.exe

    Choose to save it to the FlowMaster install folder.

    The program should now open without a problem.  Note that you may need to point your shortcut to the FlowMaster.starter.exe file.

Option 4 - uninstall/reinstall .NET runtimes:

You can try uninstalling and then re-installing the .NET runtime. Our software as of April 1st, 2014 uses .NET 3.5. Installing higher version also seem to help as found on this  Forum post.

See Also

Flowmaster Internal error : "System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation"