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

GAC Question

Hi ,

i have the A.dll in my GAC (only one occurrence)
and after i deleted it from the GAC i saw that it still working .
so i did IISRESET and now it throw an error .

can we define the time out that the dll stay in the memory ?

lets say that if no one access the dll for 60 sec it will be removed from
the memory and only in the next time
that some one request this page it will reload it to the memory .
Best Regards ,

Tiraman :-)
Nov 20 '05 #1
5 1598
PLEASE H E L P :-)
"Tiraman" <ti*****@netvision.net.il> wrote in message
news:#N**************@TK2MSFTNGP11.phx.gbl...
Hi ,

i have the A.dll in my GAC (only one occurrence)
and after i deleted it from the GAC i saw that it still working .
so i did IISRESET and now it throw an error .

can we define the time out that the dll stay in the memory ?

lets say that if no one access the dll for 60 sec it will be removed from
the memory and only in the next time
that some one request this page it will reload it to the memory .
Best Regards ,

Tiraman :-)

Nov 20 '05 #2
Hi Tireman,

First of all, I would like to confirm my understanding of your issue.
From your description, I understand that you wants to control when an
assembly from GAC will be unloaded from the memory.
Have I fully understood you? If there is anything I misunderstood, please
feel free to let me know.

Now I am research the issue, I will update you with new information ASAP.
Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 20 '05 #3
Hi Peter ,
You are my saver lately :-)
you understood me very well .

10x .

""Peter Huang"" <v-******@online.microsoft.com> wrote in message
news:8o**************@cpmsftngxa10.phx.gbl...
Hi Tireman,

First of all, I would like to confirm my understanding of your issue.
From your description, I understand that you wants to control when an
assembly from GAC will be unloaded from the memory.
Have I fully understood you? If there is anything I misunderstood, please
feel free to let me know.

Now I am research the issue, I will update you with new information ASAP.
Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 20 '05 #4
Hi Tiraman,

I think in .NET we can unload an assembly, if we wants to do so, we have to
unload the appdomain which loads the assembly. Usually when an ASP.NET
application is running, it is running under an appdomain in the
aspnet_wp.exe and the necessary assebmlies will be loaded into the
appdomain , but if an Assembly is in GAC, it will be loaded into an
special appdomain(shared appdomain) which is indepent of the appdomain of
the asp.net application for performance and share concern.

So if an assembly is in the GAC, I think we can not force it to unload from
the memory, since we can not force the special appdomain to restart because
it will impact all the webapplication in the aspnet_wp.exe process. There
is an idleTimeout attribute of the processModel in the machine.config can
used to specifies the period of inactivity, in hr:min:sec string format,
after which ASP.NET automatically ends the worker process.(aspnet_wp.exe),
but this will impact the whole aspnet_wp.exe process, which cause the other
webapplication to be restarted. It will cause heavy performance hit so I do
not recommend you use the option.

I wonder why you need to control when the assembly will be unloaded from
the memory. Do you wants to implement the dynamically update? If so, I
think we'd better use the bindingRedirect in the web.config file. Since we
maintain the version of the assembly in GAC by changing its version if we
have made any updated.

Also in IIS6, we can run a webapplication at a indepent Application Pool,
so that if we recycle one webapplication by restart the worker process, it
will just restart this Application Pool. In this way, we will need arrange
all the webapplication will use the updated shared assembly in GAC to run
in the same application pool so that we do not need to create many
Application Pools.

The last method I think we will need to set back to deploy the shared
assembly in each bin folder of the web application, so everytime we change
the Web.config file, the Global.asax file, or any files in the Bin folder
will cause the appdomain which hosts the webapplication to restart. Also in
this way we have to make additional efforts to deploy the assembly into
multiple bin folders. But we can do by using a Batch file.
Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 20 '05 #5
Hello Peter ,

for your question about controlling the assembly load/unload from memory ,
it's bcz i looked a way which my aspx files will be able to work in front of
new assembly version (which are in the GAC)
without doing any change in the aspx and now it is working gr8 10x to u :-)

I m using the web/machine.config in order to implement the redirect version
for assembly files which solve my problem :-)
so i don't need to do work around like restarting the aspnet process or
using time out for reloading the assembly .

10x again :-)

And Have a nice day !

Tiraman ;-)

""Peter Huang"" <v-******@online.microsoft.com> wrote in message
news:1x*************@cpmsftngxa10.phx.gbl...
Hi Tiraman,

I think in .NET we can unload an assembly, if we wants to do so, we have to unload the appdomain which loads the assembly. Usually when an ASP.NET
application is running, it is running under an appdomain in the
aspnet_wp.exe and the necessary assebmlies will be loaded into the
appdomain , but if an Assembly is in GAC, it will be loaded into an
special appdomain(shared appdomain) which is indepent of the appdomain of
the asp.net application for performance and share concern.

So if an assembly is in the GAC, I think we can not force it to unload from the memory, since we can not force the special appdomain to restart because it will impact all the webapplication in the aspnet_wp.exe process. There
is an idleTimeout attribute of the processModel in the machine.config can
used to specifies the period of inactivity, in hr:min:sec string format,
after which ASP.NET automatically ends the worker process.(aspnet_wp.exe),
but this will impact the whole aspnet_wp.exe process, which cause the other webapplication to be restarted. It will cause heavy performance hit so I do not recommend you use the option.

I wonder why you need to control when the assembly will be unloaded from
the memory. Do you wants to implement the dynamically update? If so, I
think we'd better use the bindingRedirect in the web.config file. Since we
maintain the version of the assembly in GAC by changing its version if we
have made any updated.

Also in IIS6, we can run a webapplication at a indepent Application Pool,
so that if we recycle one webapplication by restart the worker process, it
will just restart this Application Pool. In this way, we will need arrange all the webapplication will use the updated shared assembly in GAC to run
in the same application pool so that we do not need to create many
Application Pools.

The last method I think we will need to set back to deploy the shared
assembly in each bin folder of the web application, so everytime we change
the Web.config file, the Global.asax file, or any files in the Bin folder
will cause the appdomain which hosts the webapplication to restart. Also in this way we have to make additional efforts to deploy the assembly into
multiple bin folders. But we can do by using a Batch file.
Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 20 '05 #6

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

Similar topics

1
by: Mohammed Mazid | last post by:
Can anyone please help me on how to move to the next and previous question? Here is a snippet of my code: Private Sub cmdNext_Click() End Sub Private Sub cmdPrevious_Click() showrecord
3
by: Stevey | last post by:
I have the following XML file... <?xml version="1.0"?> <animals> <animal> <name>Tiger</name> <questions> <question index="0">true</question> <question index="1">true</question> </questions>
7
by: nospam | last post by:
Ok, 3rd or is it the 4th time I have asked this question on Partial Types, so, since it seems to me that Partial Types is still in the design or development stages at Microsoft, I am going to ask...
3
by: Ekqvist Marko | last post by:
Hi, I have one Access database table including questions and answers. Now I need to give answer id automatically to questionID column. But I don't know how it is best (fastest) to do? table...
10
by: glenn | last post by:
I am use to programming in php and the way session and post vars are past from fields on one page through to the post page automatically where I can get to their values easily to write to a...
10
by: Rider | last post by:
Hi, simple(?) question about asp.net configuration.. I've installed ASP.NET 2.0 QuickStart Sample successfully. But, When I'm first start application the follow message shown. ========= Server...
53
by: Jeff | last post by:
In the function below, can size ever be 0 (zero)? char *clc_strdup(const char * CLC_RESTRICT s) { size_t size; char *p; clc_assert_not_null(clc_strdup, s); size = strlen(s) + 1;
56
by: spibou | last post by:
In the statement "a *= expression" is expression assumed to be parenthesized ? For example if I write "a *= b+c" is this the same as "a = a * (b+c)" or "a = a * b+c" ?
2
by: Allan Ebdrup | last post by:
Hi, I'm trying to render a Matrix question in my ASP.Net 2.0 page, A matrix question is a question where you have several options that can all be rated according to several possible ratings (from...
3
by: Zhang Weiwu | last post by:
Hello! I wrote this: ..required-question p:after { content: "*"; } Corresponding HTML: <div class="required-question"><p>Question Text</p><input /></div> <div...
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
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.