Hello,
let me describe my problem:
ENVIRONMENT:
..Net 2.0, MSVS 2005, c#, WinXP
SYMPTOMS:
If assembly 'AgentDesktop' IS NOT in the (loading) application folder,
Assembly.Load(AssemblyName) throws FileLoadException with Message:
"Could not load file or assembly 'AgentDesktop,
Version=1.10.2573.22044, Culture=neutral, PublicKeyToken=null' or one
of its dependencies. Access is denied.":"AgentDesktop,
Version=1.10.2573.22044, Culture=neutral, PublicKeyToken=null"
If assembly 'AgentDesktop' IS in the (loading) application folder,
Assembly.Load(AssemblyName) proceeds correctly.
ADITIONAL INFORMATION:
Q: Do I have AssemblyName.CodeBase set to the folder containing
'AgentDesktop' assembly?
A: Yes I do.
Q: Am I really sure 'AgentDesktop' assembly is in that folder?
A: Yes, I am. Moreover, othervise exception thrown would have been
FileNotFoundException and not FileLoadException according msdn
definition of FileLoadException article
http://msdn.microsoft.com/library/de...classtopic.asp
: "The exception that is thrown when a managed assembly is found but
cannot be loaded."
Q. Have I added folder containing 'AgentDesktop' assembly into the
AppDomain.CurrentDomain.SetupInformation.PrivateBi nPath calling
AppDomain.CurrentDomain.AppendPrivatePath()?
A: Yes I have.
Q: Have I used suggestions from Suzanne Cook's article 'Debugging
Assembly Loading Failures' recommended in another topic targeting this
issue:
http://blogs.gotdotnet.com/suzcook/a.../29/57120.aspx,
section 'For FileLoadException', paragraph 'For an "Access is denied"
message...'?
A:Yes I Have. None process had the file locked and without share-read
access. User under which the loading process run had full control over
the folder containing 'Agent Desktop' assembly.
I suppose this problem is somehow conected with code security issues of
..Net, however I'm not familiar with this domain. At this point I want
to ask you for help.
Many Thanks
Peter Drienovsky