Hi everyone,
I was trying to load an assembly during runtime from a remote application server using the web configuration file in C#. I created a dll eg. RemoteLib.dll. Then i developed a windows application that uses this dll. eg. testApp. I added a config file "testapp.exe.config" that contained the following coding.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentassembly>
<assemblyIdentity name="lib"
publicKeyToken="707ce16eaddaa550"
culture="neutral" />
<codeBase version="1.0.2622.27241"
href="file:///mca-oa2\beuls\c#\lib\lib\bin\Debug\lib.dll"/>
</dependentassembly>
</runtime>
</configuration>
in this mca-oa2 is my server name and beuls is the share name. the version i got by copying it to GAC. then i deleted the copy in GAC. i tried on the same machine also. i referred a website and it is given that u have to add the reference. so i added the local reference. and it is loading the assembly from the local directory. when i remove the local dll it is not working. I think the config file does not get executed at all. the pgm searches for the assembly in the local folder or in GAC...thats all. I want to work it using the path in the config file. the assembly is located in e:\beulahc#\lib\lib\bin\Debug\lib.dll. the share name is beuls and the server name is mca-oa2.
Any help is greatly appreciated.
Thanks in advance.
Regds,
Beuls