G
Guest
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\Temporary 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.
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\Temporary 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.