AVFP 5.52 Web.config file

Topics: Developer Forum, Project Management Forum, User Forum
Coordinator
Jan 4, 2013 at 2:39 PM
Edited Jan 4, 2013 at 3:03 PM

The following only applies to AVFP 5.52 and earlier versions, not avfp552(for GoDaddy) or avfp6.02:

You may want to turn off the aspnet20trace logging in web.config.  It creates a text file in c:\temp (if that directory exists).  Rather than create a whole new version to fix this I thought I would just let you know since I think it is harmless but may slightly impact performance.

Take these sections out of web.config if they exist:

<trace enabled="true" pageOutput="false" writeToDiagnosticsTrace="true" />    

<compilation debug="true" />

<system.diagnostics>    

<trace autoflush="true">      

<listeners>        

<!-- add  name="WebPageTraceListener" type="System.Web.WebPageTraceListener, System.Web,  Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" / -->       

<add  name="TestTracer" type="System.Diagnostics.TextWriterTraceListener, System,  Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"  initializeData="C:\Temp\aspnet20trace.log" />      

</listeners>    

</trace>  

</system.diagnostics>

 

The new web.config would then look like this:

 

<?xml version="1.0" encoding="utf-8"?>

<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">

  <appSettings />  

<connectionStrings />  

<system.web>    

<authentication mode="Windows" />    

<httpModules>      

<clear/>      

<add name="HttpModule_ProcessManifest" type="MazeComputer.AspManifestHelpers.HttpModule_ProcessManifest, AspManifestHelpers" />      

<add name="Session" type="System.Web.SessionState.SessionStateModule"/>   

</httpModules>    

<customErrors mode="Off" />  

</system.web>  

<system.webServer>    

<modules>       

<add name="HttpModule_ProcessManifest" type="MazeComputer.AspManifestHelpers.HttpModule_ProcessManifest, AspManifestHelpers" preCondition="managedHandler" />    

</modules>    

<validation validateIntegratedModeConfiguration="false" />  

</system.webServer>

</configuration>

Or just download the new one from here (DO NOT use this new one for AVFP 6.02 or AVFP for GoDaddy!) http://download-codeplex.sec.s-msft.com/Download?ProjectName=activevfp&DownloadId=597670

Jan 27, 2013 at 3:45 PM

I've only tried AVFP on Win 7, Win 8 and Win 2008 Server.

For WIn 2008 server (r2) II found I had to add the red high-lighted:

<pages masterPageFile="default.html"/>     

 <httpRuntime requestValidationMode="2.0" />

<identity impersonate="true" password="" userName="" />

Coordinator
Jan 27, 2013 at 8:50 PM
Edited Jan 27, 2013 at 8:51 PM

Thanks!

So AVFP didn't work at all on Win 2008 Server until you added:

<httpRuntime requestValidationMode="2.0" />   ??

I haven't tried Win 2008 Server myself but I heard AVFP worked on it.  

I also just found out that AVFP 5.5x versions will work on XP and all the Windows Starter and Home Basic Versions of the more recent Windows.  The key is to use IIS Express.  The activevfp.dll has to be manually registered, though.  I guess I'll put together a guide on how to do it.

Jan 28, 2013 at 12:07 AM

 

So AVFP didn't work at all on Win 2008 Server until you added:

<httpRuntime requestValidationMode="2.0" />   ??

~~~~~~~

Flawlessly.

Jan 28, 2013 at 3:16 PM

Ahh.. now I remember. I created a COM server (requiring /REGSERVER)

based on: http://msdn.microsoft.com/en-us/library/ms917477.aspx

So I could use foxypreviewer for PDF & printing. Win2k8 didn't like that without requestValidationmode=2.0

Coordinator
Jan 28, 2013 at 6:24 PM

Are you saying you used FoxyPreviewer for printing PDFs from ActiveVFP???  

Jan 29, 2013 at 12:59 AM

To be clear, I call the COM server object

__________

       cCR = CHR(13)
       cStr = []
       cStr = cStr + [SELECT customer] +cCR
       cStr = cStr + [SET ORDER TO cust_no] + cCR

      oPrintServer = CREATEOBJECT("avfprint.vfprint")

     I load these up with the cStr:

      oPrintServer.cScript              = cStr  ( there's a few "properties" called cScript & cScript1 etc)

     and then call the printing method of that COM server:

    oPrintServer.GoPrint()

   The COM server has a GOPRINT() method with some  EXECSCRIPTs  that allows me to pass some code to that cloud.

  IF LEN(TRIM(THIS.cScript)) >0
    xx =THIS.cScript
     EXECSCRIPT(xx)
 ENDIF

and then, if a PDF property is set, then print to PDF using FoxyPreviewer.APP

and if the Printer name is filled in (I save those in a cookie) then print the foxpro .FRX too. Works well.

It took me TOOO long to discover COMRETURNERROR. If I'd know about that it would have taken a 10th the time

TRY
  SET PRINTER TO NAME ( cTempPtr )
CATCH TO oEx
  COMRETURNERROR(oEx.Message(1),oEx.Details) 
ENDTRY

Coordinator
Jan 29, 2013 at 3:22 AM
Edited Jan 29, 2013 at 3:36 AM

Thanks!!  This is very good stuff!

Now if only FoxCharts could work with AVFP.