C# Application which contains a Class Library Project : Issue after Obfuscation of a the Class Library Project DLL created RRS feed

  • Question

  • My application contains Windows Applications and Class Libraries. I have as a part of the build process obfuscated my Application EXEs and DLLs. I am using the dotNetReactor for obfuscation of my EXEs and DLLs. However, obfuscating one of the DLLs which uses Windows Workflow Foundation for workflow related activites. After obfuscation, the functionality does not work as expected (before obfuscation) and gives WorkflowException for all WorkFlow related activities.

    The exception that i get after obfuscation is as follows : 

    The execution of the InstancePersistenceCommand named {urn:schemas-microsoft-com:System.Activities.Persistence/command}Load Workflow was interrupted by an error

    Please can you let me know how do I resolve the issue.

    Let me know if you require any other information as well.

    However, I would just like to understand from you  - Accessing Microsoft's Windows Workflow Foundation for workflow functionalities in my application via an obfuscated DLL does not cause any issue ? 

    Please confirm the same.

    Friday, May 27, 2016 9:53 AM

All replies

  • One commonality I think I found is it is using the System.GUID as function parameters in all the cases that it is failing currently. Does it have anything to do with System.GUID ? 

    For eg in the following functions : 

    WorkflowApplication.GetInstance(id, wfApp.InstanceStore);

    id is of the type GUID 

    Friday, May 27, 2016 11:57 AM
  • HI Dolly,

    From your description above, you need check whether you use correct instanceId and instanceStore.

    public static WorkflowApplicationInstance GetInstance(
    	Guid instanceId,
    	InstanceStore instanceStore

    In addition, you could also consider showing some code snippet to us, it will be helpful to troubleshoot.



    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, May 30, 2016 9:27 AM
  • Hi,

    Please find the code snippet as below :

    I do not understand why the issue is coming only after obfuscating the DLL or EXE. before obfuscating it works fine.

    id is of the form System.GUID

    wfApp = new WorkflowApplication(wf);
                    wfApp.Completed += OnWorkflowCompleted;
                    wfApp.Idle += OnIdle;
                    wfApp.PersistableIdle += OnIdleAndPersistable;
                    wfApp.Unloaded += OnUnloaded;
                    wfApp.InstanceStore = store;
                        instance = WorkflowApplication.GetInstance(id, wfApp.InstanceStore);

    Please let me know if your require any other information.

    Tuesday, May 31, 2016 12:28 PM
  • Store mentioned above is of the following form : 

    SqlWorkflowInstanceStore store;

     if (ConfigurationManager.ConnectionStrings[Constants.ConnectionString] != null)
                        store = new SqlWorkflowInstanceStore(ConfigurationManager.ConnectionStrings[Constants.ConnectionString].ConnectionString);

    Tuesday, May 31, 2016 12:30 PM