Web Connection
Request Timed Out
Gravatar is a globally recognized avatar based on your email address. Request Timed Out
  Harvey Mushman
  All
  Sep 21, 2022 @ 07:16am

I followed the instructions in WC 3.x for setting up a WC application to automatically start in File Mode from an EXE compiled version. In looking at hte Admin.aspx page, I can see the two servers are running. When I look at Task Manager I also see the Prog Id's there too, so I know they started. But the request is timing out, why...

I did a bit more digging and see in the /temp/wcErrors.txt the last hit which timed out. It reads as follows:

2022.09.21 06:53:13:799 - 7204_5CACE0675A6D - Web Connection Request timed out. - /wc.dll?CFM~Greeting - 1008 - 7204 - Com: -1:0:0

In Task Manager, I looked at hte properties of one of hte servers. The Security tab shows which roles are assigned to the process and I see that Administrators have full rights.

The instruction in the WC documentation described the following:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon

AutoAdminLogon REG_SZ 1 - AutoLogon 0 - Manual Logon DefaultPassword REG_SZ The accout password DefaultUsername REG_SZ The account name

But the documentation described using NT Resource Kit which is a bit outdated, so I used RegEdit and manually looked up the entries. The AutoAdminLogon and DefaultUsername keys both existed, so setting these values was not an issue. I had to add a "String" entry for the DefaultPassword. The original DefaultUsername was set to Administrator but since this account has been disabled, I changed the value to reflect my replacement administrator. THe password for my replacement administrator was used in this case. I assume this all worked since the application started and shows up in the Admin.aspx report.

By the way, if I "DO myApplication" within VFP the hits fly through perfectly without any errors.

What am I missing, any suggestions?

Gravatar is a globally recognized avatar based on your email address. re: Request Timed Out
  Rick Strahl
  Harvey Mushman
  Sep 21, 2022 @ 11:05am

Oh geez, no...

Don't run as Interactive with a Logon. Let the app run under SYSTEM or whatever account the Appplication Pool runs under. Are we back to this very same discussion we had a few weeks ago?

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Request Timed Out
  Harvey Mushman
  Rick Strahl
  Sep 22, 2022 @ 08:10am

Ok, my bad... I changed the DefaultUsername in the registry to my alternate administrator account as you suggested for security reasons. So now the registry has a default user and password that "should" start the wc3.x application.

From the /admin.aspx page after rebooting the server, I can see the servers loading on first hit but the response to the hit, times out.

If I start VFP and DO myAPP the server runs without error.

In IIS the permissions for the website include the INTERACTIVE with full rights. The Application Pool is set to LOCALSYSTEM. The permissions on myApp.EXE include INTERACTIVE with full rights.

But yet the application only runs from VFP console... so strange!

Can you point me to where else to look for the disconnect?

Gravatar is a globally recognized avatar based on your email address. re: Request Timed Out
  Rick Strahl
  Harvey Mushman
  Sep 22, 2022 @ 09:47am

Make sure the exefile key in web.config points at the right path for the exe and make sure you can run the EXE from the command line and it works.

You'll also want to make sure that the application starts in the right folder. Perhaps you have a path problem where the folder is not set to the EXE's path and then it can't find files and fails as file open errors hang.

You can add SET TABLEPROMPT OFF to force errors instead, but if it happens during startup this will still hang or simply exit.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Request Timed Out
  Harvey Mushman
  Rick Strahl
  Sep 24, 2022 @ 09:10am

OK so the web.config file has the correct path.

On the other hand, the EXE throws an error when I start the EXE from the open folder (not within VFP). In this case lunching the app generates an error saying "The resource file is not valid. Overwrite it with a new empty one? Not knowing what to answer, I selected No, and then the app launched. I tested it and it worked.

After a bunch of searching, I found an Feb. 2021 Message Board conversation about resource files but after checking my installed version of VFM determined this was not the issue. At least as far as I can tell the version (9.0.0.5815) is correct.

I decided to track the resource file that was causing the error, I would need to find it if I answered "Yes" to the error popup. Being clever, I set the system date/time to the year 2050, assuming any new file that was written would have a dateStamp in the future that I could go back and search for after running the application.

I ran myApp.EXE again only I answered YES when asked to overwrite the resource file. The app started and seems to be functionally correctly. I then ran a search for any modified files in the year 2050 besides a bunch of MS scheduling tasks, I discovered three files in my application folder had changed. They are:

myApp.ini FoxUser.dbf FoxUser.fpt

After resetting my date and time back to being correct for today, I reran the myApp.EXE and now No error is generated. The application also worked. Next big test, see if after rebooting the application would be started automatically. HooRaw - myApp.exe auto started after booting and without logging into the server!

Once logged in however, I don't see the console of the app? Not that I need to see it, so... now onto testing, does COM work, Hell No!

COM should auto start but it did not, so I tried to manually load servers and they loaded but do not respond to hits. This must be a permissions issue - sigh - starching my head.

Progress but not there yet... any suggestions?

Gravatar is a globally recognized avatar based on your email address. re: Request Timed Out
  Tore Bleken
  Harvey Mushman
  Sep 24, 2022 @ 10:01am

Make sure to have Resource=Off in your project's config.fpw.

Gravatar is a globally recognized avatar based on your email address. re: Request Timed Out
  Harvey Mushman
  Tore Bleken
  Sep 24, 2022 @ 11:12am

When I open this file in VFP, there are several errors listed. But none of them say anything nor do I see and entry for Resource. The file date is 12/19/1999 and so I assume it came along with teh original WC3.x application I'm running. What should be in this file?

Gravatar is a globally recognized avatar based on your email address. re: Request Timed Out
  Rick Strahl
  Harvey Mushman
  Sep 24, 2022 @ 05:07pm

As @Tore mentioned, you should have SET RESOURCE OFF either in the config.fpw or in the startup code of the application - a server application should not need a resource file. I highly recommend SET TABLEPROMPT OFF too as that'll ensure that open file errors don't hang the application but rather throw an error - won't help with other files than data not found though.

First and foremost make sure the app runs from the DOS terminal or Explorer (ie. outside of VFP). If that doesn't work nothing will work.

Once that works you can try letting Web Connection auto-launch those servers. They will run invisibly because they won't be running in the current user context (I've said this multiple times in this and another thread). That's the whole point of not requiring a user login to run the application.

You can run with a visible server form launched from Web Connection, but only if the server is launched under the INTERACTIVE account, which requires explicit DCOM configuration. I wouldn't recommend that. Get over trying to have hte window open - you don't need it. you can look at requests and activity on the Admin page and server logs from that page. If you need interactive testing to see failures or something in the server window then run from Explorer or command line explicitly. The rest of the time the server window is just a resource drain.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Request Timed Out
  Harvey Mushman
  Rick Strahl
  Sep 25, 2022 @ 06:05pm

Okay, I looked for SET RESOURCE OFF and found it was commented out in myAppMain.prg. It was in the PROTECTED FUNCTION SetServerEnvironment under #IF !DEBUGMODE section of code. It was not me that put in that comment, not back in those days!

As far as the SET TABLEPROMPT OFF, I added it at the top of the myAppMain file. After tat I recompiled the project and tried to run it from the MSDOS COMMAND window. Guess what... the RequestLog.dbf file was corrupt and hanging on an error. I found an old copy of the file, copied into my project folder, opened it and zapped it to start clean and then tried to run it from DOS window. It worked this time.

OK, making progress... thanks for your tips!

Big test, what happens after a clean reboot of the machine? The server and I tested another application without logging in just to be sure the machine was up and running.

After I knew the machine was running, I Re-Read Configuration on myApp to see if any servers had started and found the nothing was started. So I made a request and watched as two servers started up. But after several minutes of waiting for the page to be displayed, I got a Request Timed Out message.

Not giving up just yet, on the WC maintenance page, I clicked on Load File Servers and then requested the first page again. This time the system responded and two new instances were running. Keep in mind, I have not yet logged into the machine itself.

Just for the hick of it, I unloaded the running servers and requested the first page again. Again no response, the servers are not auto loading. Next test, switch to COM. Nope, no luck... the servers manually loaded when I clicked to Load Servers but they did not auto start nor do they respond to hits.

Back to the drawing board... I suspect DCOM is not connected to the Application Pool correctly which might date back to several weeks ago while I was installing the application.

Gravatar is a globally recognized avatar based on your email address. re: Request Timed Out
  Rick Strahl
  Harvey Mushman
  Sep 26, 2022 @ 02:51pm

You need to set the AutoStartServers to true and ServerCount in web.config to autostart in file mode.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Request Timed Out
  Harvey Mushman
  Rick Strahl
  Sep 26, 2022 @ 03:13pm

Both parameters are set as you describe and have been for several weeks.

Yesterday I started up RegEdit and then searched for myApp name. I found a lot of entries. Do you know how I can trace which ones are correct and which ones might have been from a failed attempt to install myApp? Seems like I should be able to trace through the entries by looking at that is being set and what the entry ID is when it is a GUID.

Gravatar is a globally recognized avatar based on your email address. re: Request Timed Out
  Harvey Mushman
  Rick Strahl
  Sep 27, 2022 @ 06:25am

For what it is worth... 😦

The other application that is running on this same machine and runs in COM, once it shuts down for lack of activity, will NOT restart unless I am logged onto the system. This app was working correctly before I started to screw with trying to get the other application to auto start. So by trying to fix one app I have now broken the other.

Any suggestions?

© 1996-2024