DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Tue, 31 Jul 2007 23:27:11 -0000,    posted on: microsoft.public.dotnet.framework        back       

Thread Index
  1    jmzl666


ASP 3.0 not releasing objects to pool (Windows 2003 Server)   
Hi all,  i have a COM+ component that works great from ASP.NET but in
ASP the objects are not released in Windows 2003, the same code runs
ok on my testing machine (Windows XP), I'm using the framework version
1.1.4322.573, every time i create an object the activated column in
the component services snap in adds one, but it never release it, here
is the code of my component.

[Guid("D22B554F-FE25-45af-B80C-80ACD8CE3DB6")]
[ClassInterface(ClassInterfaceType.None)]
[ProgId("CNBV_SAIT_AUTENTICA.ValidateUserServiced")]
[ObjectPooling(MinPoolSize = 5,MaxPoolSize = 50)]
[JustInTimeActivation(true)]
[ComVisible(true)]
[EventTrackingEnabled(true)]
public class ValidateUserServiced: ServicedComponent,IValidateUser{
  protected override bool CanBePooled() {
    return(true);
  }
  [SecurityPermission(SecurityAction.Demand, ControlPrincipal=true,
UnmanagedCode=true)]
  [AutoComplete(true)]
  public bool IsValidD(string userId, string password,string domain){
    if(General.IsEmpty(userId)){
        throw new
ArgumentNullException("userId",General.stringManager.GetString(
          "userIdArgumentNullException",
CultureInfo.CurrentUICulture));
    }
    if(General.IsEmpty(password)){
      throw new
ArgumentNullException("password",General.stringManager.GetString(
        "passwordArgumentNullException",
CultureInfo.CurrentUICulture));
    }
    if(General.IsEmpty(domain)){
      throw new
ArgumentNullException("domain",General.stringManager.GetString(
        "domainArgumentNullException", CultureInfo.CurrentUICulture));
    }
    IntPtr token= IntPtr.Zero;
    try{
      token= IntPtr.Zero;
      if(!NativeMethods.LogOnUser(userId, General.GetDomain(domain),
password,
        General.LOGON32_LOGON_INTERACTIVE,
        General.LOGON32_PROVIDER_DEFAULT, ref token)){
        return(false);
      }
      return(true);
    }
    finally{
      if(!token.Equals(IntPtr.Zero)){
        NativeMethods.CloseHandle(token);
      }
    }
  }

}

Here is the code i use to call the component:

Public Function ValidaUsuario(usuario,password)
  Dim ObjValida
  on error resume next
  Set
objValida=Server.CreateObject("CNBV_SAIT_AUTENTICA.ValidateUserServiced")
  ValidaUsuario=objValida.IsValidDG(usuario, password,
Application("Dominio"),Application("Grupo"))
  if Err.Number <> 0 then
    ValidaUsuario = -3
    Err.Clear
  end if
  set objValida=nothing
End Function

As you can see, I use JITA, autocomplete, on my machine this code runs
ok, but in windows 2003 the activated objects get to 50 and never go
down (application debugging is disabled in IIS), thanks in advanced.

Juan Zamudio
Date:Tue, 31 Jul 2007 23:27:11 -0000   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us