New user AVFP4 - problem to run demo

Topics: Developer Forum, User Forum
Oct 18, 2008 at 3:35 AM
I just installed Active VFP 4 and I have some problems to run the demo.

Windows XP SP3
VFP 8.0 SP1
IIS 5.1
.NET Framework 3.5

- First after finish the instalation doesn't found the demo web page  //localhost/avfpdemo4/default.aspx, then I had to create a Virtual Directory "avfpdemo4" to the path "C:\Archivos de programa\dotComSolution\AVFPdemo4\wwwroot" directory (Archivos de Programa=Program Files in my spanish installation)

- When I try to run the example I get the following message:

Caught .NET exception, source: avfpinit err#= 11 line= 843 El valor, tipo o número de argumentos no es válido para la función.11 El valor, tipo o número de argumentos no es válido para la función. .NULL. .NULL. .NULL. .NULL. .NULL. c:\archivos de programa\dotcomsolution\avfpdemo4\activevfp.dll message: c:\archivos de programa\dotcomsolution\avfpdemo4\activevfp.dll

Or in English: the value, type or variables count is not valid for function 11

Could somebody give some advice on how to continue trying to properly install and/or run the demo.

Thanks in Advance.

Oct 18, 2008 at 10:32 AM
I'll try to recreate this to troubleshoot but it should have automatically created the avfpdemo4 virtual directory.
Oct 18, 2008 at 2:15 PM
Edited Oct 18, 2008 at 2:16 PM
I just ran with this exact same configuration and everything ran perfectly.  Did you get any error messages in your setup itself?  Did you get the prompt at the end that says 'Enter IIS Web Site'??  If yes, did you leave it as 'Localhost' and 'Default Web Site' or change it to something else?

You need to get the PostSetup to run properly before the Demo will work.  There should now be a shortcut for it on your Desktop.  try running it again.

You could try running WebAppBuilder too, but, it also runs PostSetup but from a VFP interface.

You need to debug main.prg, line 843 to see why there is a problem.  However, it's got to have something to do with the PostSetup routine not running properly. BTW, were you logged in as Administrator when you ran the setup? 

Oct 18, 2008 at 4:42 PM
Thank for your reply.
Then everytime we create a new project the IIS virtual directory (the one pointing to \project_name\wwwroot ) that should be created automatically is not working.
I have
The good news is that I was able to run the template for a new project created with WebAppBuilder that seems to contain the same demo, but that was after i create the virtual directory mannually.

When I try to edit in visualfoxpro I have a message :  unable to find "mythreadfunc.prg" and "newpkq.prg" but I copied those files from the Avfpdemo4\prg directory

When I build, Do I have to select Multi-threaded COM Server (dl)? and use the name activevfp_dotnetproxy.dll in the \bin directory ?


Oct 18, 2008 at 4:46 PM
Yes and Yes
>>When I build, Do I have to select Multi-threaded COM Server (dl)? and use the name activevfp_dotnetproxy.dll in the \bin directory ?

Oct 18, 2008 at 5:06 PM
Everything is working (except the automatic creation of the virtual directory) when I call  
http://localhost/name/default.asp?action=hello  including your suggestion of code to an external html.

but I receive error messages when i call with default.aspx instead o default.asp
an aproximate translation of the message is:

Error message from the compiler: CS0246: can't find th type or space names  'activevfp_dotnetproxy' (¿directive using or an assmbler reference?)

Sourec code error:

Línea 1:  <% @Page Language="C#" ASPCompat="true" %>
Línea 2: <% @Import Namespace="activevfp_dotnetproxy" %>Línea 3:  <%
Línea 4:  server x ;

Thanks again.



Oct 18, 2008 at 5:40 PM
Well, if activevfp_dotnetproxy.dll really is in the \bin directory for your new project, then this is one case where you'll probably have to do an iisreset to stop/start the web server.  Then try it again. 
You may want to take a look at the postSetup project to see exactly what it does - those things, like creating virtuals and setting folder permissions, have to be done for each project you create (including avfpdemo4).  if they aren't done either automatically, with postSetup, or manually, then i can't guarantee anything will work as expected. 
Oct 18, 2008 at 8:38 PM

Now everything is working!!
postsetup, asp and aspx.

My problem was:
 In the WebAppBuilder I was leaving the Web Site as "Default Web Site" but in my ISS the name has to be in spanish "Sitio Web predeterminado".
It was not necesary to Stop IIS and the app creates automatically the virtual directories for avfpdemo4 and avfpdemo4r.

Again, congratulations for this excellent product.

Oct 18, 2008 at 9:06 PM
Great news!  Thanks for the info on "Sitio Web predeterminado"
Oct 30, 2008 at 10:17 PM

When I tried to run the postsetup, in my Windows Vista Business 32 Bits Version, IIS 7 installed and working fine, the error:

Runtime Error,

Program: C:\program files\dotComSolutions\PostSetup.Exe

This application has requested the Runtime to terminate it in an unusual way

Best regards,

Jun 8, 2009 at 5:11 AM


My question is how can I contact your demos using a client vfp9 SP1 program without a browser.

I downloaded v4 demo today and have everything working ok, including getting the 'hello' demo to work from a different IP address over the Internet. When I first installed, I got errors because some of the PRG's are not being copied from the 'program files' demo to my setup. That was an easy one.

I have had a SOAP3 / VFP9 SP1 server working for some time. At this time, I contact my com server using something like the demo that ships with VFP9 in the help. It 'talks' to a wsdl web page like this:

    loWSHandler = Newobject("WSHandler",Iif(Version(2)=0,"",Home()+"FFC\")+"_ws3client.vcx")
    loMywebsiteClients = loWSHandler.SetupClient("", "MywebsiteClients", "MywebsiteClientsSoapPort")
    luResult = loMywebsiteClients.MywebsiteWeb("test")
    luResult = loMywebsiteClients.MywebsiteLogin("test","test")
    luResult = loMywebsiteClients.MywebsiteGetNonce()

In this sample, I am calling methods in the com named MywebsiteWeb, MywebsiteLogin, MywebsiteGetNonce. This works well.

In the VFP examples, I have an 'asp' listener so I think it must be possible, but I have not been able to get the asp page to work, even though regular asp pages with jscript and vbscript work normally.

I am interested in converting some things to ActiveVFP because it appears to have more & better functions with less trouble.  My question is regarding the client. Your demos seem to all be using a browser for the client: http://webpage.aspx?action=hello, etc. I would like to be able to accomplish this same function using a client VFP SP1 program. I do not want a browser screen to appear. For example, something I cannot do now: I want to use basic authentication with the Windows name/password using https (I now have a SSL certificate on my web site and it works well from a browser).