Error: could not load file or assembly or one of its dependencies
am 03.01.2008 09:54:01 von Sheila
Hi,
Does anybody encounter this error:
Unhandled Exception: System.IO.FileLoadException: could not load file or
assembly or one of its dependencies. Access is denied.
I google the error and found a few resolutions, such as exclude Temporary
ASP.NET Files folder from virus scan, grant full rights to Temporary ASP.NET
Files folder, etc. all doesn't work.
Previously the application works fine if all dlls are deployed in GAC, but
after I move dll to application Bin folder, the problem happens. To make the
website up, I have to clear all content in Temporary ASP.NET Files folder,
but after a few runs, it happenes again. Right now the only soultion works
for me is to set trust level to full in web.config, which I don't want to do
due to security reason.
Does anybody know what could be the cause? thanks in advance.
Re: Error: could not load file or assembly or one of its dependencies
am 03.01.2008 10:19:28 von nemtsev
Hello Sheila,
How do u refer to your dll? could you post the code how u declare and use
your dll?
---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour
"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
S> Previously the application works fine if all dlls are deployed in
S> GAC, but after I move dll to application Bin folder, the problem
S> happens. To make the website up, I have to clear all content in
S> Temporary ASP.NET Files folder, but after a few runs, it happenes
S> again. Right now the only soultion works for me is to set trust level
S> to full in web.config, which I don't want to do due to security
S> reason.
S>
Re: Error: could not load file or assembly or one of its dependenc
am 04.01.2008 11:23:00 von Sheila
Hi Michael,
The website is hosting a few customized server controls, thus its difficult
to post all code here. I just show you how a assembly (common library) is
normally called in the code
....
using Company.Common;
....
CommonFunction Com = new CommonFunction();
if (Com.IsCorrectCategory(output, NewsCategories))
{
PageList = ContentPublishing.GetAllPageList(SiteID,
Com.GetNewsCategoryID(SiteNewsCategory,NewsCategories).ToStr ing(), null,
_startDateTime, _endDateTime);
}
...
Is there any article I can read on this? thanks.
Regards
Yu Ping
"Michael Nemtsev [MVP]" wrote:
> Hello Sheila,
>
> How do u refer to your dll? could you post the code how u declare and use
> your dll?
>
>
>
> ---
> WBR,
> Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour
>
> "The greatest danger for most of us is not that our aim is too high and we
> miss it, but that it is too low and we reach it" (c) Michelangelo
>
>
> S> Previously the application works fine if all dlls are deployed in
> S> GAC, but after I move dll to application Bin folder, the problem
> S> happens. To make the website up, I have to clear all content in
> S> Temporary ASP.NET Files folder, but after a few runs, it happenes
> S> again. Right now the only soultion works for me is to set trust level
> S> to full in web.config, which I don't want to do due to security
> S> reason.
> S>
>
>
>