Problem Installing Export Release Connector

Problem Installing Export Release Connector

Postby DamienM » Thu Jul 05, 2012 9:22 am

I wrote a ERC in C# following the .NET examples supplied and some of the C# examples on the forums. When I go into the Export Connector Manager and try to add the connector I created, after I select the inf file nothing is in the box to install. Below is the inf file I created.

Code: Select all
[Scripts]
Ascent Capture Database

[Ascent Capture Database]
SetupModule=ICDatabaseExportConnector.dll
SetupProgID=ICDatabaseExportConnector.KofaxReleaseSetupScript
SetupVersion=1.0
ReleaseModule=ICDatabaseExportConnector.dll
ReleaseProgID=ICDatabaseExportConnector.KofaxReleaseScript
ReleaseVersion=1.0
SupportsNonImageFiles=False
SupportsKofaxPDF=True
RemainLoaded=True
SupportsOriginalFileName=True
SupportsMultipleInstances=True
DisplayName=IC Database Export Connector


I have Kofax Capture 9 running on a Windows 7 Pro x64 machine. If i browse to C:\Program Files (x86)\Ascent\Bin where KC9 is installed, I can add the code from my inf to the AscRelSC.inf and it will show up in the available connectors list. The only problem is when I do that, I get a DLL error which I tried to remedy using the actual path to the dll from my connector and I also tried putting the inf/dll inside the Bin folder but still nothing using my inf or altering the existing inf definitions in that folder.

Anyone have a clue why the connector doesn't show up when I use my inf file? or maybe why it fails to install when I use the existing inf with my script code added?
DamienM
Participant
 
Posts: 5
Joined: Thu Jul 05, 2012 6:25 am

Re: Problem Installing Export Release Connector

Postby russell@centuryc.com » Thu Jul 05, 2012 11:36 am

Try putting the complete path for the Setup and Release module. For example:

C:\Program Files (x86)\Kofax\Capture\Bin\ICDatabaseExportConnector.dll
Russell
russell@centuryc.com
Participant
 
Posts: 3374
Joined: Wed May 17, 2006 12:53 pm
Location: USA

Re: Problem Installing Export Release Connector

Postby DamienM » Thu Jul 05, 2012 11:54 am

i don't have the reference path you specified since it seems the version of Kofax is an upgraded version on this server but I have placed the path C:\Program Files (x86)\Ascent\Bin in from of the paths and I still receive a DLL register error. I have marked the project as an x86 project as I found somewhere that someone said to do that as well as mark it as Register for COM interrupt so the tlb files are generated. I also created an installer package as per the pdf found here (viewtopic.php?f=79&t=17644) that says to check versions and paths as well as set the install path. The registry keys are present for both release and setup. The project is using .NET 4, not sure if that matters or not.

The updated inf file:

Code: Select all
[Scripts]
Ascent Capture Database

[Ascent Capture Database]
SetupModule=C:\Program Files (x86)\Ascent\Bin\ICDatabaseExportConnector.dll
SetupProgID=ICDatabaseExportConnector.KofaxReleaseSetupScript
SetupVersion=1.0
ReleaseModule=C:\Program Files (x86)\Ascent\Bin\ICDatabaseExportConnector.dll
ReleaseProgID=ICDatabaseExportConnector.KofaxReleaseScript
ReleaseVersion=1.0
SupportsNonImageFiles=False
SupportsKofaxPDF=True
RemainLoaded=True
SupportsOriginalFileName=True
SupportsMultipleInstances=True
DisplayName=IC Database Export Connector
DamienM
Participant
 
Posts: 5
Joined: Thu Jul 05, 2012 6:25 am

Re: Problem Installing Export Release Connector

Postby DamienM » Fri Jul 06, 2012 5:13 am

I think it is .NET 4. According to this article http://knowledgebase.kofax.com/faqsearc ... QAID=13916, .NET 4 for Export Connectors won't work with KC9. Has anyone else experienced this?
DamienM
Participant
 
Posts: 5
Joined: Thu Jul 05, 2012 6:25 am

Re: Problem Installing Export Release Connector

Postby dkekesi » Fri Jul 06, 2012 5:16 am

Do you have the source for the export connector? If yes, then simply change the framework version in VS and you're set (unless you use any .NET 4 specific features, of course).
Best Regards,

Daniel Kekesi
DocSoft Hungary
Image
dkekesi
Participant
 
Posts: 2569
Joined: Thu Dec 08, 2005 12:56 am
Location: Budapest, Hungary

Re: Problem Installing Export Release Connector

Postby DamienM » Fri Jul 06, 2012 5:46 am

I use another DLL from another project that is required and that is .NET 4. Since that is built in 4, the connector utilizing it requires 4. :(

Does anyone know if upgrading to KC10 will add the support for .NET 4 or was 10 compiled under 3.5 as well?
DamienM
Participant
 
Posts: 5
Joined: Thu Jul 05, 2012 6:25 am

Re: Problem Installing Export Release Connector

Postby DamienM » Fri Jul 06, 2012 7:54 am

I was able to get it to install, i just changed a bunch of projects to use 3.5 instead of 4. Now i'm receiving the validation message "An item with the same key has already been added" when trying to submit the form. My form is pretty simple, 2 boxes that take in a name and connection string. Those are validated against, basically checking if they are not null and if a connection can be made to the hosted service of the connection string that's supplied. My ApplySettings code as well as the validation code is below which is pretty basic.

Code: Select all
if (!ValidateChildren(ValidationConstraints.None))
            {
                return false;
            }

            try
            {
                this.Cursor = System.Windows.Forms.Cursors.WaitCursor;

                SetupData.Name = txtName.Text;
                SetupData.ConnectString = txtConnectionString.Text;
                SetupData.SkipFirstPage = 1;
                SetupData.KofaxPDFPath = System.IO.Path.GetTempPath();
                SetupData.KofaxPDFReleaseScriptEnabled = true;
               
                SetupData.Apply();
                IsDirty = false;
            }
            catch (Exception)
            {
                SetupData.Refresh(1);
                throw;
            }
            finally
            {
                this.Cursor = System.Windows.Forms.Cursors.Default;
            }

private void ShowValidationResults(Control.ControlCollection controlCollection)
        {
            if (_errors.Count > 0)
            {
                Control invalidcontrol = null;
                if (FindFirstInvalidControl(controlCollection, out invalidcontrol) && invalidcontrol != null)
                {
                    MessageBox.Show(_errors[invalidcontrol], "Validation Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    invalidcontrol.Focus();
                }
            }
        }

        private Boolean FindFirstInvalidControl(Control.ControlCollection controlCollection, out Control invalidcontrol)
        {
            Control returnVal = null;
            foreach (Control control in controlCollection)
            {
                if (_errors.ContainsKey(control) && (returnVal == null || returnVal.TabIndex > control.TabIndex))
                {
                    returnVal = control;
                }
                else if (control.Controls != null && control.Controls.Count > 0)
                {
                    FindFirstInvalidControl(control.Controls, out returnVal);
                }
            }

            if (returnVal != null)
            {
                invalidcontrol = returnVal;
                return true;
            }

            invalidcontrol = null;
            return false;
        }

private void txtName_TextChanged(Object sender, EventArgs e)
        {
            IsDirty = true;
        }

        private void txtName_Validating(Object sender, CancelEventArgs e)
        {
            var value = txtConnectionString.Text;
            if (String.IsNullOrEmpty(value))
            {
                _errors.Add(txtConnectionString, "Please enter a value for the name field.");
                e.Cancel = true;
                return;
            }
        }

        private void txtConnectionString_TextChanged(Object sender, EventArgs e)
        {
            IsDirty = true;
        }

        private void txtConnectionString_Validating(Object sender, CancelEventArgs e)
        {
            var value = txtConnectionString.Text;
            if (String.IsNullOrEmpty(value))
            {
                _errors.Add(txtConnectionString, "Please enter a value for the connection string field.");
                e.Cancel = true;
                return;
            }

            if (!DocumentProvider.IsValidConnectionString(value))
            {
                _errors.Add(txtConnectionString, "Please enter a valid connection string.");
                e.Cancel = true;
                return;
            }
        }

public Boolean IsDirty
        {
            get { return btnApply.Enabled; }
            set { btnApply.Enabled = value; }
        }

        public void ShowForm(ReleaseSetupData setupData, ref Boolean isDirty)
        {
            try
            {
                SetupData = setupData;
                IsDirty = isDirty;

                if (setupData.New != 0)
                {
                    lblBatchClass.Text = setupData.BatchClassName;
                    lblDocumentClass.Text = setupData.DocClassName;

                    txtName.Text = setupData.Name;
                    txtConnectionString.Text = setupData.ConnectString;
                }

                ShowDialog();
            }
            catch (Exception)
            {
                //suppress
            }
        }
DamienM
Participant
 
Posts: 5
Joined: Thu Jul 05, 2012 6:25 am

Re: Problem Installing Export Release Connector

Postby Warpfield » Tue Jul 17, 2012 8:13 am

Kofax Capture 9.0 & 10.0 were built against .NET Framework 3.5. Projects compiled targeting ".NET Framework 4.0" will not work with Capture. You will need to change the Target Framework in your project properties, Advanced Compiler Settings to ".NET Framework 3.5". We have seen issues when targeting the ".Net Framework 3.5 Client Profile" to don't select that one.

Also, if you are developing in a 64-bit operating system, you will need to run the Configuration Manager in the VS IDE and change the Configuration to (x86).
If they are going to hate you anyway for what you do, then you might as well put forth your best effort.
User avatar
Warpfield
Participant
 
Posts: 61
Joined: Tue Apr 10, 2007 8:11 am


Return to Release Scripts General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests

cron