No Touch Deployment - locating assemblies

J

Jack Wright

Dear All,
We are implementing No Touch Deployment stratergy for our
clients...We have deployed our dlls on the WebServer the following way
in C:\Inetpub\wwwroot\SmartForms\bin contains all the common
dlls...(SmartForms is the Virtual directory name)
in C:\Inetpub\wwwroot\SmartForms\HRDForms we have HrdForms.exe
in C:\Inetpub\wwwroot\SmartForms\HRDForms\bin2 we have HrdForms
related dlls...

In order to access files in my bin directory of the Virtual folder I
have to make my bin directory's readable option true (Is there some
other workaround)
Also how do I set the probing path so that HrdForms exe searches for
bin2 for dependant dlls...
OR can I use System.Reflection.Assembly.LoadForm("") to download the
dll to the client machine...but then how will HrdForms know that the
assembly has been downloaded...

Please help...

TALIA

Many Regards
Jack
 
G

Guest

In order to tell HrdForms.exe where to look for assemblies, handle the AssemblyResolve event on the AppDomain. Then within your handler you can use the ResolveEventArgs and Assembly.LoadFrom to load assemblies as they're needed

private static Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args
{
tr

string[] name = args.Name.Split(',')
Assembly asm = Assembly.LoadFrom(Path.Combine
("http:\\SmartForms\HRDForms\bin2\", name[0] + ".dll"))
return asm

catch(Exception err

MessageBox.Show(err.Message)
return null



Hope it helps. Feel free to e-mail me with any other questions
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top