Server Error

Topics: User Forum
Dec 14, 2010 at 1:42 PM
Edited Dec 14, 2010 at 1:43 PM

Yesterday I was working on my test site and all way fine.

This morning when I go to connect I get the message below.  This has happened before and I'm not sure what I do but eventually it starts working again.  Any suggestions?

Also I have been trying to make the code modular.  I tried placing the code in seperate .prg files.  Then I linked them using

SET procedure to test01.prg additive

Nowever now I can not update test01.xfp.  I'm assuming that is because the activevfp.dll stays loaded no matter what do and holds onto the file.

Suggestions?

Thanks

Bob

 

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {BEF60CED-FB7C-4835-A927-4EC90F5162CB} failed due to the following error: 80040154.

Source Error:

Server Error in '/' Application.

Retrieving the COM class factory for component with CLSID {BEF60CED-FB7C-4835-A927-4EC90F5162CB} failed due to the following error: 80040154.

 

Line 3:  <%
Line 4:  server x ;
Line 5:  x = new server() ;
Line 6:  try
Line 7:     {


Source File: c:\Inetpub\CastRoot\default.aspx    Line: 5

Stack Trace:

[COMException (0x80040154): Retrieving the COM class factory for component with CLSID {BEF60CED-FB7C-4835-A927-4EC90F5162CB} failed due to the following error: 80040154.]
   ASP.default_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in c:\Inetpub\CastRoot\default.aspx:5
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +256
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
   System.Web.UI.Page.Render(HtmlTextWriter writer) +29
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1266

 

 


 

Version Information: Microsoft .NET Framework Version:2.0.50727.3615; ASP.NET Version:2.0.50727.3618

<!-- [COMException]: Retrieving the COM class factory for component with CLSID {BEF60CED-FB7C-4835-A927-4EC90F5162CB} failed due to the following error: 80040154. at ASP.default_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in c:\Inetpub\CastRoot\default.aspx:line 5 at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.Page.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) [HttpUnhandledException]: Exception of type 'System.Web.HttpUnhandledException' was thrown. at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.Util.AspCompatApplicationStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) [HttpException]: Exception of type 'System.Web.HttpException' was thrown. at System.Web.HttpAsyncResult.End() at System.Web.UI.Page.AspCompatEndProcessRequest(IAsyncResult result) at ASP.default_aspx.EndProcessRequest(IAsyncResult ar) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\63413771\19819f95\App_Web_ecxqk3uu.0.cs:line 0 at System.Web.HttpApplication.CallHandlerExecutionStep.OnAsyncHandlerCompletion(IAsyncResult ar) --><!-- This error page might contain sensitive information because ASP.NET is configured to show verbose error messages using <customErrors mode="Off"/>. Consider using <customErrors mode="On"/> or <customErrors mode="RemoteOnly"/> in production environments.-->

Coordinator
Dec 14, 2010 at 1:54 PM
Edited Dec 14, 2010 at 1:59 PM

Doing a search here turned up this link:

http://social.msdn.microsoft.com/forums/en-US/vbgeneral/thread/88a6ea68-f476-4231-822f-27fabe59f458

which may help.  If you're in control of this server, you may want to regsrvr32 if you haven't already.  Also mentioned in that link is proper installation of .NET 2 Framework.

Regarding separate .prg files, you'll want to use ExecScript so that nothing gets locked.  There's a pretty thorough thread on this that you'll find if you search the Discussions here.

Coordinator
Dec 22, 2010 at 9:24 AM

 

EXECSCRIPT(FILETOSTR(oProp.AppStartPath+'\prg\AVFPinit.prg'))

works and probably is the preferred way. Scope DOES remain intact which is what I was worried about. No locking whatsoever, Even when errors occur. Compiles on the fly, so you can distribute only PRG scripts and no FXPs (starting to look more and more like a PHP app)

The following works but will lock if an ERROR occurs:
SET proc TO oProp.AppStartPath+'\prg\'+'AVFPinit.prg' add
avfpinit()
SET proc TO
CLEAR PROGRAM avfpinit

Every time you need to call an external program, use execscript. (avfpinit.prg was just an example - it doesn't do anything special).

So this is correct everytime you need to use it:

lcRetVal = EXECSCRIPT(FILETOSTR(oProp.AppStartPath+'\prg\myexternalfunc.prg'))

This way you only need to have the prgs on the server and no fxps and everything is compiled dynamically. This also means the AVFP developer is free from having to have a copy of Visual Foxpro development to create web apps.