how does IIS detect new code?
how does IIS detect new code?
am 23.07.2007 15:52:10 von jason
In the scenario where an application is running and in memory, serving users,
then new code is deployed to the server (e.g. using ms application center),
how does IIS know to pick up and start using the new code?
Re: how does IIS detect new code?
am 23.07.2007 15:57:29 von Ken Schaefer
IIS subscribes to Windows file change notifications, which notifies
subscribers that the file(s) have changed.
Cheers
Ken
--
My IIS Blog: www.adOpenStatic.com/cs/blogs/ken
"Jason" wrote in message
news:6AD64CC3-BBEF-493A-8826-B2A1CA13B3EF@microsoft.com...
> In the scenario where an application is running and in memory, serving
> users,
> then new code is deployed to the server (e.g. using ms application
> center),
> how does IIS know to pick up and start using the new code?
Re: how does IIS detect new code?
am 23.07.2007 16:14:07 von jason
so the app pool does not need to recycle to start using the new code then?
is it a best practice to recycle following a code change? or is IIS
supposed to be robust enought to handle that?
"Ken Schaefer" wrote:
> IIS subscribes to Windows file change notifications, which notifies
> subscribers that the file(s) have changed.
>
> Cheers
> Ken
>
> --
> My IIS Blog: www.adOpenStatic.com/cs/blogs/ken
>
> "Jason" wrote in message
> news:6AD64CC3-BBEF-493A-8826-B2A1CA13B3EF@microsoft.com...
> > In the scenario where an application is running and in memory, serving
> > users,
> > then new code is deployed to the server (e.g. using ms application
> > center),
> > how does IIS know to pick up and start using the new code?
>
>
Re: how does IIS detect new code?
am 24.07.2007 01:42:11 von Ken Schaefer
I don't think it's a matter of "IIS being robust enough" - IIS does not scan
the disk continuously looking for file changes. That would be a huge
performance issue. IIS instead is notified by Windows when files change, and
when it has been notified, it reads in the new file and should invalidate
any cached copies.
Assuming your browser is not caching anything, you should be able to hit
"refresh" in your browser and you'll see the new content.
Recycling your app pool shouldn't be necessary - that breaks all existing
connections, you lose any in-memory session data etc. Unless you have a
reason to do this, I don't think you should be doing so.
Cheers
Ken
"Jason" wrote in message
news:22070F06-6188-4E33-81EC-166B93FC4FE7@microsoft.com...
> so the app pool does not need to recycle to start using the new code then?
>
> is it a best practice to recycle following a code change? or is IIS
> supposed to be robust enought to handle that?
>
> "Ken Schaefer" wrote:
>
>> IIS subscribes to Windows file change notifications, which notifies
>> subscribers that the file(s) have changed.
>>
>> Cheers
>> Ken
>>
>> --
>> My IIS Blog: www.adOpenStatic.com/cs/blogs/ken
>>
>> "Jason" wrote in message
>> news:6AD64CC3-BBEF-493A-8826-B2A1CA13B3EF@microsoft.com...
>> > In the scenario where an application is running and in memory, serving
>> > users,
>> > then new code is deployed to the server (e.g. using ms application
>> > center),
>> > how does IIS know to pick up and start using the new code?
>>
>>
Re: how does IIS detect new code?
am 24.07.2007 05:25:26 von David Wang
Your question is actually about web application deployment, and the
specifics depend on the web application itself. This means that IIS
has no web application deployment features.
For example, if it is an ASP.Net application, changes to /bin DLLs
and .aspx pages are dynamically detected and handled. This is a nice
feature of the ASP.Net platform -- detecting changes in binaries and
dynamically reloading the changes -- but it is also a problem because
it keeps the older version loaded as well for garbage collection.
If it is an ISAPI application, then you *must* unload the ISAPI DLL
from memory before you can replace it with the new binary. This can be
done by recycling the application pool(s) that load the ISAPI DLL.
So, I would not say it is a best practice to recycle following a code
change, nor is the question about IIS robustness. It is about the
developer knowing the deployment needs of his application and how to
fulfill them. Stopping the Application Pool, making changes, and
Restarting the Application Pool is a consistent way to ensure
application changes propagate, but it may not be the best nor only
choice for you situation.
//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//
On Jul 23, 7:14 am, Jason wrote:
> so the app pool does not need to recycle to start using the new code then?
>
> is it a best practice to recycle following a code change? or is IIS
> supposed to be robust enought to handle that?
>
>
>
> "Ken Schaefer" wrote:
> > IIS subscribes to Windows file change notifications, which notifies
> > subscribers that the file(s) have changed.
>
> > Cheers
> > Ken
>
> > --
> > My IIS Blog:www.adOpenStatic.com/cs/blogs/ken
>
> > "Jason" wrote in message
> >news:6AD64CC3-BBEF-493A-8826-B2A1CA13B3EF@microsoft.com...
> > > In the scenario where an application is running and in memory, serving
> > > users,
> > > then new code is deployed to the server (e.g. using ms application
> > > center),
> > > how does IIS know to pick up and start using the new code?- Hide quoted text -
>
> - Show quoted text -
Re: how does IIS detect new code?
am 24.07.2007 15:02:12 von jason
so short of ISAPI code, it shouldn't be needed.
what about if the deployment changes the framework from 1.1 to 2.0
does that cause IIS to recycle automatically? or does it do it all on the
fly as well?
"David Wang" wrote:
> Your question is actually about web application deployment, and the
> specifics depend on the web application itself. This means that IIS
> has no web application deployment features.
>
> For example, if it is an ASP.Net application, changes to /bin DLLs
> and .aspx pages are dynamically detected and handled. This is a nice
> feature of the ASP.Net platform -- detecting changes in binaries and
> dynamically reloading the changes -- but it is also a problem because
> it keeps the older version loaded as well for garbage collection.
>
> If it is an ISAPI application, then you *must* unload the ISAPI DLL
> from memory before you can replace it with the new binary. This can be
> done by recycling the application pool(s) that load the ISAPI DLL.
>
> So, I would not say it is a best practice to recycle following a code
> change, nor is the question about IIS robustness. It is about the
> developer knowing the deployment needs of his application and how to
> fulfill them. Stopping the Application Pool, making changes, and
> Restarting the Application Pool is a consistent way to ensure
> application changes propagate, but it may not be the best nor only
> choice for you situation.
>
>
> //David
> http://w3-4u.blogspot.com
> http://blogs.msdn.com/David.Wang
> //
>
>
>
>
>
>
> On Jul 23, 7:14 am, Jason wrote:
> > so the app pool does not need to recycle to start using the new code then?
> >
> > is it a best practice to recycle following a code change? or is IIS
> > supposed to be robust enought to handle that?
> >
> >
> >
> > "Ken Schaefer" wrote:
> > > IIS subscribes to Windows file change notifications, which notifies
> > > subscribers that the file(s) have changed.
> >
> > > Cheers
> > > Ken
> >
> > > --
> > > My IIS Blog:www.adOpenStatic.com/cs/blogs/ken
> >
> > > "Jason" wrote in message
> > >news:6AD64CC3-BBEF-493A-8826-B2A1CA13B3EF@microsoft.com...
> > > > In the scenario where an application is running and in memory, serving
> > > > users,
> > > > then new code is deployed to the server (e.g. using ms application
> > > > center),
> > > > how does IIS know to pick up and start using the new code?- Hide quoted text -
> >
> > - Show quoted text -
>
>
>
Re: how does IIS detect new code?
am 24.07.2007 17:10:31 von Consultant
iis does not recycle on its own. if you deploy new code written for aspnet
2, you must configure the virtual site/directory to use the 2.0 framework.
also, you must have a separate app pool for aspnet 2.0 apps and aspnet 1.1
apps, as they will clobber each other.
"Jason" wrote in message
news:D8E6CF06-0CB8-411A-AD7E-981E6F563CAB@microsoft.com...
> so short of ISAPI code, it shouldn't be needed.
>
> what about if the deployment changes the framework from 1.1 to 2.0
>
> does that cause IIS to recycle automatically? or does it do it all on the
> fly as well?
>
> "David Wang" wrote:
>
>> Your question is actually about web application deployment, and the
>> specifics depend on the web application itself. This means that IIS
>> has no web application deployment features.
>>
>> For example, if it is an ASP.Net application, changes to /bin DLLs
>> and .aspx pages are dynamically detected and handled. This is a nice
>> feature of the ASP.Net platform -- detecting changes in binaries and
>> dynamically reloading the changes -- but it is also a problem because
>> it keeps the older version loaded as well for garbage collection.
>>
>> If it is an ISAPI application, then you *must* unload the ISAPI DLL
>> from memory before you can replace it with the new binary. This can be
>> done by recycling the application pool(s) that load the ISAPI DLL.
>>
>> So, I would not say it is a best practice to recycle following a code
>> change, nor is the question about IIS robustness. It is about the
>> developer knowing the deployment needs of his application and how to
>> fulfill them. Stopping the Application Pool, making changes, and
>> Restarting the Application Pool is a consistent way to ensure
>> application changes propagate, but it may not be the best nor only
>> choice for you situation.
>>
>>
>> //David
>> http://w3-4u.blogspot.com
>> http://blogs.msdn.com/David.Wang
>> //
>>
>>
>>
>>
>>
>>
>> On Jul 23, 7:14 am, Jason wrote:
>> > so the app pool does not need to recycle to start using the new code
>> > then?
>> >
>> > is it a best practice to recycle following a code change? or is IIS
>> > supposed to be robust enought to handle that?
>> >
>> >
>> >
>> > "Ken Schaefer" wrote:
>> > > IIS subscribes to Windows file change notifications, which notifies
>> > > subscribers that the file(s) have changed.
>> >
>> > > Cheers
>> > > Ken
>> >
>> > > --
>> > > My IIS Blog:www.adOpenStatic.com/cs/blogs/ken
>> >
>> > > "Jason" wrote in message
>> > >news:6AD64CC3-BBEF-493A-8826-B2A1CA13B3EF@microsoft.com...
>> > > > In the scenario where an application is running and in memory,
>> > > > serving
>> > > > users,
>> > > > then new code is deployed to the server (e.g. using ms application
>> > > > center),
>> > > > how does IIS know to pick up and start using the new code?- Hide
>> > > > quoted text -
>> >
>> > - Show quoted text -
>>
>>
>>