Good Day.
When I try to generate document on Web Form with next code
protected void Button1_Click(object sender, EventArgs e)
{
Teamplate.Actions.Office.GenDocument.Execute(@"c:\out.doc", "document5", new string[] { "test1", "test2", "test3" }, new string[] { "val1", "val2", "val3" });
}
I have next exception:
http://srv-ask1-wf1/NewContract.aspx?PID=474&TID=2&token=chvVXMSF1BzwcdoDe899FfSxnhSrmxrr219T6Uvjv7MjryZE5QSx69RqVW7LmyFVa5kb%252FhIZ85DjOYKuupoN2ZCpfoVTH%252FT%252Fa1K%252FJ9Fz4DZ%252B%252BkTMgeaC%252FWdFuyLurAKk5zblNHPzcU5XJZhh%252FCjEzZpdpgHeNSqe9gtKUp0XfqwuppxNAI7iSBAeOUJzEHqT0cw925F7rq4WnticoC6mwFd%252BVyhUfoXRdSPUsYV9qmaiu67PcdN5PNmkwNmm%252FLp5IMqpkxQkWfYhBzLInG09LCV9z%252Fe4aPo%252Fr7krlyrrJ2A3AaUEK5baSiT2M1U7%252FjuzcFwnMbvHUre%252BuiwMOX2Xf9nRojpfqebkeSZkWKFLLqcmSkr0yRTLYtN8joi3RNV7
System.Exception: Could not add clause.
System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80040154.
at System.Runtime.Remoting.RemotingServices.AllocateUninitializedObject(RuntimeType objectType)
at System.Runtime.Remoting.RemotingServices.AllocateUninitializedObject(Type objectType)
at System.Runtime.Remoting.Activation.ActivationServices.CreateInstance(Type serverType)
at System.Runtime.Remoting.Activation.ActivationServices.IsCurrentContextOK(Type serverType, Object[] props, Boolean bNewObj)
at Teamplate.Actions.Office.DocAssemblerClause.GenerateDataList()
at Teamplate.Actions.Office.DocAssemblerClause..ctor(ClauseType nClauseType, String strClauseName, String strClausePath)
at Teamplate.Actions.Office.DocAssembler.AddClause(String strClauseName, String strClausePath)
at Teamplate.Actions.Office.DocAssembler.AddClause(String strClauseName, String strClausePath)
at Teamplate.Actions.Office.GenDocument.Execute(String outputfile, String docTemplate, String[] fields, String[] data)
at ASP.newcontract_aspx.Button1_Click(Object sender, EventArgs e) in c:\projects\ContractAgreement\web\NewContract.aspx:line 43
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
I am using Captaris WorkFlow 6.0 and IIS 6.