Could not load file or assembly or one of its dependencies. Access isdenied.

A

Andy

Hi,

I've got a web application made in Asp.net 2.0 , C# and sql server
2005. Its hosted on a server farm (consisting of 3 webservers). Every
now and then we keep getting the following error

Could not load file or assembly 'xyz, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null' or one of its dependencies.
Access is denied.

I've googled this problem and as suggested checked the permissions on
the temp asp.net folder and excluded the folder from the antivirus
scan list. Inspite of doing the above 2 steps I still get the access
denied error. The occurence of the error is very inconsistent and I
couldn't find any pattern to it.

Can anyone suggest what could be causing this issue? Can the indexing
service also cause this problem?

Appreciate any help or ideas

Thanks in advance

Anand
 
A

Andy

Thanks Peter,

I thought I'd give an update on this problem. My application had 2
assemblies that contained classed for the Data access and business
logic layer. It was on one of them that I was getting the Access
denied error. After checking different settings and googling I wasnt
able to pinpoint the problem and as a temporary fix I decided to merge
the two assemblies into one, my logic being no offending assembly no
access denied problem. Things went fine for a couple of weeks and then
today I get the follwing error

System.IO.FileLoadException: Could not load file or assembly
'System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35' or one of its dependencies. Access is
denied. File name: 'System.Web.Extensions.Design,
Version=1.0.61025.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35' at
System.Reflection.Assembly.nLoad(AssemblyName fileName, String
codeBase, Evidence assemblySecurity, Assembly locationHint,
StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean
forIntrospection) at
System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef,
Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean
forIntrospection) at
System.Reflection.Assembly.InternalLoad(String assemblyString,
Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean
forIntrospection) at System.Reflection.Assembly.Load(String
assemblyString) at
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String
assemblyName, Boolean starDirective) WRN: Assembly binding logging
is turned OFF. To enable assembly bind failure logging, set the
registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to
1. Note: There is some performance penalty associated with assembly
bind failure logging. To turn this feature off, remove the registry
value [HKLM\Software\Microsoft\Fusion!EnableLog].


I've started getting an access denied error on the
System.Web.Extensions.Design assembly. Copying the dll over from my
local machine to the bin directory of the production machine fixes the
problem, but I still can't figure out whats causing this issue. These
are a few things that i've already checked

1. Permission on the temp asp.net folder
2. Permission on the website folder (location where files are located)
3. Excluded the temp asp.net folder from anti virus scan list
4. Excluded the temp asp.net folder from indexing service

What surprises me is that the access denied error is thrown for 1 dll,
if it was a permissions issue shouldnt all the dll's in that folder be
inaccessible?

Another thing, my production website is hosted on a server farm. I'd
appreciate any help I can get regarding this.



Thanks

Anand
 

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

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top