473,382 Members | 1,665 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,382 software developers and data experts.

ASP.Net DLL Memory behaviour

Hi Everybody,

I hope that someone can answer this questions for me. When somebody connects to a ASP.Net site, the site's DLL is loaded into memory. When throughout the user's browsing, will the DLL be removed from memory?

To make myself clearer, I'll explain what I need. I have developed a site that contains a static class. I use this class as a container for the session information of the user, once he's logged in. Now it seems that the information is stored correctly for a while and then the class is empty again. What I need to know is how long the DLL stays in memory and what are the parameters that affect its lifetime so that I know if my solution will or will now work.

Sami Samir
Nov 18 '05 #1
1 901
Okay here's my line of thought.#
* your web application ie asp.net applicatioin is compiled to an assembly
(which has a dll contrainer)
* first instance of a user (could be anyone... all that matters is the first
time the application receives a request) connecting to the application cause
the
aspnet worker processes to look for a JIT'd version, if not present requests
that the assembly be JIT'd.
* the compliation depends on the number of classes the system needs to
compile in order to display the first aspx page.
* the native copy is discarded if it hasnt be loaded for a while or the if
the original assembly was modified (checks the time stamp)
* it all removes the JIT'd version if the worker process has been started.
( for this you need to look into Process Model in Machine.Config file)
* there are ways to keep it alive... ie timed requests to the site.

as for your static class, it will be in memory till the application is
restarted (changes in machine config(causes all applications to restart), or
applications web.config (restarts current application) or the original
assembly or the worker process being )restarted.

--
Regards,
HD
Once a Geek.... Always a Geek
"Sami Samir" <an*******@discussions.microsoft.com> wrote in message
news:49**********************************@microsof t.com...
Hi Everybody,

I hope that someone can answer this questions for me. When somebody
connects to a ASP.Net site, the site's DLL is loaded into memory. When
throughout the user's browsing, will the DLL be removed from memory?

To make myself clearer, I'll explain what I need. I have developed a site
that contains a static class. I use this class as a container for the
session information of the user, once he's logged in. Now it seems that
the information is stored correctly for a while and then the class is
empty again. What I need to know is how long the DLL stays in memory and
what are the parameters that affect its lifetime so that I know if my
solution will or will now work.

Sami Samir

Nov 18 '05 #2

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

Similar topics

10
by: fabio de francesco | last post by:
Hi what do you think of the following? Why are we permitted to do that? And why the C++ Library doesn't stop someone willing to perfom that assignement (*a = 20)? #include <iostream> ...
66
by: karthikbalaguru | last post by:
Hi, Will 'free' return the memory Immediately to the OS ? Thx in advans, Karthik Balaguru
10
by: swornavidhya.mahadevan | last post by:
Which allocation (Static / Dynamic) is suitable for the situation when we are trying to allocate for a overloaded memory when the memory is full and no space to allocate. What will happen if both...
17
by: Cesar | last post by:
Hello people. I'm having a Winform app that contains a webbrowser control that keeps navigating from one page to another permanentrly to make some tests. The problem I'm having is that after a...
1
by: martinsmith160 | last post by:
Hi all I am trying to create a level builder tool for a final year project and im having some problems drawing. I have placed a picture box within a panel so i can scroll around the image which is...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...

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.