Problem with include function

Topics: User Forum
Dec 8, 2011 at 2:18 AM

Hello Claude,

I come back to test the new 5.6 version but i'm having some problems with the include statements (include function in main.prg).

The solution was very simple and elegant but i'm unable to view the samples properly.

The include's files are not being merged. I receive only the included footer file or if i take out the line for included footer, i receive only the header file.

If i take out both include lines (header and footer) , it works!.

Regards and again congratulations.

Julio

Coordinator
Dec 8, 2011 at 2:25 AM

That's strange.  It never did that for me and that's the first I've heard from anyone!  What OS are you using?? 

So, the demo never worked right?  Or did you try to add something and then it didn't work..  I'm a little confused ...

Dec 8, 2011 at 2:46 AM

Claude, thanks for your answer.

OS: WIN7 32 Pro  - IIS7.1

To be able to pass all the error messages (security warnings) i had to:

1. Open IIS Manager
2. Click Application Pools and select the DefaultAppPool.
3. Click "Advanced Settings.." in the right actions panel.
4. In the Process Model section, change Identity to Network Service

with those steps I pass the security warning but the I get a COM+ related error, so as a final solution I had to change the Identity to Custom Identity.

The original demos shows only the last included file (footer). The main.prg is untouched.

Regards.

Coordinator
Dec 8, 2011 at 3:04 AM

My DefaultAppPool has 'ApplicationPoolIdentity' .  Do you have that?  Did you change anything else??

Now that you took Header and Footer out, does the rest work???

Dec 8, 2011 at 3:27 AM

Claude,

By default, IIS 7 application pools use the built-in account ApplicationPoolIdentity (Network Service in previous version of IIS), but now is more restrictive.

With the default I received "SecurityException" error, probably caused by low trust level of some .net assemblies, then I try to use Network Service as the application pool identity instead, but i received the message : "Retrieving the COM class factory for component ... failed due to ..." then to test AVFP I changed the pool identity to custom identity and put the administrator account info.

I have used and registered the previous version in this PC, now for this new one, I just copied into wwwroot directory, create the virtual directory and convert to application.

If I took Header and Footer out everything works fine.

Regards.

Coordinator
Dec 8, 2011 at 3:33 AM

I don't understand why I don't see this and no one else has complained about this.  There's got to be something about your setup.  I have tested on Vista 32-bit and Win 7 64-bit with no sign of this.

Can you test on another machine without changing any of the Application Pool settings??

Coordinator
Dec 8, 2011 at 3:42 AM

It might also be that you need to re-cycle the app pool after each change to make sure the page is firing up cleanly..

Dec 8, 2011 at 3:46 AM

Claude,

I guess this is just a windows curiosity, I get the same result in IE, Chrome and FireFox.

Probably after I tested many programs to optimize windows startup, perfomances and security, who knows what have changed in the registry that i get this weird situation.

Anyway I can continue testing AVFP and can live without include function.

Thanks again Claude, and I hope to see your solution as part of some cloud computing model with vfp as back-end.

Regards.