Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ASP.NET Page Not Releasing COM Object
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00754450
Message ID:
00759699
Vues:
18
I think you'll want to look at Marshal.ReleaseComObject() which releases the ref count and should make the COM object go away. However, the GC will still control the lifetime of the .Net wrapper object so that might stick around a bit longer.



+++ Rick ---



>I created a VFP MTDLL that does some fairly simple operations. I added it to my ASP.NET project, compiled everything, it runs fine.
>
>If I hit [F5] in the browser to refresh, things still come back fine.
>
>However, if I hold down [F5] to 5-6 seconds to simulate a lot of concurrent requests, eventually I only see a blank page while "the IE ball spins". I have to restart IIS in order to get a good response again.
>
>Just to test things out further, I put the MTDLL inside a COM+ application and viewed the object reference count. I can see the reference count increase after I hold down [F5] in the browser, but the refs never decrease.
>
>I have the ASPCOMPAT="true" directive in the top of my .aspx page.
>
>My simple COM object test page looks like this:
>
>
>devcom.TestMeClass devCom = new devcom.TestMeClass();
>devCom.ProcessReq( _sWriter.ToString() );
>string retVal = devCom.OUTPUTFINAL.ToString();
>devCom = null;
>return retVal;
>
>
>Here is what is at the top of my MTDLL main.prg:
>
>#INCLUDE SC.H
>#INCLUDE VFP.H
>#DEFINE CRLF	Chr(13)+Chr(10)
>
>Define Class TestMe as Session OlePublic
>
>Function Init
>Local ;
>	pathString as String , ;
>	nothing as Variant
>	nothing = Sys(2340,1)
>	Set Cpdialog Off
>	Set Safety Off
>	Set Exclusive Off
>	Set Multilocks On
>	Set Deleted Off
>	Set Collate To "MACHINE"
>	Set Date to ANSI
>	Set Century On
>	Set Mark to "."
>	Set Near On
>	Set Exact Off
>	Set Ansi Off
>	Set TextMerge Delimiters To "{{","}}"
>	This.dllPath = Lower( JUSTPATH(_VFP.Servername) )
>	This.xDomDoc = CreateObject("Msxml2.FreeThreadedDOMDocument.4.0")
>	if ( Left(This.LoadConfig() , 1 ) ="!" )
>	Return .f.
>	endif
>	if ( This.SetTempDirectory() = "0" )
>	Return .f.
>	EndIf
>	pathString = ( This.dllPath )+ ";" + ( JustPath(This.dbcPath) )
>	Set Path to &pathString
>	Return .t.
>EndFunc
>
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform