Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / April 2008

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Andy - 02 Apr 2008 22:10 GMT
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
Peter Bromberg [C# MVP] - 03 Apr 2008 02:40 GMT
Well, if the assembly is actually present at the specified location, this is
a permissions issue and you'll need to find out why the current Identity
credentials of your app prohibit loading of the specified assembly. If there
is any kind of synchronization going on "down on the farm" this could have an
adverse effect.
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short Urls & more: http://ittyurl.net

> Hi,
>
[quoted text clipped - 20 lines]
>
> Anand
Andy - 25 Apr 2008 21:23 GMT
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

On Apr 2, 6:40 pm, Peter Bromberg [C# MVP]
<pbromb...@yahoo.NoSpamMaam.com> wrote:
> Well, if the assembly is actually present at the specified location, this is
> a permissions issue and you'll need to find out why the current Identity
[quoted text clipped - 32 lines]
>
> - Show quoted text -

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.