Web Connection
COM start up problems
Gravatar is a globally recognized avatar based on your email address. COM start up problems
  Kuzma Karbachinskiy
  All
  May 9, 2019 @ 10:09am

Hi Rick,

Company uses web connection 6.20. Application runs very well in FILE mode like 5 background instances started by admin web site. COM mode is not stated sometimes. It can be started by admin web site or by application request. In case of application request start all not background application set off to make the most favorable conditions for COM to start. There were collected errors records in wcTraceLog.txt to get Errors of application site and wcErrors.txt to get errors of NET manged hadler. I have question about frase 'failed to start in time'. What time is required for instance to start in NET manged handler? Do I have possibilities to manage this time? I can see in 'Task Manager' that all 5 instances are started, but application blocked from starting by message like 'Server Emmis2012.Emmis2012Server[4] failed to start in time.'. I provide text that was collected of wctraceLog.txt and wcErrors.txt.

COM 5 Instances application site not started
wcTraceLog
05/09/2019 11:38:26 AM - OnInit Started
05/09/2019 11:38:26 AM - OnInit read Emmis2012.ini complited
05/09/2019 11:38:26 AM - OnInit oConfig complited
05/09/2019 11:38:26 AM - OnInit complited
05/09/2019 11:38:26 AM - OnInitCompleted Started No errors
05/09/2019 11:38:26 AM - OnInitComplited finished No errors
05/09/2019 11:38:30 AM - OnInit Started
05/09/2019 11:38:30 AM - OnInit read Emmis2012.ini complited
05/09/2019 11:38:30 AM - OnInit oConfig complited
05/09/2019 11:38:30 AM - OnInit complited
05/09/2019 11:38:30 AM - OnInitCompleted Started No errors
05/09/2019 11:38:30 AM - OnInitComplited finished No errors
05/09/2019 11:38:35 AM - OnInit Started
05/09/2019 11:38:35 AM - OnInit read Emmis2012.ini complited
05/09/2019 11:38:35 AM - OnInit oConfig complited
05/09/2019 11:38:35 AM - OnInit complited
05/09/2019 11:38:35 AM - OnInitCompleted Started No errors
05/09/2019 11:38:35 AM - OnInitComplited finished No errors
05/09/2019 11:38:38 AM - OnInit Started
05/09/2019 11:38:38 AM - OnInit read Emmis2012.ini complited
05/09/2019 11:38:38 AM - OnInit oConfig complited
05/09/2019 11:38:38 AM - OnInit complited
05/09/2019 11:38:38 AM - OnInitCompleted Started No errors
05/09/2019 11:38:38 AM - OnInitComplited finished No errors
05/09/2019 11:38:42 AM - OnInit Started
05/09/2019 11:38:42 AM - OnInit read Emmis2012.ini complited
05/09/2019 11:38:42 AM - OnInit oConfig complited
05/09/2019 11:38:42 AM - OnInit complited
05/09/2019 11:38:42 AM - OnInitCompleted Started No errors
05/09/2019 11:38:42 AM - OnInitComplited finished No errors

wcErrors
2019-05-09 11:38:33.887 - 263_3c6f4b0c - Unhandled Exception (Mainline): Server Emmis2012.Emmis2012Server[4] failed to start in time.
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.ComProcessor.LoadServers(Boolean initializeOnly)
   at Westwind.WebConnection.ComProcessor.ProcessRequest()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /Emmis2012/wc.wc?Emmis2012%7eMenus%7eTopLevelMenu%7eIndex.htm
_______________________________________________________________________________________________________________
COM 5 Instances application site not started
wcTraceLog
05/09/2019 11:50:00 AM - OnInit Started
05/09/2019 11:50:00 AM - OnInit read Emmis2012.ini complited
05/09/2019 11:50:00 AM - OnInit oConfig complited
05/09/2019 11:50:00 AM - OnInit complited
05/09/2019 11:50:00 AM - OnInitCompleted Started No errors
05/09/2019 11:50:00 AM - OnInitComplited finished No errors
05/09/2019 11:50:03 AM - OnInit Started
05/09/2019 11:50:03 AM - OnInit read Emmis2012.ini complited
05/09/2019 11:50:03 AM - OnInit oConfig complited
05/09/2019 11:50:03 AM - OnInit complited
05/09/2019 11:50:03 AM - OnInitCompleted Started No errors
05/09/2019 11:50:03 AM - OnInitComplited finished No errors
05/09/2019 11:50:07 AM - OnInit Started
05/09/2019 11:50:07 AM - OnInit read Emmis2012.ini complited
05/09/2019 11:50:07 AM - OnInit oConfig complited
05/09/2019 11:50:07 AM - OnInit complited
05/09/2019 11:50:07 AM - OnInitCompleted Started No errors
05/09/2019 11:50:07 AM - OnInitComplited finished No errors
05/09/2019 11:50:10 AM - OnInit Started
05/09/2019 11:50:10 AM - OnInit read Emmis2012.ini complited
05/09/2019 11:50:10 AM - OnInit oConfig complited
05/09/2019 11:50:10 AM - OnInit complited
05/09/2019 11:50:10 AM - OnInitCompleted Started No errors
05/09/2019 11:50:10 AM - OnInitComplited finished No errors
05/09/2019 11:50:13 AM - OnInit Started
05/09/2019 11:50:13 AM - OnInit read Emmis2012.ini complited
05/09/2019 11:50:13 AM - OnInit oConfig complited
05/09/2019 11:50:13 AM - OnInit complited
05/09/2019 11:50:13 AM - OnInitCompleted Started No errors
05/09/2019 11:50:13 AM - OnInitComplited finished No errors

wcErrors
2019-05-09 11:49:29.938 - 254_c3ad909f - Server Loading failed: Invalid Com Server ProgId: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /Emmis2012/admin/ShowServerList.wc?1557416969750
2019-05-09 11:49:34.956 - 254_c3ad909f - Server Loading failed: Invalid Com Server ProgId: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /Emmis2012/admin/ShowServerList.wc?1557416969750
2019-05-09 11:49:39.975 - 254_c3ad909f - Server Loading failed: Invalid Com Server ProgId: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /Emmis2012/admin/ShowServerList.wc?1557416969750
2019-05-09 11:50:06.028 - 240_a9f396ac - Unhandled Exception (Mainline): Server emmis2012.Emmis2012Server[2] failed to start in time.
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.ComProcessor.LoadServers(Boolean initializeOnly)
   at Westwind.WebConnection.ComProcessor.ProcessRequest()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /emmis2012/wc.wc?Emmis2012%7eMenus%7eTopLevelMenu%7eIndex.htm
___________________________________________________________________________________________________________________________

I read your post https://west-wind.com/wconnect/weblog/ShowEntry.blog?id=938. Could you tell about system problems? COM starts well with 2 instances in my case. Executable has size 15.260 MB. Application resides on virtual machine widows server 2012 R2. Sometime I have errors like 'Server Loading failed: Invalid Com Server ProgId', but application started as COM 5 instances. How to make stable COM 5 instances start up?

Thank you, Kuzma Karbachinskiy kkarbachinskiy@oneworldonestop.com

Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Rick Strahl
  Kuzma Karbachinskiy
  May 10, 2019 @ 01:04am

The first failure is a server timeout which means most likely the server failed to load or hung in OnInit() if you have any code in OnInit() that doesn't anything like accessing data etc. I recommend you move it to OnLoad() as that's loaded after the server has been initialized.

The second errors are invalid COM Ids. Either it's a bad ID or the server doesn't have permissions to read those COM servers from the registry. You might need DComConfig if you're using custom permissions for the IIS Application Pool.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Kuzma Karbachinskiy
  Rick Strahl
  May 10, 2019 @ 06:19am

Hi Rick,

I am following up your recommendations. I have web connection 6.20. I looked in file 'wwserver.prg' and found that PROTECTED FUNCTION OnInit inserted in PROTECTED FUNCTION OnLoad. I hope they should be separated. Implementation of wwserver's OnInit() in my main I have code to point to my.ini file. I can't move it to OnLoad, because wwserver:OnInit has code pointed to "wcMain.ini" and OnInit fires at very begining of server's Init(). I'll move everything else from OnInit to keep it to MINIMUM. Could you tell please: "When is THIS.cCOMReleaseUrl used"? COM is invisible and doesn't have form's exit button.
Thank you for your replay.

Kuzma Karbachinskiy kkarbachinskiy@oneworldonestop.com

Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Rick Strahl
  Kuzma Karbachinskiy
  May 10, 2019 @ 02:11pm

Implementation of wwserver's OnInit() in my main I have code to point to my.ini file.

That's normal and that should be in there because that has to be done before Web Connection starts configuring itself. That's generated into the default template. But anything else (unless it's somehow needed during configuration) should not be in OnInit() but OnLoad() instead. With 6.15 and later OnLoad() fires after the servers INIT constructor, and on the first actual incoming hit. By doing this at minimum you allow the server to laod and not crash during the startup phase which is very difficult to debug. Request debugging when the server instance is fully alive is somewhat easier (although not easy either - see doc topic).

.cComReleaseServer

This property is used only by the button on the form to release the server - it comes from the configuration setting in the yourApp.ini file.

In COM mode you have to release the server via a URL in the browser - you can do that from the Module Admin page or by directly putting in that URL - add a shortcut in your browser so you can get to it quickly when developing/testing.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Kuzma Karbachinskiy
  Rick Strahl
  May 13, 2019 @ 06:28am

Hi Rick,

Thank you for your replay and detailed explanation.

Kuzma Karbachinskiy, kkarbachinskiy@oneworldonestop.com

Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Chris
  Rick Strahl
  Mar 16, 2020 @ 07:00am

Hi Rick,

I'm having exactly the same issues e.g. Server Loading failed: Invalid Com Server ProgId

My exe is registered as COM successfully and has Local Path filled, when I see COM under 32 bit DCOMCNFG. Of course, Local Path is missing when have a look at 64 bit.

I'm using Windows Server 2019 and WWWC 7.09.

Above errors raises each time when COM is loaded for the first time, if I load it via Admin page or if request is sent with &instancing=single.

I have Application Pool set to Enable 32 bit Application and Identity set to LocalSystem. Also COM is set to be run by Launching User. I'm following all your instructions, COM is properly registered and has System rights, however this error is still logged in wcerrors.txt.

Could you please give me some idea what could be the reason for this? A bug in framework?

Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Rick Strahl
  Chris
  Mar 16, 2020 @ 12:54pm

ProgId errors are almost always due to the COM server not being registered or missing permissions to access the registry.

Make sure that:

  • Make sure the right COM server is configured in your web.config (or wc.ini if using ISAPI)
  • The COM Server is registered (ie. MyApp.exe /regserver)
  • Make sure the Application Pool Identity can invoke the server
    (double check to ensure you have the right pool assigned to your application!)
  • Check and make sure the COM server works outside of Web Connection

The ProgId error occurs when the COM subsystem tries to invoke the server - it's basically the equivalent of CREATEOBJECT("myApp.MyAppServer") and it's a very specific error to not finding the server ProgId string in the registry. COM Load errors return a different set of messages.

At a guess this sounds like your app pool is running under Application Pool Identity which doesn't have rights to access the registry at all.

Here's more info on what you can check:

Specifically look at Test your Server for local testing outside of Web Connection.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Chris
  Rick Strahl
  Mar 16, 2020 @ 09:57pm

Hi Rick,

Thank you for your prompt reply. As I explained previously, COM is registered properly and Application Pool identity is System and has full rights. In fact, even though I'm getting these errors in wcerrors.txt, my COM server is working OK and system runs OK. I'm just puzzled why it records these errors each time I try to load COM servers via Admin page or if automated scheduled task is run with &instancing=single as parameter in the URL? 2020-03-17 15:32:08.991 - 591895764621_10 - Server Loading failed: Invalid Com Server ProgId: at Westwind.WebConnection.ComServerManager.LoadServers() at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /setStateInDB.hsp?name=mmwidth&value=205&userCST=167&_=15

Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Rick Strahl
  Chris
  Mar 17, 2020 @ 12:42am

Are you sure you're accessing the correct domain/virtual for the admin page?

Make sure the site isn't double mapped and configured differently for each site/virtual.

Easiest way is to make sure by running the module admin page and checking the following things:

Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Chris
  Rick Strahl
  Mar 17, 2020 @ 01:03am

Hi Rick,

I've checked Admin page - COM ProgId, Config File and Server Account are correct.

Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Chris
  Chris
  Mar 17, 2020 @ 02:37am

I think if COM is not registered properly, it wouldn't load at all, however it loads and accept requests etc - all is working OK. However, wcerrors.txt still logs these errors, specially when COM has been unloaded due to inactivity and exe's are loading in memory.

Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Rick Strahl
  Chris
  Mar 17, 2020 @ 12:29pm

That doesn't make sense to me, either...

Like you say it either works or it doesn't - a ProgId is either there or it isn't and permissions are either SYSTEM or they are not.

Unless... the app is accessed in some different way via another (accidental?) Application Pool or secondary site/virtual mapping that is configured differently. That would be my guess what's happening...

Could it be that you have the Admin folder mapped as an IIS Application by accident? It should be just a folder.

Can you post your error log? Also if you can turn on detailed logging (LogDetail true) then make it fail...

If it works under your normal scenario Web Connection is working correctly. It's the IIS configuration that has something mis- or dual configured about it.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Rick Strahl
  Chris
  Mar 17, 2020 @ 12:31pm

This happen only in production or also on your dev machine?

if in both, you can try running IIS Express locally and see whether the links that don't work in IIS fail differently in IISExpress or if they work. My guess it'll just work there due to enforced single site execution.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Chris
  Rick Strahl
  Mar 18, 2020 @ 12:04am

Hi Rick,

Admin folder is just a folder and not IIS Application. Also, there isn't any other Application Pool or Web Site or Application linked in any way to my web site. As I've explained previously, these ProgId errors are being logged in wcerrors.txt only in 2 cases:

  1. When I'm loading servers from Admin panel
  2. When Scheduled Task is being run and COM need to load in memory as it has been unloaded due to inactivity. I have scheduled tasks set up in Windows Task Scheduler, each of them executing VB script, which sends URL to my web site to execute automated task, which is not related to user login. For example, sending emails to many users, sending summary reports to particular users etc.

I've identified something in common between 2 cases - both are being executed by Administrator account on server. Admin panel is linked to Windows Authentication and Scheduled Tasks are being run by Administrator account. I've had a look at DCOMCNFG and I've noticed I have Administrators having full rights for Launch and Activation Permissions, Access Permissions and Configuration Permissions. I haven't changed anything there, apart from giving System account Remote Access on Access Permissions. I can see I have separate Administrator account, different that Administrators, which can be added, but I haven't added yet due to your instructions not to touch anything on DCOMCNFG. Do you think I should try adding Administrator user in all sections and give him full rights?

Bellow is what I have in wcerrors.txt after I've cleaned it up yesterday:

2020-03-18 01:02:00.831 - 012079563821_7 - Server Loading failed: Invalid Com Server ProgId: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /sendstandingorders.hsp?period=1&instancing=single
2020-03-18 01:02:05.835 - 012079563821_7 - Server Loading failed: Invalid Com Server ProgId: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /sendstandingorders.hsp?period=1&instancing=single
2020-03-18 01:02:10.838 - 012079563821_7 - Server Loading failed: Invalid Com Server ProgId: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /sendstandingorders.hsp?period=1&instancing=single
2020-03-18 02:02:00.855 - 372083051671_7 - Server Loading failed: Invalid Com Server ProgId: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /sendstandingorders.hsp?period=1&instancing=single
2020-03-18 02:02:05.859 - 372083051671_7 - Server Loading failed: Invalid Com Server ProgId: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /sendstandingorders.hsp?period=1&instancing=single
2020-03-18 02:02:10.860 - 372083051671_7 - Server Loading failed: Invalid Com Server ProgId: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /sendstandingorders.hsp?period=1&instancing=single
2020-03-18 02:55:15.773 - 691574407001_7 - Server Loading failed: Invalid Com Server ProgId: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /renewbudgets.hsp?instancing=single
2020-03-18 02:55:20.775 - 691574407001_7 - Server Loading failed: Invalid Com Server ProgId: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /renewbudgets.hsp?instancing=single
2020-03-18 02:55:25.777 - 691574407001_7 - Server Loading failed: Invalid Com Server ProgId: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /renewbudgets.hsp?instancing=single
2020-03-18 04:02:00.835 - 092080881381_7 - Server Loading failed: Invalid Com Server ProgId: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /sendstandingorders.hsp?period=1&instancing=single
2020-03-18 04:02:05.839 - 092080881381_7 - Server Loading failed: Invalid Com Server ProgId: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /sendstandingorders.hsp?period=1&instancing=single
2020-03-18 04:02:10.841 - 092080881381_7 - Server Loading failed: Invalid Com Server ProgId: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /sendstandingorders.hsp?period=1&instancing=single
2020-03-18 05:02:00.804 - 452078130651_7 - Server Loading failed: Invalid Com Server ProgId: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /sendstandingorders.hsp?period=1&instancing=single
2020-03-18 05:02:05.807 - 452078130651_7 - Server Loading failed: Invalid Com Server ProgId: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /sendstandingorders.hsp?period=1&instancing=single
2020-03-18 05:02:10.809 - 452078130651_7 - Server Loading failed: Invalid Com Server ProgId: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /sendstandingorders.hsp?period=1&instancing=single
2020-03-18 06:00:15.660 - 801562600961_7 - Server Loading failed: Invalid Com Server ProgId: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /emailhaccpalert.hsp?instancing=single
2020-03-18 06:00:20.662 - 801562600961_7 - Server Loading failed: Invalid Com Server ProgId: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /emailhaccpalert.hsp?instancing=single
2020-03-18 06:00:25.664 - 801562600961_7 - Server Loading failed: Invalid Com Server ProgId: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /emailhaccpalert.hsp?instancing=single
2020-03-18 07:59:48.132 - 518810650271_7 - Server Loading failed: Invalid Com Server ProgId: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /default.hsp?
2020-03-18 07:59:53.136 - 518810650271_7 - Server Loading failed: Invalid Com Server ProgId: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /default.hsp?
2020-03-18 07:59:58.137 - 518810650271_7 - Server Loading failed: Invalid Com Server ProgId: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /default.hsp?
2020-03-18 08:45:31.437 - 793141048181_7 - Server Loading failed: Invalid Com Server ProgId: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /ImportPOSSalePrices.hsp?instancing=single
2020-03-18 08:45:36.440 - 793141048181_7 - Server Loading failed: Invalid Com Server ProgId: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /ImportPOSSalePrices.hsp?instancing=single
2020-03-18 08:45:41.441 - 793141048181_7 - Server Loading failed: Invalid Com Server ProgId: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /ImportPOSSalePrices.hsp?instancing=single
2020-03-18 10:44:56.538 - 509651057141_7 - Server Loading failed: Invalid Com Server ProgId: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /setStateInDB.hsp?name=mmshow&value=1
2020-03-18 10:45:01.542 - 509651057141_7 - Server Loading failed: Invalid Com Server ProgId: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /setStateInDB.hsp?name=mmshow&value=1
2020-03-18 10:45:06.544 - 509651057141_7 - Server Loading failed: Invalid Com Server ProgId: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /setStateInDB.hsp?name=mmshow&value=1
2020-03-18 14:38:33.466 - 911343919581_10 - Server Loading failed: Invalid Com Server ProgId: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /emailordershistory.hsp?q=l
2020-03-18 14:38:38.468 - 911343919581_10 - Server Loading failed: Invalid Com Server ProgId: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /emailordershistory.hsp?q=l
2020-03-18 14:38:43.470 - 911343919581_10 - Server Loading failed: Invalid Com Server ProgId: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /emailordershistory.hsp?q=l
2020-03-18 18:02:00.868 - 132083804191_7 - Server Loading failed: Invalid Com Server ProgId: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /sendstandingorders.hsp?period=1&instancing=single
2020-03-18 18:02:05.870 - 132083804191_7 - Server Loading failed: Invalid Com Server ProgId: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /sendstandingorders.hsp?period=1&instancing=single
2020-03-18 18:02:10.873 - 132083804191_7 - Server Loading failed: Invalid Com Server ProgId: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /sendstandingorders.hsp?period=1&instancing=single
Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Rick Strahl
  Chris
  Mar 18, 2020 @ 12:51pm

Chris,

At this point I don't know what would cause this. It doesn't make any sense to me based on your description - the server works it only doesn't work for certain scenarios, so there must be something different that's happening with those specific requests.

Since those requests are fired from the Admin page and /admin folder maybe try running the admin commands from the / folder instead. ie. /LoadComServers.wc instead of /admin/LoadComServers.wc and see if that's different.

Ideally the Application Pool identity is what is used for security all the way through to the FoxPro server. No DCOMCNFG settings are required for SYSTEM or NETWORK SERVICE or Admin accounts. You only need to set DCOMCNFG settings for the server if using a non-admin account otherwise and the DCOM Server config itself should be set to Launching User - ie. the IIS Application Pool.

How you are logged in to the application should not matter since that account is not used (unless you use passthrough security in IIS which would be weird and difficult to set up).

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Chris
  Rick Strahl
  Mar 18, 2020 @ 01:20pm

Rick, In fact COM works OK in all scenarios. Even requests logged as errors in wcerrors.txt are being processed successfully - Admin panel is doing what it should and scheduled tasks are being executed successfully. My main concern is what is causing these errors to be logged for these cases, if in fact they are not actual errors. Everything works OK and I have no idea why I’m getting these errors logged in wcerrors.txt.

Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Rick Strahl
  Chris
  Mar 18, 2020 @ 02:42pm

Oh they look like real errors. I suggest turn on detail logging for a while and see what you can find when these errors prop up.

To me it looks like the ProgId is not being (The error shows the ProgId as empty) found from Configuration which to me suggests exactly as I mentioned - some other virtual directory or site accessing from a non-actual folder where there is no configuration. I'm not sure without looking at your setup, but almost certainly that's what happening. Most likely it's bot requests trying to find weaknesses.

While this is a special scenario, I'm realizing it would be useful if the log showed the IIS Admin path to the site and login info along with the rest of the log data. Not really useful for common scenarios but here that would be really useful and it would clog up the log a bit. I'll take a look - maybe enable with detail logging.

If the site works and you can't actually duplicate the problem explicitly I wouldn't worry about this - I suspect this happens infrequently.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Chris
  Rick Strahl
  Mar 18, 2020 @ 10:04pm

Hi Rick,

Attached is my wcerrors.txt with LogDetail = True. As you can see, these errors are being logged only when COM servers are not in memory and first few requests are loading them in memory. My Web System was installed on brand new server, I'm 100% sure there isn't any Virtual/Folder which sends requests, because all "error" requests are real. Issue is only when COM is not in memory and it tries to load on first hits, that's why loading servers via Admin Panel is logged as error as well.

I'm still puzzled what may cause this.

2020-03-18 23:22:01.140 - 052111265111_9 - Server Loading failed: Invalid Com Server ProgId: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /admin/ShowServerList.wc?1584534116897
2020-03-18 23:22:06.143 - 052111265111_9 - Server Loading failed: Invalid Com Server ProgId: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /admin/ShowServerList.wc?1584534116897
2020-03-18 23:22:11.145 - 052111265111_9 - Server Loading failed: Invalid Com Server ProgId: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /admin/ShowServerList.wc?1584534116897
2020-03-19 00:02:01.137 - 292111036621_7 - Server Loading failed: Invalid Com Server ProgId: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /sendstandingorders.hsp?period=1&instancing=single
2020-03-19 00:02:06.140 - 292111036621_7 - Server Loading failed: Invalid Com Server ProgId: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /sendstandingorders.hsp?period=1&instancing=single
2020-03-19 00:02:11.142 - 292111036621_7 - Server Loading failed: Invalid Com Server ProgId: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /sendstandingorders.hsp?period=1&instancing=single
2020-03-19 00:31:27.031 - 468700727531_7 - Server Loading failed: Invalid Com Server ProgId: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /login.hsp?
2020-03-19 00:31:32.033 - 468700727531_7 - Server Loading failed: Invalid Com Server ProgId: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /login.hsp?
2020-03-19 00:31:37.035 - 468700727531_7 - Server Loading failed: Invalid Com Server ProgId: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /login.hsp?
Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Rick Strahl
  Chris
  Mar 18, 2020 @ 11:15pm

Notice that the ProgId: is not set. THe value is empty, which means the server didn't read the configuration information properly.

I've created an updated webconnectionmodule.dll that logs some additional information for that error, namely the username and the IIS Application Pool path for the app to see if there is some discreprancy there:

Give that a try and see what that returns in the log. You shouldn't need extended log details to see that.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Chris
  Rick Strahl
  Mar 19, 2020 @ 01:21am

Rick,

Here is the information which is logged after I've updated webconnectionmodule.dll. Seems like IIS Virtual is empty for some reason?

These are my settings in ini file:
[ServerConfig]
Virtual=gglive
ScriptMaps=wc,wcs,md,hsp
IISPath=IIS://localhost/w3svc/6/root

My web Site has name GGLIVE on IIS, COM is registered as GGLive.GGLiveServer - could it be an issue related to small/big letters?

2020-03-19 19:18:55.093 - 233507253761_74 - Server Loading failed: Invalid Com Server ProgId:  - Account: SYSTEM - IIS Virtual: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /admin/wc.wc?wwMaint%7ewcDLLErrorLog
2020-03-19 19:19:00.096 - 233507253761_74 - Server Loading failed: Invalid Com Server ProgId:  - Account: SYSTEM - IIS Virtual: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /admin/wc.wc?wwMaint%7ewcDLLErrorLog
2020-03-19 19:19:05.097 - 233507253761_74 - Server Loading failed: Invalid Com Server ProgId:  - Account: SYSTEM - IIS Virtual: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /admin/wc.wc?wwMaint%7ewcDLLErrorLog
Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Chris
  Rick Strahl
  Mar 19, 2020 @ 02:18am

Rick,

I read more about [ServerConfig] section and found that if Web Site is configured as root, then Virtual should be left blank. I've just tried this and seems like no more error messages are being recorded in wcerrors.txt.

Thank you very much for all your help!

Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Chris
  Rick Strahl
  Mar 19, 2020 @ 03:57am

Actually, it's fixed only for errors logged from Admin panel, however all scheduled tasks keep to record them.

2020-03-19 21:02:00.867 - 852083831911_7 - Server Loading failed: Invalid Com Server ProgId:  - Account: SYSTEM - IIS Virtual: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /sendstandingorders.hsp?period=1&instancing=single
2020-03-19 21:02:05.871 - 852083831911_7 - Server Loading failed: Invalid Com Server ProgId:  - Account: SYSTEM - IIS Virtual: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /sendstandingorders.hsp?period=1&instancing=single
2020-03-19 21:02:10.873 - 852083831911_7 - Server Loading failed: Invalid Com Server ProgId:  - Account: SYSTEM - IIS Virtual: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /sendstandingorders.hsp?period=1&instancing=single
Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Rick Strahl
  Chris
  Mar 19, 2020 @ 01:56pm

[ServerConfig] is only used for configuration when running YourApp.exe CONFIG - it's not used by the application directly. Whether you use / or blank shouldn't matter it'll be fixed up to the same thing. It's only used to find and configure the Web site.

Maybe if you have time, we can do a screen share. At this point I'm intrigued enough to take a look at your server and see if there's something that I can find that's not set right.

A few more things to ask:

  • What is the Scheduled task doing to fire requests? Just HTTP links?

If so you should be able to duplicate those same links directly and they should work too.

The only scenario I can see where there could be a problem is if maybe some part of Windows or IIS is not ready yet when these servers are loaded, because it sure looks like the configuration data is not there in those failed requests. ProgId is empty and I don't know what would cause that - that seems to point at Config not being read, but I can't think of a scenario that would cause that.

It looks like you're running quite a few servers. What happens with fewer servers? Try running with 2 or 3 then see if it fails.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Chris
  Rick Strahl
  Mar 19, 2020 @ 02:05pm

Hi Rick, What time is it at your end at the moment and can I contact you on email to arrange screen sharing? It’s 11pm here and if you send me your email address I will email you tomorrow morning with suitable time for this.

Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Rick Strahl
  Chris
  Mar 19, 2020 @ 03:26pm

I've uploaded another webconnectionmodule.dll in the WebConnectionExperimental.zip file. which adds explicit environment and logged in user name info, as well as the IIS app pool pathing for each request.

It also writes out the configuration values read when the application starts (look for a long JSON entry in the log).

This turns on in LogDetail mode.

This should help to see if there's something going with different AppPools getting hit or permissions changing.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Chris
  Rick Strahl
  Mar 19, 2020 @ 11:05pm

Hi Rick,

This is wcerrors.txt after I've added the new webconnectionmodule.dll

2020-03-20 16:13:28.318 - Configuration read: {"ErrorMessage":"","MessagingMechanism":1,"ComServerProgId":"GGLive.GGLiveServer","UseStaComServers":false,"ServerCount":4,"AutoStartServers":true,"ComServerLoadingMode":0,"TempPath":"~\\..\\deploy\\temp\\","TempFilePrefix":"WC_","Timeout":600,"AdminAccount":"ANY","AdminPage":"~/admin/admin.aspx","ExeFile":"~\\..\\deploy\\gglive.exe","UpdateFile":"~\\..\\deploy\\gglive_Update.exe","LogDetail":true,"MessageDisplayFooter":"Generated by Web Connection IIS .NET Connector Module","LiveReloadEnabled":false,"LiveReloadExtensions":".hsp,.wc,.wcs,.html,.htm,.css,.js,.ts"}
2020-03-20 16:13:28.320 - 760830270101_35 - Starting Request - /admin/wc.wc?wwMaint%7ewcDLLErrorLog - usr: SYSTEM / DS50903\Administrator - iis: /LM/W3SVC/6/ROOT
2020-03-20 16:13:28.330 - 760830270101_35 - Server Loading failed: Invalid Com Server ProgId:  - Account: SYSTEM - IIS Virtual: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /admin/wc.wc?wwMaint%7ewcDLLErrorLog - usr: SYSTEM / DS50903\Administrator - iis: /LM/W3SVC/6/ROOT
2020-03-20 16:13:33.333 - 760830270101_35 - Server Loading failed: Invalid Com Server ProgId:  - Account: SYSTEM - IIS Virtual: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /admin/wc.wc?wwMaint%7ewcDLLErrorLog - usr: SYSTEM / DS50903\Administrator - iis: /LM/W3SVC/6/ROOT
2020-03-20 16:13:38.336 - 760830270101_35 - Server Loading failed: Invalid Com Server ProgId:  - Account: SYSTEM - IIS Virtual: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /admin/wc.wc?wwMaint%7ewcDLLErrorLog - usr: SYSTEM / DS50903\Administrator - iis: /LM/W3SVC/6/ROOT
2020-03-20 16:13:43.345 - 760830270101_35 - Begin Loading COM Servers - /admin/wc.wc?wwMaint%7ewcDLLErrorLog - usr: SYSTEM / DS50903\Administrator - iis: /LM/W3SVC/6/ROOT
2020-03-20 16:13:45.469 - 760830270101_35 - Loading COM Servers completed - /admin/wc.wc?wwMaint%7ewcDLLErrorLog - usr: SYSTEM / DS50903\Administrator - iis: /LM/W3SVC/6/ROOT
2020-03-20 16:13:45.469 - 760830270101_35 - Retrieving Server Instance - /admin/wc.wc?wwMaint%7ewcDLLErrorLog - usr: SYSTEM / DS50903\Administrator - iis: /LM/W3SVC/6/ROOT
2020-03-20 16:13:45.471 - 760830270101_35 - Server COM Instance retrieved: #1 - /admin/wc.wc?wwMaint%7ewcDLLErrorLog - usr: SYSTEM / DS50903\Administrator - iis: /LM/W3SVC/6/ROOT
2020-03-20 16:13:45.474 - 760830270101_35 - Com Server ProcessHit Start - /admin/wc.wc?wwMaint%7ewcDLLErrorLog - usr: SYSTEM / DS50903\Administrator - iis: /LM/W3SVC/6/ROOT
2020-03-20 16:13:45.620 - 760830270101_35 - Com Server ProcessHit Complete. Time: 146.00 - /admin/wc.wc?wwMaint%7ewcDLLErrorLog - usr: SYSTEM / DS50903\Administrator - iis: /LM/W3SVC/6/ROOT
2020-03-20 16:13:45.621 - 760830270101_35 - Server COM Execution completed - /admin/wc.wc?wwMaint%7ewcDLLErrorLog - usr: SYSTEM / DS50903\Administrator - iis: /LM/W3SVC/6/ROOT
2020-03-20 16:13:45.624 - 760830270101_35 - Request Complete - /admin/wc.wc?wwMaint%7ewcDLLErrorLog - usr: SYSTEM / DS50903\Administrator - iis: /LM/W3SVC/6/ROOT
2020-03-20 16:15:30.348 - 773034849442_121 - Starting Request - /ImportInfoGenSales.hsp?instancing=single - usr: SYSTEM /  - iis: /LM/W3SVC/6/ROOT
2020-03-20 16:15:31.021 - 773034849442_121 - Single Com Server ProcessHit Start - /ImportInfoGenSales.hsp?instancing=single - usr: SYSTEM /  - iis: /LM/W3SVC/6/ROOT
2020-03-20 16:15:36.234 - 773034849442_121 - Single Com Server ProcessHit Complete -  Output Length: 182 - /ImportInfoGenSales.hsp?instancing=single - usr: SYSTEM /  - iis: /LM/W3SVC/6/ROOT
2020-03-20 16:15:36.336 - 773034849442_121 - Request Complete - /ImportInfoGenSales.hsp?instancing=single - usr: SYSTEM /  - iis: /LM/W3SVC/6/ROOT
2020-03-20 16:20:06.415 - 800641419723_98 - Starting Request - /admin/wc.wc?wwMaint%7ewcDLLErrorLog - usr: SYSTEM / DS50903\Administrator - iis: /LM/W3SVC/6/ROOT
2020-03-20 16:20:06.416 - 800641419723_98 - Retrieving Server Instance - /admin/wc.wc?wwMaint%7ewcDLLErrorLog - usr: SYSTEM / DS50903\Administrator - iis: /LM/W3SVC/6/ROOT
2020-03-20 16:20:06.416 - 800641419723_98 - Server COM Instance retrieved: #1 - /admin/wc.wc?wwMaint%7ewcDLLErrorLog - usr: SYSTEM / DS50903\Administrator - iis: /LM/W3SVC/6/ROOT
2020-03-20 16:20:06.417 - 800641419723_98 - Com Server ProcessHit Start - /admin/wc.wc?wwMaint%7ewcDLLErrorLog - usr: SYSTEM / DS50903\Administrator - iis: /LM/W3SVC/6/ROOT
Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Chris
  Rick Strahl
  Mar 19, 2020 @ 11:09pm

I'm sending you all my setting, please note I've replaced actual domain address with word "domain" in bellow posts.

This is my web.config:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <configSections>
    <section name="webConnectionConfiguration" type="System.Configuration.NameValueSectionHandler,System,Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
    <section name="webConnectionVisualStudio" type="System.Configuration.NameValueSectionHandler,System,Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
  </configSections>
  <appSettings>
    <add key="enableSimpleMembership" value="false" />
  </appSettings>
  <webConnectionConfiguration>
    <!-- NOTE: These settings apply only to the Web Connection Managed Module! -->
    <add key="MessagingMechanism" value="Com" />
    <add key="Timeout" value="600" />
    <add key="TempPath" value="~\..\deploy\temp\" />
    <add key="TempFilePrefix" value="WC_" />
    <add key="ComServerProgId" value="GGLive.GGLiveServer" />
    <add key="ComServerLoadingMode" value="LoadBased" />
    <add key="ServerCount" value="4" />
    <add key="AutoStartServers" value="True" />
    <add key="ExeFile" value="~\..\deploy\gglive.exe" />
    <add key="UpdateFile" value="~\..\deploy\gglive_Update.exe" />
    <add key="AdminAccount" value="ANY" />
    <add key="AdminPage" value="/admin/admin.aspx" />
    <add key="LogDetail" value="True" />
    <add key="ValidateRequest" value="False" />
    <add key="MessageDisplayFooter" value="Generated by Web Connection IIS .NET Connector Module" />
    <!-- Live Reload Settings -->
    <add key="LiveReloadEnabled" value="False" />
    <add key="LiveReloadExtensions" value=".hsp,.wc,.wcs,.html,.htm,.css,.js,.ts" />
    <add key="UseStaComServers" value="False" />
    <add key="UseCustomManifestLoading" value="False" />
    <add key="AuthenticationMode" value="Default" />
    <add key="PassAspNetContext" value="False" />
  </webConnectionConfiguration>
  <webConnectionVisualStudio>
    <!-- Configuration Settings for the Web Connection Visual Studio Add-in 
       Not used at runtime, only at the design time -->
    <add key="FoxProjectBasePath" value="C:\HOSP_STORE\GGLIVE\deploy\" />
    <add key="WebProjectBasePath" value="C:\HOSP_STORE\GGLIVE\Web\" />
    <add key="WebProjectVirtual" value="http://domain" />
    <!-- Optional PRG launched when VFP IDE launches -->
    <add key="IdeOnLoadPrg" value="" />
    <!-- The editor used to edit FoxPro code - blank means FoxPro Editor is used -->
    <add key="FoxProEditorAlternate" value="%LocalAppData%\Programs\Microsoft VS Code\Code.exe" />
  </webConnectionVisualStudio>
  <system.web>
    <!-- for Live Reload the targetFramework has to be set to at least 4.6.1 -->
    <compilation defaultLanguage="c#" targetFramework="4.6.1" />
    <!-- ASP.NET Request Limit Configuration for POST buffer and Script Timeout -->
    <httpRuntime maxRequestLength="10000000" executionTimeout="900" requestValidationMode="2.0" targetFramework="4.6.1" />
    <!-- Web Connection Managed Module requires that it runs in FULL TRUST (COM Interop) -->
    <trust level="Full" />
  </system.web>
  <!-- IIS 7 Script Map Configuration -->
  <system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <!-- use this on IIS 7.5 and later to bypass IIS default Error handlers for failures -->
    <!-- httpErrors existingResponse="PassThrough" /-->
    <!-- IIS 7 Script Map Configuration -->
    <handlers>
      <!-- 
        Live Reload for HTML files
        **************************
        For **Development** uncomment the `".LiveReload_StaticHtml_wconnect-module"` below.
        For **Production** comment it so it's not loaded as it slows static file serving.        
      -->
      <!-- <add name=".LiveReload_StaticHtml_wconnect-module" path="*.htm*" verb="*" type="Westwind.WebConnection.WebConnectionHandler,WebConnectionModule" preCondition="integratedMode" /> -->
      <add name=".hsp_wconnect-module" path="*.hsp" verb="*" type="Westwind.WebConnection.WebConnectionHandler,WebConnectionModule" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode" />
      <add name=".wc_wconnect-module" path="*.wc" verb="*" type="Westwind.WebConnection.WebConnectionHandler,WebConnectionModule" preCondition="integratedMode" />
      <add name=".wcs_wconnect-module" path="*.wcs" verb="*" type="Westwind.WebConnection.WebConnectionHandler,WebConnectionModule" preCondition="integratedMode" />
      <add name=".md_wconnect-module" path="*.md" verb="*" type="Westwind.WebConnection.WebConnectionHandler,WebConnectionModule" preCondition="integratedMode" />
    </handlers>
    <defaultDocument>
      <files>
        <clear />
        <add value="login.hsp" />
        <add value="default.hsp" />
        <add value="Default.htm" />
        <add value="index.html" />
      </files>
    </defaultDocument>
    <!-- 
      EXTENSIONLESS URL HANDLING
      - Requires IIS Url Rewrite Module 2.0 (Web Platform Installer)

      matches any URLs that do not have a '.' in the path    
  -->
    <!--
    <rewrite>
      <rules>

        <rule name="Redirect to HTTPS" stopProcessing="true">
          <match url="(.*)" />
          <conditions>
            <add input="{HTTPS}" pattern="^OFF$" />
          </conditions>
          <action type="Redirect" url="https://{HTTP_HOST}{URL}" redirectType="SeeOther" />
        </rule>

        <rule name="Extensionless Urls" patternSyntax="ECMAScript" stopProcessing="true">
          <match url="^((?!\.).)*$" />
          <conditions>
            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
          </conditions>
          <action type="Rewrite" url="UrlRewriteHandler.hsp" appendQueryString="true" />
        </rule>

      </rules>
  </rewrite>
  -->
  </system.webServer>
</configuration>
Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Chris
  Rick Strahl
  Mar 19, 2020 @ 11:11pm

This is my ini file:

[Main]
TempFilePath=.\temp\
Template=WC_
TimerInterval=200
ScriptMode=3
DebugMode=Off
LiveReloadEnabled=On

HomeUrl=http://domain

showrequestdata=Off
showserverform=On
showstatus=On
saverequestfiles=Off

COMReleaseUrl=http://domain/ReleaseComServers.wc
UnattendedComMode=On
Memusage=8176

AlertEmailRecipient=
Adminemail=
Adminmailpassword=
Adminmailserver=
Adminmailusername=
Adminmailusessl=On
Adminsenderroremail=On

# wwPdfPrinterDriver Windows 10, Server 2016
Postscriptpdfprinterdriver=Microsoft Print to PDF
# Ghostscript
# Postscriptpdfprinterdriver=Xerox PS Class Driver

; ------ CUSTOM PROPERTIES IN MAIN SECTION ------
HtmlPagePath=C:\HOSP_STORE\GGLIVE\web\views\
SQLConnectString=driver={ODBC Driver 17 for SQL Server};server=DS50903;database=GGLIVE;trusted_connection=yes;
SessionLimit=43200
ImagePath=images/
IconPath=icons/
ToolTipPath=C:\HOSP_STORE\GGLIVE\web\
ToolTipLink=
CodeRefLink=
CodeRefXmlLink=
CodeRefXmlPath=
SessionTableName=wwsession
SessionFilePath=
Stylesheet=csswb.css
ErrorTemplate=C:\HOSP_STORE\GGLIVE\web\views\wc_errortemplate.wc
ErrorTemplate2=C:\HOSP_STORE\GGLIVE\web\views\wc_errortemplate2.wc
ReturnPage=C:\HOSP_STORE\GGLIVE\web\views\returnpage.wc
ReturnPage2=C:\HOSP_STORE\GGLIVE\web\views\returnpage2.wc
Licencefile=C:\HOSP_STORE\GGLIVE\Deploy\misc\licence.ini
OutFilePath=C:\HOSP_STORE\GGLIVE\web\files\
ViewFilePath=files/
UploadDocPath=C:\HOSP_STORE\GGLIVE\web\uploaded_docs\ 
ViewUploadedDocPath=uploaded_docs/
CabFilePath=cabs/
DycodocPath=C:\HOSP_STORE\GGLIVE\web\dycodocs\
TemplatePath=C:\HOSP_STORE\GGLIVE\web\views\
ServerTime=-1
;specify the default font name and font size for the application.
FontName=arial
FontSize=9

Applicationname=App Name
Codeeditorcommandline=code ..\
Deploymentmode=Production
Systemfilesdatapath=
Version=1.0
Logtofile=On
Markdownpagesanitized=On
Showdesktopform=Off
Pageparsemode=1
Global=Off
Dataconfig=Off

[ServerConfig]
Virtual=
ScriptMaps=wc,wcs,md,hsp
IISPath=IIS://localhost/w3svc/6/root

[DataConfig]
; Database/access settings: SQL(2) Backend or VFP(0) backend
; Data Access Mode -  ... more settings to be implemented.
DataMode=2 
SQLConnectString=driver={ODBC Driver 17 for SQL Server};server=DS50903;database=GGLIVE;trusted_connection=yes;
DataPath=C:\HOSP_STORE\GGLIVE\data\
VFPDbName=wbdev
Db=Off

[Wbprocess]
extn=hsp
Datapath=
Htmlpagepath=C:\HOSP_STORE\GGLIVE\web\views\
Virtualpath=/gglive/

[Wwmaint]
Datapath=.\
Htmlpagepath=C:\HOSP_STORE\GGLIVE\web\
Virtualpath=/gglive/

[Sql]
Errors=Off
SQLConnectString=driver={ODBC Driver 17 for SQL Server};server=DS50903;database=GGLIVE;trusted_connection=yes;
Errormsg=
Errormsg2=
Skipfieldsforupdates=
Error=Off
Outparameters=On
Affectedrecords=1
Errorno=0
Odbcerrorno=Off
Sqlhandle=2
Sqlresult=1
Parameters=NULL
Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Chris
  Rick Strahl
  Mar 19, 2020 @ 11:16pm

My Web Site Advanced Settings on IIS:

My Application Pool settings:

Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Chris
  Rick Strahl
  Mar 19, 2020 @ 11:31pm

This is example of VB Script file, which is run by Scheduled Task:

'begin VBS script code: 

Call LogEntry()

Sub LogEntry()

'Force the script to finish on an error.
On Error Resume Next

'Declare variables
Dim objRequest
Dim URL

'The URL link.
URL = "http://domain/sendstandingorders.hsp?period=0&instancing=single"

Set objRequest = CreateObject("Microsoft.XMLHTTP")

'Open the HTTP request and pass the URL to the objRequest object
objRequest.open "GET", URL , false

'Send the HTML Request
objRequest.Send

'Set the object to nothing
Set objRequest = Nothing

End Sub

'end VBS script code
Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Rick Strahl
  Chris
  Mar 20, 2020 @ 12:41pm

Can you duplicate that reliably by hitting the SingleInstancing URL? Fail every time?

SingleInstancing definitely has a different code path through the application, but it's using the same configuration and launch logic so while different it shouldn't be that different.

See if you can fail the URL directly and consistently (it should)...

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Rick Strahl
  Chris
  Mar 20, 2020 @ 08:11pm

I've updated WebConnectionExperimental.zip one more time to add some additional detail logging. The updated code now also logs the same info used for 'regular' COM servers for Single Instance servers - same deal the the ProgId is displayed as well as the username/login etc.

I've also updated the way that the COM server id is assigned to the server manager to force it through the constructor with the default value from Config in case there's some other way that the object gets instantiated. This should always read the config value now - if the prog Id is still empty there would have to be some sort of config loading problem.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Chris
  Rick Strahl
  Mar 21, 2020 @ 01:30am

Rick,

Are you sure this is the latest file? When I extract it, it shows same date/time as previous one you've sent me?

Anyway, I've extracted it and run scheduled task by sending URL via browser - this time it doesn't record error for missing progId. Then I've tried loading servers via Admin panel and this is the wcerrors.txt.

2020-03-21 19:39:59.307 - 6399306434746_56 - Starting Request - /admin/ShowServerList.wc?1584780000837 - usr: SYSTEM / DS50903\Administrator - iis: /LM/W3SVC/6/ROOT
2020-03-21 19:39:59.308 - 6399306434746_56 - Request Complete - /admin/ShowServerList.wc?1584780000837 - usr: SYSTEM / DS50903\Administrator - iis: /LM/W3SVC/6/ROOT
2020-03-21 19:40:02.135 - 6402134268847_3 - Starting Request - /admin/ShowServerList.wc?1584780003836 - usr: SYSTEM / DS50903\Administrator - iis: /LM/W3SVC/6/ROOT
2020-03-21 19:40:02.136 - 6402134268847_3 - Request Complete - /admin/ShowServerList.wc?1584780003836 - usr: SYSTEM / DS50903\Administrator - iis: /LM/W3SVC/6/ROOT
2020-03-21 19:40:04.614 - 6404613122748_37 - Starting Request - /admin/ShowServerList.wc?1584780006358 - usr: SYSTEM / 
2020-03-21 19:43:54.175 - 66341756215159_101 - Starting Request - /admin/ShowServerList.wc?1584780235913 - usr: SYSTEM / DS50903\Administrator - iis: /LM/W3SVC/6/ROOT
2020-03-21 19:43:54.176 - 66341756215159_101 - Request Complete - /admin/ShowServerList.wc?1584780235913 - usr: SYSTEM / DS50903\Administrator - iis: /LM/W3SVC/6/ROOT
2020-03-21 19:43:54.920 - 66349195771160_100 - Starting Request - /admin/LoadComServers.wc - usr: SYSTEM / DS50903\Administrator - iis: /LM/W3SVC/6/ROOT
2020-03-21 19:43:56.958 - 66369574565161_56 - Starting Request - /admin/ShowServerList.wc?1584780237917 - usr: SYSTEM / DS50903\Administrator - iis: /LM/W3SVC/6/ROOT
2020-03-21 19:43:57.362 - 66349195771160_100 - Request Complete - /admin/LoadComServers.wc - usr: SYSTEM / DS50903\Administrator - iis: /LM/W3SVC/6/ROOT
2020-03-21 19:43:58.253 - 66369574565161_56 - Unhandled Exception (Mainline): Collection was modified; enumeration operation may not execute.
   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Enumerator.MoveNext()
   at Westwind.WebConnection.WebConnectionHandler.ShowServerList(StringBuilder output, Boolean noPerf)
   at Westwind.WebConnection.WebConnectionHandler.HandleAdminTasks()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /admin/ShowServerList.wc?1584780237917 - usr: SYSTEM / DS50903\Administrator - iis: /LM/W3SVC/6/ROOT
2020-03-21 19:43:58.254 - 66369574565161_56 - Request Complete - /admin/ShowServerList.wc?1584780237917 - usr: SYSTEM / DS50903\Administrator - iis: /LM/W3SVC/6/ROOT
2020-03-21 19:44:02.597 - 66425961246162_38 - Starting Request - /admin/wc.wc?wwMaint%7ewcDLLErrorLog - usr: SYSTEM / DS50903\Administrator - iis: /LM/W3SVC/6/ROOT
2020-03-21 19:44:02.597 - 66425961246162_38 - Retrieving Server Instance - /admin/wc.wc?wwMaint%7ewcDLLErrorLog - usr: SYSTEM / DS50903\Administrator - iis: /LM/W3SVC/6/ROOT
2020-03-21 19:44:02.598 - 66425961246162_38 - Server COM Instance retrieved: #1 - /admin/wc.wc?wwMaint%7ewcDLLErrorLog - usr: SYSTEM / DS50903\Administrator - iis: /LM/W3SVC/6/ROOT
2020-03-21 19:44:02.598 - 66425961246162_38 - Com Server ProcessHit Start - /admin/wc.wc?wwMaint%7ewcDLLErrorLog - usr: SYSTEM / DS50903\Administrator - iis: /LM/W3SVC/6/ROOT
Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Rick Strahl
  Chris
  Mar 21, 2020 @ 12:52pm

When you post these logs, please post only what's relevant - there's no need for pages and pages of the same requests to clutter up this page...

The version you have should be 7.10.18. I've just pushed up 7.10.19 in that WebConnectionExperimental.zip...

But yeah this doesn't look like the latest. Latest should show request times when LogDetail=True.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Chris
  Rick Strahl
  Mar 22, 2020 @ 11:39pm

Rick,

I've replaced WebConnectionModule.dll with latest one and left it to work for 24 hours. As far as I can see, no more errors for missing ProgId had been logged. I've switched of LogDetail to False and will keep monitoring in next few days.

Thank you very much for all your help!

Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Chris
  Rick Strahl
  Mar 23, 2020 @ 06:46am

This is the only error which is being recorded at the moment. I'm having 4 instances running, due to high workload.

2020-03-23 22:02:11.436 - 772140283071_10 - Server Loading failed: Server SGLive.SGLiveServer[3] failed to start in time.
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /sendstandingorders.hsp?period=1&instancing=single
Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Rick Strahl
  Chris
  Mar 23, 2020 @ 12:26pm

That's good news.

So there was one more change in the code that forced the ProgId to the configuration value. Apparently there was some failure path through the module that didn't set it and that's what was failing. I'm still not sure what path that is exactly, but the assignment is now happening during initialization of the ComProcess manager which ensures the value is set. I suspect that's why it's working now.

Odd bug in that that code has changed for a long, long time and I've not seen that failure in my own or customer servers so surprising to see this pop up.

But good - this plugs a nasty hard to debug issue. Thank you.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Rick Strahl
  Chris
  Mar 23, 2020 @ 12:28pm

Server Loading failed: Server SGLive.SGLiveServer[3] failed to start in time.

Yeah that's a different issue most likely caused by a server hanging during startup (perhaps due to a file lock or similar).

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Chris
  Rick Strahl
  Mar 23, 2020 @ 01:32pm

Rick, Strange thing about this error is url has &instancing=single parameter. As I have 4 COM servers loaded in memory, there are 2 options:

  1. They are running in memory and sending this request should fire 5th one to load.
  2. None of them are in memory and sending this request should load only 1 COM server.

In either case, I don’t see why it would raise error saying 3rd Server failed to load on time?

Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Rick Strahl
  Chris
  Mar 23, 2020 @ 02:39pm

Check your server error log - not wcerrors.txt, but wctrace.txt in the startup folder and see if there's something there.

That error means the server loaded but failed to respond in time which almost always means that the server startup code stopped or failed somehow.

It could be timing issue or a locked file or something similar.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Chris
  Rick Strahl
  Mar 23, 2020 @ 11:02pm

Rick,

Nothing recorded in wctrace.txt, but also no other errors recorded in wcerrors.txt since the one I've sent you yesterday. Maybe it was something one-off.

Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Rick Strahl
  Chris
  Mar 24, 2020 @ 12:18am

Good.

If there are still issues and you want to follow up, please start a new thread. This thread is getting too large it's all over the place, so better to have a more specific issue thread that's more focused.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Carl Chambers
  Rick Strahl
  Mar 7, 2023 @ 08:02pm

Hi Rick,

This is something I'm not quite clear on.

.cComReleaseServer

This property is used only by the button on the form to release the server - it comes from the configuration setting in the yourApp.ini file.

In COM mode you have to release the server via a URL in the browser - you can do that from the Module Admin page or by directly putting in that URL - add a shortcut in your browser so you can get to it quickly when developing/testing.

So this is used only for releasing a COM server while testing in development?
When you mentioned "the button on the form", what form are you referring to?

Also, I have found 3 different ways of structuring this URL...

COMReleaseUrl=http://www.myDomain.com/myApp/wc.wc?_maintain~release
COMReleaseUrl=http://www.myDomain.com/bin/wc.dll?_maintain~Release
ComReleaseUrl=http://www.myDomain.com/myApp/ReleaseServers.wc

Am I right in assuming that these all do the same thing?
Is any one preferred over the other two ? (WC v6.21)

Thanks,
Carl

Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Rick Strahl
  Carl Chambers
  Mar 7, 2023 @ 09:36pm

The URL is used in many places. The .cComReleaseServer property is only used on the Status form in the Web Connection UI.

The URL should be:

https://yoursite.com/ReleaseComServers.wc

in recent versions.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Carl Chambers
  Rick Strahl
  Mar 8, 2023 @ 05:04pm

Hi Rick,

Sorry if I seem a bit dim on this - please bear with me...

So it looks me that the .cCOMReleaseUrl property should be the same as the URL for "Unload Com Servers" link in the "Web Connection Handler Status Page".
Do I have that right?

Thanks,
Carl

Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Rick Strahl
  Carl Chambers
  Mar 8, 2023 @ 06:03pm

You're talking about two different things.

.cReleaseComUrl is a property of the server uses to point at the release URL for COM objects. The Property is only used in the status form's Exit button.

The actual URL is something different that determines the release Url for COM objects. It has nothing to do with .cComReleaseUrl - it's determined by the type of server, whether you're running https:// or http://, whether you use a virtual directory or root site etc. .cReleaseComUrl should reflect the unload URL, but it may not if your configuration changes.

Yes they should be the same, but the value can vary and how it's configured depends on the environment.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Carl Chambers
  Rick Strahl
  Mar 14, 2023 @ 02:21pm

Thanks, Rick.

Carl

© 1996-2024