xlsgen > overview > Isolated server

xlsgen has two run-time modes :

 

Why pick the local server over the other one ?


Using the local server mode, one or more xlsgen.exe processes show up in the Windows task manager

 

 

Activating the local server

The good news is that none of the client-side source code changes whether you are using the in-process mode or the local server mode.

But a one-time local COM registration is needed. It works as follows :

Note : if you are running Windows 7, Windows 8 or any version of Windows where the user does not run as an administrator, you may have to put this into a .bat file, right-click and choose Run as administrator.

Once this activation is done, the creation of a running instance of xlsgen will automatically start a new process, xlsgen.exe, unless the process is already running and it can process the load.

Based on customer feedback, it appears that sometimes users running under lower privilege accounts on Windows 64-bit need to take additional steps in order for the isolated server to work. Here is a recap :
  • once the isolated server is COM-registered (see above), verify that the registry keys are indeed created. For this, hit Windows+R, enter REGEDIT.EXE and hit enter.
  • Verify that the following registry key exists : HKEY_CLASSES_ROOT\CLSID\{089D25AC-7618-4FEF-9BB1-6FDDF1FD3B3A}\LocalServer32
  • If not, create it manually
  • Verify that the default value associated to this registry key (right panel of the registry editor), points to xlsgen.exe, and that this is a correct file path. If not, make the appropriate changes.
  • At this point, the registry is ready. You can quit the registry editor and try whether the isolated server works.
  • If the isolated server does not work, a likely reason is security related.
  • It is very likely that security issues will actually trigger application events from Windows COM/DCOM, and a list of the events can be seen in the Events viewer. The Events viewer is available in the Windows configuration panel / Administrative tools. This can help you figure out what might be the issue. The Events viewer may, for instance, name the user under which the process is trying to run, and this can help you configure the system so that this user has enough privilege to run this process. There is a system-wide configuration tool called DCOMcnfg.exe (which is short for Distributed COM configuration), which is part of Windows. You can start it by hitting Windows+R, type DCOMcnfg.exe and hit enter.
  • Unfold "Component services / Computers / My computer / DCOM configuration", and you should see a key called "ExcelGenerator".
  • In case you don't see the "ExcelGenerator" key, the workaround works as follows. Hit Windows+R, enter mmc -32 and hit enter. Then add the Component services snap-in from there. That should fix it and from now on it will be possible to use DCOMcnfg.exe. When you do this, the tool looks up all COM components available for use, including "ExcelGenerator" and shows it in the list.
  • Right-click on "ExcelGenerator", choose Properties and click on the Security tab. From there, change the appropriate security option to "everyone". This change is for ensuring you can run xlsgen.
  • You can quit the registry editor and try whether the isolated server works.
  • In one customer case, running behind ASP.NET 64-bit, a special user called IIS_USR had to be added to the list of persons with Execution authorization and access, in the Security tab.
  • That should get the isolated server up and running. We have not heard of a single customer giving up on getting the isolated server up and running.

 

 

Switching back to the in-process mode

If you are willing to stop using the local server, you may either 1) use the COM-free technique, which automatically loads xlsgen.dll as part of the client application or host, or 2) re-activate the in-process mode by doing the following :

Note : if you are running Windows 7, Windows 8 or any version of Windows where the user does not run as an administrator, you may have to put this into a .bat file, right-click and choose Run as administrator.

 

 

When xlsgen.exe is needed?

The fact that your client application or host runs on a 64-bit operating system does not automatically mean you have to use xlsgen.exe instead of xlsgen.dll. In fact, if the client application or host is a 32-bit image, then you can use the one or the other. If, however, the client application or host is a 64-bit image, then you need to use xlsgen.exe or the 64-bit version of xlsgen.dll.

 

 

Registration modes

Two registration modes are available :

Pass these flags along with the /REGSERVER command.

 

xlsgen documentation. © ARsT Design all rights reserved.