Community
Showing results for 
Search instead for 
Do you mean 
Reply

Act.Framework.ProductVersionMismatchException on ActFramework.LogOn()

Copper Contributor
Posts: 12
Country: Australia

Act.Framework.ProductVersionMismatchException on ActFramework.LogOn()

[ Edited ]

One other user reported this here and got a rather stunning lackof useful response last year. Let's try again and see if Sage don't want to help.

 

I have an ASP .NET app I've just inherited which connects with an ACT database to retrieve client info. It works fine on the live server. 

 

Now I want to get it running in debug mode on my local machine. My machine DOES NOT have ACT installed. 

 

What I  have done, is I've taken all the DLLs from Act. namespace in the GAC on the web server, copied them locally, and installed them on my machine in both the GAC and so they appear on the Add References dialog box in Visual Studio 2008.

 

The project builds and runs fine in debug mode. A local webserver is instantiated and it throws up IE with my app running in it, locally in debug mode. 

 

Now if I try to get client info from Act, these two lines of code:

 

var framework = new ActFramework();

framework.LogOn( .... )

 

throw an exception on the second line:

 

Act.Framework.ProductVersionMismatchException was unhandled by user code
  Message="Error in the application."
  Source="Act.Framework"
  PromptForBackup=false
  StackTrace:
       at Act.Framework.ActFramework.FailLogOn(Exception ex, TraceCategory tCat, TraceLevel tLevel)
       at Act.Framework.ActFramework.LogOn(String userName, String password, String databaseType, String databaseHost, String databaseName, Boolean fireEvents, Boolean suppressTierCheck, Boolean suppressSchemaCheck, Boolean suppressLicenseCheck, Boolean allowTrialModeDeparture, LogonTrack tracklogon)
       at Act.Framework.ActFramework.LogOn(String userName, String password, String databaseType, String databaseHost, String databaseName, Boolean fireEvents, LogonTrack tracklogon)
       at Act.Framework.ActFramework.LogOn(String userName, String password, String databaseType, String databaseHost, String databaseName, LogonTrack tracklogon)
       at Act.Framework.ActFramework.LogOn(String userName, String password, String databaseType, String databaseHost, String databaseName)
       at Act.Framework.ActFramework.LogOn(String userName, String password, String databaseHost, String databaseName)
       at LicenseManager.Helpers.ActHelper.Execute(Action`1 block) in C:\Why\Source\MyriaxLicensing\EonfusionLicenseManager\Helpers\ActHelper.cs:line 19
       at LicenseManager.Controllers.ACTController.Search(String query) in C:\Why\Source\MyriaxLicensing\EonfusionLicenseManager\Controllers\ACTController.cs:line 98
       at lambda_method(ExecutionScope , ControllerBase , Object[] )
       at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)
       at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
       at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
       at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClassa.<InvokeActionMethodWithFilters>b__7()
       at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
  InnerException:
 

Why? Same code, two different boxes. One probably has ACT! installed, the other does not, both have the Act.* DLLs in the GAC. Must I install Act! on my local box to achieve this result? I can't see why. In ActFramework.LogOn I specify a valid username, password, host machine and database which is neither of these two boxes, it's a third machine that hosts the ACT! database.

 

Might this exception not provide some more useful diagnostic information, please, Sage? I mean it's not exactly illuminating. You could start by specifying as I would suggest any well written exception handler that reports a mismatch ought to, what the two versions are that are mismatching, so that I might proceed to diagnose with some more information.

 

But that is by the by. Perhaps you can provide me with some diagnostic tips here. 

 

I shudder to think you will tell me I need ACT! installed on my dev machine. This is problematic. Not least because I tried and ACT refuses to install on this machine (the installer simply hangs with significant steady state resource consumption afterthe SQL server progress bar reaches 100%).

 

Here's hoping I can get response to this question unlike previous correspondents.

 

http://community.act.com/sage/board/message?board.id=Pub_Dev&message.id=2432

Hugo Vale on the 6th of Jan 2010 reported s imilar problem and found a solution. Alas his solution doesn't work for me and there is no further clue as to cause or meaning.

 

http://community.act.com/sage/board/message?board.id=Pub_Dev&message.id=1908

Ppuri (who has no name) on the 14th of June 2009 got one reasonably cryptic response of no great help and then left hanging and unanswered (what's up, Sage?)

 

Can't find any other clues on-line yet.

 

Help!

 

Bernd.

Message Edited by bwechner on 01-27-2010 07:34 PM
Employee
Posts: 33
Country: USA

Re: Act.Framework.ProductVersionMismatchException on ActFramework.LogOn()

This is checking to make sure the product tier of ACT! code and the database match. In this case it is due to the fact that you didn't actually install ACT! and the licensing service isn't running on your box. Since there is no license to check, it doesn't know what version of the product you have installed (Standard vs. Premium) so it defaults to standard (aka BASIC) and since your server database is running PREMIUM it fails here.

 

As to why the exception isn't handled; since you are invoking framework directly you are responsible to catch it.  Try

 

...
catch (ProductVersionMismatchException pvme)
{
//do something here...
}
...

 

 This exception class is visible via the SDK in the Act.Framework namespace.

Hope this helps.

 

 

Tim Faust
ACT! R&D
Copper Contributor
Posts: 12
Country: Australia

Re: Act.Framework.ProductVersionMismatchException on ActFramework.LogOn()

Thanks for the clarification! I could catch the exception but that doesn't answer what to do about it. I need for the log on to work. And ideally without ACT innstalled locally (because I have no use for it).

 

The "It"  you speak of is presumaebly the ACT framework that I'm invoking.

 

If correct, is there perhaps a way to tell "It" (via a registry entry?) that the version of the prodcut I'm running is Premium and hence not get the mismatch? 

 

I don't even mind instaling ACT per se, as I was informed by the previous owner of this code that a trial version is enough and all works well.  But I certainly don't need a licnese, and don't want it installedper se, I have the framework andits DLLs and I just want to log onto the ACT databse - I am after all writing another interface to the databse so to speak (literally it's just a report generator that ties together ACT! data with data from another database about or users licenses and so on, and runs with those together to report ... ). 

 

So anyhow I tried installing ACT, and it fails, it just hangs on my box after MS-SQL is apparently installed. So not a real inspiring installer ... no feedback, no messages, just hangs. Given I oughtn't really need ACT! installed on my development machine to acces its database, shouldn't tehre be a workaround?

 

Bernd.

Copper Elite Contributor
Posts: 95
Country: USA

Re: Act.Framework.ProductVersionMismatchException on ActFramework.LogOn()

Act is licensed on a per user basis, so the licensing isn't a problem, but you _do_ need to install it for applications to work.

 

Also, depending on the version of Act you are installing, the install can finish (but the SQL install crashes), this is fine, outlook integration will be somewhat broken, but you can still open databases hosted on other machines

 

If your app works in debug, but not release mode you are probably doing something silly, while that's not that helpful it's a place to start from

 

what version dll's is the app compiled against?

what version of act is installed (exact version + hotfixes from help->about Act)?

what is the release target CPU set to?

 

In general,  we need a bit more detail, the exact lines of code being executed, (...)'ing stuff is cool, until your app doesn't build.

 

-Nick

Nick Bohne
Effective Solutions, Inc.
Copper Contributor
Posts: 12
Country: Australia

Re: Act.Framework.ProductVersionMismatchException on ActFramework.LogOn()

Sorry for the lag in reply, I am certainly keen for this to work, but was busy on workaround for now. To clarify:

 

  1. ACT alas isn't installed on my box at all, it fails as described (well it may be as you noted that it is part installed)
  2. The version installed  on the web server is: ACT! by Sage Premium 2009 (11.0) Version 11.1.183.0, Hotfix 1, Hotfix 2
  3. The DLLs in the GAC on the webserver are all 11.1.183.0
  4. I manually installed the same on my machine (by fetchingt hem from the GAC on the webs erver and installing them in my GAC, and because VS2008 is essentialy GAC stupid, pointed it at another folder containing the same assemblies so they appear on my Add References dialog nio VS2008 (documented on-line in various places). The short version of which is I have 11.1.183.0 assemblies on my dvelopment machine
  5. My app doesn't work in debug or release mode on my machine. It works in both modes on the web server. The problem is, if I publish and run on the web server all is good. If I try and debug locally (VS starts a mini web server andstarts up the ASP .NET site  am maintaining here) the site runs fine, and all is good I can test my database access and everything else, but it fails to log onto ACT with the afforementioned error. My workaround for the record,presently is to have created a test web site on the server so I can test things there anyhow without having to touch the live site, but it's not the same as local debugging, I cna't step through code etc ... just test a parallel live web site in a sense.
  6. The code that fails is the following:

    var framework = new ActFramework();
    framework.LogOn(Settings.ACT_USERNAME, Settings.ACT_PASSWORD, Settings.ACT_MACHINE, Settings.ACT_DATABASE);
  7. The Settings are fine, hardcoded in a web.config file and include a valide ACT username, password and machine and database (as evidenced also by the fact that this llginis successfulw hen the web site runs on the web server (which has ACT installed) vs when it runs on my dev server (where ACT fails to install).

In the end I can mid-term get a new dev box anyhow or something that supports an ACT install, but short term that is a costly exercise (migrating work seats always is) and so I'm still kind of keen to know if there's an easier fix (a la perhaps a registry patch that I alluded to earlier).

The error the second line of code above throws is for the record again (as I juist tested it):

 

Act.Framework.ProductVersionMismatchException was unhandled by user code
  Message="Error in the application."
  Source="Act.Framework"
  PromptForBackup=false
  StackTrace:
       at Act.Framework.ActFramework.FailLogOn(Exception ex, TraceCategory tCat, TraceLevel tLevel)
       at Act.Framework.ActFramework.LogOn(String userName, String password, String databaseType, String databaseHost, String databaseName, Boolean fireEvents, Boolean suppressTierCheck, Boolean suppressSchemaCheck, Boolean suppressLicenseCheck, Boolean allowTrialModeDeparture, LogonTrack tracklogon)
       at Act.Framework.ActFramework.LogOn(String userName, String password, String databaseType, String databaseHost, String databaseName, Boolean fireEvents, LogonTrack tracklogon)
       at Act.Framework.ActFramework.LogOn(String userName, String password, String databaseType, String databaseHost, String databaseName, LogonTrack tracklogon)
       at Act.Framework.ActFramework.LogOn(String userName, String password, String databaseType, String databaseHost, String databaseName)
       at Act.Framework.ActFramework.LogOn(String userName, String password, String databaseHost, String databaseName)
       at LicenseManager.Helpers.ActHelper.Execute(Action`1 block) in C:\Why\Source\MyriaxLicensing\EonfusionLicenseManager\Helpers\ActHelper.cs:line 19
       at LicenseManager.Controllers.ACTController.Search(String query) in C:\Why\Source\MyriaxLicensing\EonfusionLicenseManager\Controllers\ACTController.cs:line 98
       at lambda_method(ExecutionScope , ControllerBase , Object[] )
       at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)
       at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
       at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
       at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClassa.<InvokeActionMethodWithFilters>b__7()
       at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
  InnerException:
 

 

 

 

Copper Contributor
Posts: 12
Country: Australia

Re: Act.Framework.ProductVersionMismatchException on ActFramework.LogOn()

Oops forgot to mention, I build witha target CPU of "Any CPU". I'm on an XP box, with an INTEL CORE 2 6600 CPU, 3.5 GB RAM and I have only that option presented to me by VS2008, teh drop down on the toobar and the Build Properties (Platform) only show "Any CPU". On the Build Properties for the project there is a Platform Target under General which I set to x86 (it provided the options Any CPU, x86 and x64. I seem tor ecal googling and fidning a recommendation from someonetos et this to x86 to avoid such problems, but I have toc onfess a poor understanding (i.e absent) of the difference between the Platform and Target Platform properties of the project.

 

I am building against the .NET 3.5 Framework.

Tuned Listener
Posts: 10
Country: United Kingdom

Re: Act.Framework.ProductVersionMismatchException on ActFramework.LogOn()

Hope you don't mind me adding to this, but I'm getting a similar issue when calling the logon() method from the ACT framework:

 

Act.Framework.ProductVersionMismatchException was unhandled

  Message="Error in the application."

  Source="Act.Framework"

  PromptForBackup=false

  StackTrace:

       at Act.Framework.ActFramework.FailLogOn(Exception ex, TraceCategory tCat, TraceLevel tLevel)

       at Act.Framework.ActFramework.LogOn(String userName, String password, String databaseType, String databaseHost, String databaseName, Boolean fireEvents, Boolean suppressTierCheck, Boolean suppressSchemaCheck, Boolean suppressLicenseCheck, Boolean allowTrialModeDeparture, LogonTrack tracklogon)

       at Act.Framework.ActFramework.LogOn(String userName, String password, String databaseType, String databaseHost, String databaseName, Boolean fireEvents, LogonTrack tracklogon)

       at Act.Framework.ActFramework.LogOn(String userName, String password, String databaseType, String databaseHost, String databaseName, LogonTrack tracklogon)

       at Act.Framework.ActFramework.LogOn(String xmlPADFile, String userName, String password)

       at ACTApi.Form1.button1_Click(Object sender, EventArgs e) in C:\Users\ian.mellett\AppData\Local\Temporary Projects\ACTApi\Form1.cs:line 28

       at System.Windows.Forms.Control.OnClick(EventArgs e)

       at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)

       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)

       at System.Windows.Forms.Control.WndProc(Message& m)

       at System.Windows.Forms.ButtonBase.WndProc(Message& m)

       at System.Windows.Forms.Button.WndProc(Message& m)

       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)

       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)

       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)

       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)

       at ACTApi.Program.Main() in C:\Users\ian.mellett\AppData\Local\Temporary Projects\ACTApi\Program.cs:line 18

       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)

       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()

       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

       at System.Threading.ThreadHelper.ThreadStart()

  InnerException:  

 

The ACT .DLL version is 11.1.183.0 and, according to 'about ACT', the current version I'm using (installed on this PC) is:

 

ACT! by Sage Premium 2009 (11.0) Version 11.1.183.0, Hotfix 4

 

This is running in C# express on a Win7, 64bit, so I can't target specific CPUs.

 

Anybody got any clues to point me in the right direction? 

 

 

Tuned Listener
Posts: 10
Country: United Kingdom

Re: Act.Framework.ProductVersionMismatchException on ActFramework.LogOn()

Just to save confusion, I'm going to post this as a new topic here