Page 1 of 1

loading Jiwa plugins from .Net App

PostPosted: Wed Jul 01, 2015 4:10 pm
by perry
Hi,

I'm having a lot trouble loading plugins when creating sales order via web service and hoping if you can help. I want to know if there is a way can I find the reason of JiwaApplication is not loading an "enabled" plugin (permission or missing reference or whatever reason).

We discussed this here http://forums.jiwa.com.au/viewtopic.php?f=27&t=172&start=10 but this time it happens on customer's production server but not dev PC.

Jiwa 7.0.117

Problem
- sales order created but cannot assign any custom field value because there is no plugin loaded after logging to JiwaApplication
- on dev machine plugins are loaded correctly (when debugging)
- below is the code snippet from the web service, on customer's server, splugins is blank.

Code: Select all
JiwaApplication.Manager.Instance.Logon(My.Settings.SqlServerName, My.Settings.SqlDatabaseName, JiwaFinancials.Jiwa.JiwaODBC.database.AuthenticationModes.JiwaAuthentication, My.Settings.JiwaLoginUserName, My.Settings.JiwaLoginUserPassword)

            JiwaApplication.Manager.Instance.Logon(My.Settings.SqlServerName, My.Settings.SqlDatabaseName, JiwaFinancials.Jiwa.JiwaODBC.database.AuthenticationModes.JiwaAuthentication, My.Settings.JiwaLoginUserName, My.Settings.JiwaLoginUserPassword)

            Dim splugins As String = ""
            For Each plugin As JiwaApplication.Plugin.Plugin In JiwaApplication.Manager.Instance.PluginCollection
                splugins += plugin.Name
            Next
            Logger.Write("Plugins loaded: " & splugins, "general")


Other information
- on client server, Jiwa 7 is installed and the Bin folder of the web service has all required Jiwa assemblies (same as dev PC)
- IIS App pool is running in 32bit mode
- App pool is running under ApplicationPoolIdentity
- I tried to run under admin user and didnt help

Please let me know if you have any questions

Re: loading Jiwa plugins from .Net App

PostPosted: Fri Jul 03, 2015 4:36 pm
by Mike.Sheen
Since about build 7.00.13 we have been using the Jiwa assemblies in an ASP.NET project, which depends on plugins being compiled. We update this EVERY build - it's what support.jiwa.com.au uses to show registration licences - we have a plugin to do that, and as such is a critical part of our release process.

We do get the odd error, and can never work out the cause - but when we encounter problems we:
  • Stop the Site in IIS
  • Delete the C:\ProgramData\JiwaFinancials folder
  • Import the IIS Application again
  • Start the site

We only have ever had these issues immediately after installation of a new Jiwa version.

Do you have Jiwa installed on the the IIS machine?

Re: loading Jiwa plugins from .Net App

PostPosted: Fri Jul 03, 2015 4:44 pm
by perry
Yes, we do have Jiwa installed on the machine. However, I have all the required Jiwa Assemblies in the Bin folder of the web service (otherwise it complains about reference not found).

Will try as you suggested and let you know the outcome.

Re: loading Jiwa plugins from .Net App

PostPosted: Fri Jul 03, 2015 6:11 pm
by perry
quickly did what you suggested and still not loading any plugins,

What did you mean by "Import the IIS Application again"?

Re: loading Jiwa plugins from .Net App

PostPosted: Fri Jul 03, 2015 6:15 pm
by Mike.Sheen
I mean exactly that - Import it again...

IIS.PNG
IIS Screenshot

Re: loading Jiwa plugins from .Net App

PostPosted: Fri Jul 03, 2015 8:34 pm
by Mike.Sheen
If this is still causing you grief, Add a reference to the following assemblies (set copy local for those, too):
  • Infragistics4.Win.AppStylistSupport.v13.1.dll
  • Infragistics4.Shared.v13.1.dll
  • Infragistics4.Win.v13.1.dll

Chances are you probably have references already to two of those - but perhaps not Infragistics4.Win.AppStylistSupport.v13.1.dll which is important.

Re: loading Jiwa plugins from .Net App

PostPosted: Mon Jul 06, 2015 11:05 am
by perry
Hi Mike,

I followed all steps and still not loading any plugins. Also tried running Application Pool with an admin account.

Regards,

Re: loading Jiwa plugins from .Net App  Topic is solved

PostPosted: Mon Jul 06, 2015 1:10 pm
by perry
Hi Mike,

Ok, I get it working
    remove all Jiwa references from .net project
    go through Plugin -> "References" and add all Jiwa related assemblies to my .Net project (i.e. all assemblies from Jiwa installation folder)
    compile/publish the project and deploy to the server
    copy all FarPoint/Infragistics related assemblies from Jiwa folder to the Bin folder (they are used by assemblies I referenced in the project)
    stop IIS website and application pool
    clear Jiwa Financials folder under c:\programdata\
    start IIS/application pool

I guess my original problem is related to missing a reference that used by every plugin...

Is there an easier way to do this? should I just reference every single assembly under Jiwa folder in my project? You mentioned you have a plugin to do that?

Regards,

Re: loading Jiwa plugins from .Net App

PostPosted: Wed Jul 15, 2015 7:11 pm
by Mike.Sheen
perry wrote:Is there an easier way to do this? should I just reference every single assembly under Jiwa folder in my project? You mentioned you have a plugin to do that?


I was actually referring to a plugin we have which provides the licence information via the website - not a plugin which does the referencing for you.