Compilation Error on Windows 2000 Server

Topics: User Forum
Apr 24, 2009 at 4:03 PM
Edited Apr 24, 2009 at 4:04 PM
ActiveVFP is a nice app.  Thanks for creating it.  It works well on my XP development computer, but a Server Error is reported in IE after installing on Windows 2000 Server and navigating to http://localhost/avfpdemo4/.

activevfp_dotnetproxy.dll is located in my C:\Program Files\dotComSolution\AVFPdemo4\wwwroot\bin directory.  I have run iisreset.

Scott

Server Error in '/avfpdemo4' Application.

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0246: The type or namespace name 'activevfp_dotnetproxy' could not be found (are you missing a using directive or an assembly reference?)

Source Error:


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

Source File: c:\program files\dotcomsolution\avfpdemo4\wwwroot\default.aspx    Line: 2


Show Detailed Compiler Output:

C:\WINNT\system32> "c:\winnt\microsoft.net\framework\v1.1.4322\csc.exe" /t:library /utf8output /R:"c:\winnt\assembly\gac\system.enterpriseservices\1.0.5000.0__b03f5f7f11d50a3a\system.enterpriseservices.dll" /R:"c:\winnt\assembly\gac\system.data\1.0.5000.0__b77a5c561934e089\system.data.dll" /R:"c:\winnt\assembly\gac\system.drawing\1.0.5000.0__b03f5f7f11d50a3a\system.drawing.dll" /R:"c:\winnt\assembly\gac\system.web.mobile\1.0.5000.0__b03f5f7f11d50a3a\system.web.mobile.dll" /R:"c:\winnt\assembly\gac\system.xml\1.0.5000.0__b77a5c561934e089\system.xml.dll" /R:"c:\winnt\assembly\gac\system.web.services\1.0.5000.0__b03f5f7f11d50a3a\system.web.services.dll" /R:"c:\winnt\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll" /R:"c:\winnt\assembly\gac\system.web\1.0.5000.0__b03f5f7f11d50a3a\system.web.dll" /R:"c:\winnt\microsoft.net\framework\v1.1.4322\mscorlib.dll" /out:"C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\avfpdemo4\704dd2fc\20ac486c\3jsysngz.dll" /debug- /optimize+ /warnaserror /w:1  "C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\avfpdemo4\704dd2fc\20ac486c\3jsysngz.0.cs"


Microsoft (R) Visual C# .NET Compiler version 7.10.6001.4
for Microsoft (R) .NET Framework version 1.1.4322
Copyright (C) Microsoft Corporation 2001-2002. All rights reserved.

c:\program files\dotcomsolution\avfpdemo4\wwwroot\default.aspx(2,11): error CS0246: The type or namespace name 'activevfp_dotnetproxy' could not be found (are you missing a using directive or an assembly reference?)


Show Complete Compilation Source:

Line 1:    //------------------------------------------------------------------------------
Line 2:    // <autogenerated>
Line 3:    //     This code was generated by a tool.
Line 4:    //     Runtime Version: 1.1.4322.2407
Line 5:    //
Line 6:    //     Changes to this file may cause incorrect behavior and will be lost if 
Line 7:    //     the code is regenerated.
Line 8:    // </autogenerated>
Line 9:    //------------------------------------------------------------------------------
Line 10:   
Line 11:   namespace ASP {
Line 12:       using System;
Line 13:       using System.Collections;
Line 14:       using System.Collections.Specialized;
Line 15:       using System.Configuration;
Line 16:       using System.Text;
Line 17:       using System.Text.RegularExpressions;
Line 18:       using System.Web;
Line 19:       using System.Web.Caching;
Line 20:       using System.Web.SessionState;
Line 21:       using System.Web.Security;
Line 22:       using System.Web.UI;
Line 23:       using System.Web.UI.WebControls;
Line 24:       using System.Web.UI.HtmlControls;
Line 25:       
Line 26:       #line 2 "c:\program files\dotcomsolution\avfpdemo4\wwwroot\default.aspx"
Line 27:       using activevfp_dotnetproxy;
Line 28:       
Line 29:       #line default
Line 30:       #line hidden
Line 31:       
Line 32:       
Line 33:       public class default_aspx : System.Web.UI.Page, System.Web.SessionState.IRequiresSessionState, System.Web.IHttpAsyncHandler {
Line 34:           
Line 35:           private static bool __initialized = false;
Line 36:           
Line 37:           private static System.Collections.ArrayList __fileDependencies;
Line 38:           
Line 39:           public default_aspx() {
Line 40:               System.Collections.ArrayList dependencies;
Line 41:               if ((ASP.default_aspx.__initialized == false)) {
Line 42:                   dependencies = new System.Collections.ArrayList();
Line 43:                   dependencies.Add("c:\\program files\\dotcomsolution\\avfpdemo4\\wwwroot\\default.aspx");
Line 44:                   ASP.default_aspx.__fileDependencies = dependencies;
Line 45:                   ASP.default_aspx.__initialized = true;
Line 46:               }
Line 47:               this.AspCompatMode = true;
Line 48:           }
Line 49:           
Line 50:           protected override bool SupportAutoEvents {
Line 51:               get {
Line 52:                   return false;
Line 53:               }
Line 54:           }
Line 55:           
Line 56:           protected System.Web.HttpApplication ApplicationInstance {
Line 57:               get {
Line 58:                   return ((System.Web.HttpApplication)(this.Context.ApplicationInstance));
Line 59:               }
Line 60:           }
Line 61:           
Line 62:           public override string TemplateSourceDirectory {
Line 63:               get {
Line 64:                   return "/avfpdemo4";
Line 65:               }
Line 66:           }
Line 67:           
Line 68:           private void __BuildControlTree(System.Web.UI.Control __ctrl) {
Line 69:               __ctrl.SetRenderMethodDelegate(new System.Web.UI.RenderMethod(this.__Render__control1));
Line 70:           }
Line 71:           
Line 72:           private void __Render__control1(System.Web.UI.HtmlTextWriter __output, System.Web.UI.Control parameterContainer) {
Line 73:               
Line 74:               #line 3 "c:\program files\dotcomsolution\avfpdemo4\wwwroot\default.aspx"
Line 75:               
Line 76:   server x ;
Line 77:   x = new server() ;
Line 78:   try
Line 79:      {
Line 80:   	Response.Write(x.Process());
Line 81:      }
Line 82:   catch(Exception ex)
Line 83:      {
Line 84:          	Response.Write("Caught .NET exception, source: " + ex.Source + " message: " + ex.Message);  
Line 85:      }
Line 86:   
Line 87:   
Line 88:               
Line 89:               #line default
Line 90:               #line hidden
Line 91:           }
Line 92:           
Line 93:           protected override void FrameworkInitialize() {
Line 94:               this.__BuildControlTree(this);
Line 95:               this.FileDependencies = ASP.default_aspx.__fileDependencies;
Line 96:               this.EnableViewStateMac = true;
Line 97:               this.Request.ValidateInput();
Line 98:           }
Line 99:           
Line 100:          public override int GetTypeHashCode() {
Line 101:              return 5381;
Line 102:          }
Line 103:          
Line 104:          public virtual System.IAsyncResult BeginProcessRequest(System.Web.HttpContext context, System.AsyncCallback cb, object data) {
Line 105:              return this.AspCompatBeginProcessRequest(context, cb, data);
Line 106:          }
Line 107:          
Line 108:          public virtual void EndProcessRequest(System.IAsyncResult ar) {
Line 109:              this.AspCompatEndProcessRequest(ar);
Line 110:          }
Line 111:      }
Line 112:  }
Line 113:  




Version Information: Microsoft .NET Framework Version:1.1.4322.2407; ASP.NET Version:1.1.4322.2407
Coordinator
Apr 24, 2009 at 6:26 PM
activevfp.dll and activevfp_dotnetproxy goes hand in hand.  I've got the activevfp.dll in c:\program files\dotcomsolution\avfpdemo4 .  That should have been registered on installation.  Your activevfp_dotnetproxy seems to be in the right place and is called from the default.aspx in the wwwroot directory.  The default.aspx should know that the proxy dll is in the BIN directory.  Did you use the ActiveVFp setup and correct version for whatever version of VFP you have and, if so, any errors?

I guess the first thing I would try is to re-compile the avfpdemo4 project and re-run..
Apr 24, 2009 at 9:01 PM
Using IIS management console in the virtual directory properties on the ASP.NET tab under ASP.NET version (drop down box), I changed from 1.1.4322 to 2.0.50727.

Problem solved.
Coordinator
Apr 24, 2009 at 9:37 PM
Good catch!! Yeah, it requires ASP.NET 2 or higher..