Web Connection
Problem running my first demo project
Gravatar is a globally recognized avatar based on your email address. Problem running my first demo project
  Michele
  All
  Apr 12, 2018 @ 08:49am

I installed web connection and create new project as explained in documentation, but whe i run the app and i open the browser on http://localhost/webdemo/testpage.wp nothing is shown.. and in the Web Connection form in Visual Foxpro nothing is shown...no requests are shown...nothing... the form is empty. What is missing ?

Gravatar is a globally recognized avatar based on your email address. re: Problem running my first demo project
  Rick Strahl
  Michele
  Apr 12, 2018 @ 05:03pm

Does the default/startup html page work?

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Problem running my first demo project
  Michele
  Michele
  Apr 12, 2018 @ 10:54pm

Yes...the default page us shown. When i click in "hello world test page" nothing happens. Waiting..... And in web connection status form where i expected to see requests i can't see nothing. Lime it didn't understand how to read the page, bug in iis i saw the extension in modules

Here is some images and video that show my problem...

Video

Gravatar is a globally recognized avatar based on your email address. re: Problem running my first demo project
  Carl Chambers
  Michele
  Apr 13, 2018 @ 10:58am

I just created a new project with Version 6.19 and encountered the same thing.

The demo features work fine.

Gravatar is a globally recognized avatar based on your email address. re: Problem running my first demo project
  Rick Strahl
  Carl Chambers
  Apr 13, 2018 @ 01:00pm

Just to be clear - you're saying the Web Connection demo works, but a new project created with the Wizard doesn't?

I'm surprised because that is one of the checks that I go through for each release - set up new projects (Web and REST) and create an additional process to an existing project so I would think that would work.

Re-checking here...

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Problem running my first demo project
  Carl Chambers
  Rick Strahl
  Apr 13, 2018 @ 01:26pm

Just to be clear - you're saying the Web Connection demo works, but a new project created with the Wizard doesn't?

Yes, that is correct. The Server.Process() method does not execute and nothing is displayed in the server window.

Don't know if it's related or not, but I entered multiple script maps in the wizard separated by commas. An entry was created in web.config for each script map but there was only one condition added in Server.Process(). CASE lcExtension == "PSP,PLM,PSW" and the Hello World link was testpage.psp,plm,psw.

I have never done this before so I'll ask before I try. To get rid of this and try again, can I just delete the project folder and remove the site in IIS Manager or is it more involved than that?

Gravatar is a globally recognized avatar based on your email address. re: Problem running my first demo project
  Rick Strahl
  Michele
  Apr 13, 2018 @ 01:28pm

Ok so took a look and I can duplicate what you're seeing. It looks like there's a problem in the configuration wizard that sets up the new project and it's setting the TEMP path of the Web Connection FoxPro server incorrectly when the project is created.

You need to change the temp path like this:

or in the yourApp.ini file:

TempFilePath=.\temp\

Off I go to figure out what's gone wrong in the Wizard 😃

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Problem running my first demo project
  Carl Chambers
  Rick Strahl
  Apr 13, 2018 @ 02:24pm

TempFilePath=.\temp\

Funny. I noticed the long path that was there but didn't think anything of it.
That took care of it. Thanks.

Gravatar is a globally recognized avatar based on your email address. re: Problem running my first demo project
  Rick Strahl
  Carl Chambers
  Apr 13, 2018 @ 02:34pm

I'm still not sure what's causing that.

I checked the code and ran through it manually and it works fine. I think it might be a bad template that has an invalid path. If the path can't be found it then defaults to the Temp folder (which should probably be changed to use .\Temp instead).

In fact I made no changes recompiled the Console and now it works. Hate it when that happens...

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Problem running my first demo project
  Michele
  Rick Strahl
  Apr 13, 2018 @ 02:56pm

I already had .\temp but it didn't work.. I'll try again tomorrow. I Am writing from Italy and we have some hours of difference..

Gravatar is a globally recognized avatar based on your email address. re: Problem running my first demo project
  Rick Strahl
  Michele
  Apr 13, 2018 @ 03:32pm

So I took a closer look at this and the issue is that the main project template had a breaking change that is breaking this. Setting the path to .\temp\ is necessary but another tweak is needed for the file to actually get read.

In your main project find the OnInit() method and change:

PROTECTED FUNCTION OnInit

THIS.cAppName = "Testproject7"

*** THIS LINE IS MISSING AND NEEDS TO BE ADDED - REPLACE WITH YOUR PROJECT NAME
THIS.cAppIniFile = addbs(THIS.cAppStartPath) + "Testproject7.ini"

ENDFUNC

This line was inadvertantly removed from the main PRG template. If you want to fix this permanently (we'll fix it in the next update) for now you can add the following line into the \templates\appmain.prg template that's responsible for generting the main prg:

PROTECTED FUNCTION OnInit

*** If you need to override your application's startup path
*** to something other than the current directory do it here:
*** THIS.cAppStartPath = <your custom path>
*** THIS.cAppIniFile = addbs(THIS.cAppStartPath) + "<%= pcAppName%>.ini"

THIS.cAppName = "<%= pcAppName %>"
THIS.cAppIniFile = addbs(THIS.cAppStartPath) + "<%= pcAppName%>.ini"

ENDFUNC

This will fix the problem for any new project creation but obviously won't affect projects already created with the bad template.

What was the problem?

Looks like this break was introduced in 6.19 when the template was updated. There were some underlying changes in the server that seemed to make this default setting unnecessary by setting the classname as the AppName. Unfortunately that was a bad assumption because the class name includes the Server postfix (as in testAppServer) - this caused entire config file to never be read and just default values to be used.

As a side effect I looked over the load code and reset some of the defaults. The new default for cTempFilePath now points at .\Temp\ so even if the settings are not read the server should still work with a default installation in the future.

Fix in 6.20 next week

This will be fixed in 6.20 which should be out by early next week.

Thanks for bringing this to my attention...

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Problem running my first demo project
  Michele
  Rick Strahl
  Apr 14, 2018 @ 03:41pm

Thanks to you. Bye

© 1996-2025