473,397 Members | 2,068 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

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.stringManag er.GetString(
"userIdArgumentNullException",
CultureInfo.CurrentUICulture));
}
if(General.IsEmpty(password)){
throw new
ArgumentNullException("password",General.stringMan ager.GetString(
"passwordArgumentNullException",
CultureInfo.CurrentUICulture));
}
if(General.IsEmpty(domain)){
throw new
ArgumentNullException("domain",General.stringManag er.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

Aug 1 '07 #1
2 1834
Juan,
Not only is your post unrelated to the C# language, it's not even related to
ASP.NET - its about classic ASP. There is a newsgroup for that, but it's not
this one.
good luck!
Peter
--
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
bogMetaFinder: http://www.blogmetafinder.com

"jmzl666" wrote:
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.stringManag er.GetString(
"userIdArgumentNullException",
CultureInfo.CurrentUICulture));
}
if(General.IsEmpty(password)){
throw new
ArgumentNullException("password",General.stringMan ager.GetString(
"passwordArgumentNullException",
CultureInfo.CurrentUICulture));
}
if(General.IsEmpty(domain)){
throw new
ArgumentNullException("domain",General.stringManag er.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

Aug 1 '07 #2
Peter Bromberg [C# MVP] wrote:
Juan,
Not only is your post unrelated to the C# language, it's not even related to
ASP.NET - its about classic ASP. There is a newsgroup for that, but it's not
this one.
good luck!
Peter
I thought because of the component being developed in C# maybe i could
get help here, what i was thinking, asking a question in a forum of C#
about a component developed in C#, silly me.

Juan Zamudio
Aug 2 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Santa | last post by:
I am using Fritz Onion's "Asynchronous Pages" approach as mentioned in the article http://msdn.microsoft.com/msdnmag/issues/03/06/Threading/default.aspx to increase the performance of my ASPX...
1
by: Ken | last post by:
Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached. This...
2
by: M.Ob | last post by:
Hello... I am having issues with my asp.net apps not releasing memory. The memory usage for the process w3p.exe continues to grow to it's allowable limit and does not drop until the app pool is...
3
by: ExclusiveResorts | last post by:
Can the CallContext be used reliably for storing request specific data? We are developing an application library that uses the CallContext to keep an IdentityMap (hashtable of business objects...
4
by: pjdouillard | last post by:
Hello all, Here is the context of my problem: We have an ASP.NET 1.1 application that has its own application pool setup and that runs under the identity of a NT Domain service account (this...
6
by: DraguVaso | last post by:
Hi, I had an error concerning the connection-pool: "Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled...
2
by: JoeSep | last post by:
Hi! Is it correct/safe to define a connection pool in the string "sqlConnectionString" of the "sessionState" section of Web.config? - The application is developed using AspNet 1.1 in a Windows...
2
by: one | last post by:
Hi, Was wondering if you could help me out with regards to a server that I'm trying to troubleshoot... Basically we have a windows 2003 load-balanced server that has got sharepoint and mcms...
3
by: Vlad Hrybok | last post by:
Hi all, I recently installed 64 bit version of Vista hoping to make it my primary development setup. I was able to do work with IIS7 and ASP.NET 2.0/Visua Studio 2005 combo, but hit a roadblock...
0
by: Juan Zamudio | last post by:
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.