FoxPro Programming
COM registration
Gravatar is a globally recognized avatar based on your email address. COM registration
  Kuzma Karbachinskiy
  All
  Oct 3, 2018 @ 01:45pm

Hi,

My name is Kuzma Karbachinskiy and my company is OSM. Currently I do COM mode with VFP 9.0 application. This is internal usage application that was migrated from VFP 6. Executable file was built and tested and COM process was started like <projectName>.<projectName>Server. It was registered like yourProject.exe /regserver in CMD that ran as administrator. Tested with VFP IDE. After were chahged web.ini and wc.ini files to do COM mode on web site. 1st application start shown permissions problem with data drive. To fix it I did additional DCOM registration with user credentials to get access to data drive. After that I could not test with VFP due 'wrong credentials' message and had the same problem on application start. Can I remove previously registrations with yourProject.exe /unregserver or I have to edit registry to start it over?

Thank you, Kuzma Karbachinskiy kkarbachinskiy@oneworldonestop.com

Gravatar is a globally recognized avatar based on your email address. re: COM registration
  Rick Strahl
  Kuzma Karbachinskiy
  Oct 3, 2018 @ 07:06pm

You can /unregserver to remove the COM object registration but it won't remove the DCOM configuration as that's actually done by something else. You can recompile your server which will update the registry and re-add the server, but that does nothing for the DCOM configuration.

There are also CONSOLE DCOMCONFIG and CONSOLE DCOMPERMISSIONS and Console DCOMIMPERSONATION commands that can configure the DCOM settings for a specific server, however I would advise to not actually, at least for the server Identity. Set the Identity of the IIS Application Pool and leave the Identity of your COM server as default or Launching User. That way you only set permissions in one place.

If you're using a non-Admin, non-System account you will have to change the Access and Launch and Activation permissions for the user either globally in DcomConfig (for Local Machine) or on the specific server.

In summary I'd suggest:

  • Set DcomConfig to Launching User
  • Make sure IIS Application Pool Identity is set to user you want
  • Add your user to the Launch And Access and Activation to the Dcom Permissions

+++ Rick ---

© 1996-2024