I've a working XML Web service written in ASP.Net. Now I need to reference certain assemblies lying in a specific folder e.g. c:NotMyCode
I do not want to copy/duplicate zillions of dlls in that folder into my bin folder.
I tried to keep the CopyLocal=false
for the assemblies referred in the Web Service. That ended up in a FileNotFound exception for the assembly.
When I switch to CopyLocal=true
, the referenced DLLs are copied over to the bin folder.. and it works.
So my question here is:
How do I reference assemblies that do not lie in my bin folder or a subfolder beneath it ? Do I need to change some security policy files somewhere? I think I'm not the first person to ever want to do something like this.. so I'm assuming someone has already solved this problem.
(I've tried impersonating an admin user in the IIS ASP.net configuration panel, but that didnt work either.)
Update: Can't install it in the GAC either. To give an analogy, this web service is giving a simplified view to a third party app e.g. Starteam. I can't (shouldn't have to.. don't want to..) copy all the binaries in that folder to the bin folder or install it into the GAC
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…