Friday, 22 March 2013

How to fix {FE41B1AD-0F2B-459C-9668-5FC6BBF093EE} Class not registered in Syspro

There are a number of reasons why you can get this error in Syspro:


Error
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {FE41B1AD-0F2B-459C-9668-5FC6BBF093EE} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
   at SysproServices.utilitiesclass.Logon(String Operator, String OperatorPassword, String CompanyId, String CompanyPassword, Language LanguageCode, LogDetail LogLevel, Instance EncoreInstance, String XmlIn)
   --- End of inner exception stack trace ---


Encore.dll not registered

The CLSID, {FE41B1AD-0F2B-459C-9668-5FC6BBF093EE}, refers to Encore.DLL, which is a 32-bit DLL that should live under your Syspro base folder, e.g. C:\Syspro61\Base\Encore.dll.

This DLL should be registered; you can register this by running an elevated command prompt and running these commands:

cd C:\Syspro61\Base
regsvr32 Encore.dll

Run as a 32-bit process

However, the problem usually happens when you run a 64-bit process and try to access Encore.dll, which is a 32-bit dll, because you can't mix 32-bit code with 64-bit code in the one process.

Therefore, to talk to Syspro's E.Net BUsiness Objects, you may have to change your process so that it is a 32-bit process.

If you made your own program using Visual Studio to access Syspro via E.Net, then you can force your application to run as a 32-bit process using this procedure:

In Visual Studio, go to Tools / Options / Projects and Solutions / General and tick Show advanced build configurations as shown in the screen shot below.


Then go to Build / Configuration Manager, click on the options for Platform, go to New, add x86, and set the Platform to x86, as shown in the screen shot below. You should do this process for both the Debug and the Release configurations.


Then rebuild your application.

Run as a 64-bit process - use web services

Another solution is to change from talking to Syspro's Business Objects via Encore.dll, to using Syspro's Web Services instead. If you are using VBScript / VBA in Excel or a similar Microsoft Office application, see this post for how to change to using web services.

Configure IIS correctly

Another source of the problem can be because of incorrect configuration of IIS for Syspro's E.Net web services. This can typically happen if you install Syspro Web Services BEFORE configuring IIS for Syspro Web Services. If that is the case, see this post this post for more detail on setting up IIS correctly for Syspro.

No comments:

Post a Comment