loading Jiwa plugins from .Net App  Topic is solved

Discussions relating to Jiwa 7 plugin development, and the Jiwa 7 API.

loading Jiwa plugins from .Net App

Postby perry » Wed Jul 01, 2015 4:10 pm

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
Perry Ma
S. Programmer
Lonicera Pty Ltd
http://www.lonicera.com.au
perry
Frequent Contributor
Frequent Contributor
 
Posts: 173
Joined: Mon Oct 27, 2008 2:26 pm
Topics Solved: 15

Re: loading Jiwa plugins from .Net App

Postby Mike.Sheen » Fri Jul 03, 2015 4:36 pm

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?
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807

Re: loading Jiwa plugins from .Net App

Postby perry » Fri Jul 03, 2015 4:44 pm

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.
Perry Ma
S. Programmer
Lonicera Pty Ltd
http://www.lonicera.com.au
perry
Frequent Contributor
Frequent Contributor
 
Posts: 173
Joined: Mon Oct 27, 2008 2:26 pm
Topics Solved: 15

Re: loading Jiwa plugins from .Net App

Postby perry » Fri Jul 03, 2015 6:11 pm

quickly did what you suggested and still not loading any plugins,

What did you mean by "Import the IIS Application again"?
Perry Ma
S. Programmer
Lonicera Pty Ltd
http://www.lonicera.com.au
perry
Frequent Contributor
Frequent Contributor
 
Posts: 173
Joined: Mon Oct 27, 2008 2:26 pm
Topics Solved: 15

Re: loading Jiwa plugins from .Net App

Postby Mike.Sheen » Fri Jul 03, 2015 6:15 pm

I mean exactly that - Import it again...

IIS.PNG
IIS Screenshot
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807

Re: loading Jiwa plugins from .Net App

Postby Mike.Sheen » Fri Jul 03, 2015 8:34 pm

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.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807

Re: loading Jiwa plugins from .Net App

Postby perry » Mon Jul 06, 2015 11:05 am

Hi Mike,

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

Regards,
Perry Ma
S. Programmer
Lonicera Pty Ltd
http://www.lonicera.com.au
perry
Frequent Contributor
Frequent Contributor
 
Posts: 173
Joined: Mon Oct 27, 2008 2:26 pm
Topics Solved: 15

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

Postby perry » Mon Jul 06, 2015 1:10 pm

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,
Perry Ma
S. Programmer
Lonicera Pty Ltd
http://www.lonicera.com.au
perry
Frequent Contributor
Frequent Contributor
 
Posts: 173
Joined: Mon Oct 27, 2008 2:26 pm
Topics Solved: 15

Re: loading Jiwa plugins from .Net App

Postby Mike.Sheen » Wed Jul 15, 2015 7:11 pm

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.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 5 guests