By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,311 Members | 1,928 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,311 IT Pros & Developers. It's quick & easy.

Shadow Copy Assw

P: n/a
I am using the CompileAssemblyFromSource method of an ICodeCompiler instance
to dynamically compile an assembly used by a Web Application. The assembly
may be recompiled any number of times during a day as a user changes the
underlying code. Each time the assembly is compiled it's version is updated
e.g. from 1.0.0.1 to 1.0.0.2 and so on.

The assemby is compiled into a directory which has been setup to shadow copy
using the AppDomain.CurrentDomain.SetShadowCopyPath method.

Shadow copying is working fine when the assembly is first compiled (V
1.0.0.1). If I recompile it once the version is incremented (V 1.0.0.2) and
the new version is automatically shadow copied and used. If however I
recompile it a second time, the version is incremented (V 1.0.0.3) but the
new assembly is not shadow copied and the web application continues to use V
1.0.0.2.

If I look in the shadow copy directory (below
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Tempo rary ASP.NET Files) I can
see V 1.0.0.1 and V 1.0.0.2 but V 1.0.0.3 has not been copied.

To force the latest version to shadow copy, I have to recycle the
Application Pool.

It appears that IIS limits the number of shadow copied versions of an
assembly to 2.

How can I force an assembly to shadow copy without recycling the application
pool. Alternatively can I increase the number of shadow copied versions IIS
will handle.

Thanks in advance for you help.
Nov 20 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.