CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Jeffrey Palermo (.com)

Blog moved to www.jeffreypalermo.com

How to solve the ever-common "Parser Error Message: Access is denied: 'mydll'." - level 200

We've all been halted in ASP.NET development when we seemingly do a normal compile, and then our website won't work.  It won't even start up.  Here's a rough error you may see:
------------------------------------------------------------------------

Server Error in '/MyWebApp' Application

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Access is denied: 'mydll'.
Source Error:

Line 169:   <add assembly=<System.Drawing, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a>/>
Line 170:    <add assembly=<System.EnterpriseServices, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a>/>
Line 171:    <add assembly=<*>/>
Line 172:    </assemblies>
Line 173:					

Source File: c:\winnt\microsoft.net\framework\v1.0.3705\Config\machine.config Line: 171
Version Information: Microsoft .NET Framework Version:1.0.3705.0; ASP.NET Version:1.0.3705.0
----------------------------------------------------------

Most of the time, your website worked just fine.  It has happened to me when I've just made an update to the web.config file.  What causes this is that the website AppDomain tries to load, and it can't.  A change to the web.config causes a recycle of the AppDomain and a reload of the website.  When the website loads, a copy of every assembly is loaded into the Temporary ASP.NET Files directory.  If that directory is locked, or files in the directory are locked, this process can't complete, and we'll see this error.

The most common cause is the Windows Indexing Service.  I don't really need this service, so I've disabled it.  I don't get this error anymore.  Technically speaking, any process that may lock files in that directory may cause this error, so technically virus scanners, Google Desktop search, etc may lock those files and cause this error, but I've only connected this with the Windows Indexing Service.

Microsoft, in this Knowledge Base (KB) article, recommends exactly that: disabling the Indexing Service.



Comments

DawlinLi said:

yeah that happened to me two months ago, I used the same method. WTF indeed.
# October 19, 2005 12:51 PM

Brendan Tompkins said:

Yeah! I always turn of indexing on my dev box too, as this same error can make your builds crap out.
# October 19, 2005 3:58 PM

About Jeffrey Palermo

Jeffrey Palermo is a software management consultant and the CTO of Headspring Systems in Austin, TX. Jeffrey specializes in Agile coaching and helps companies double the productivity of software teams. Jeffrey is an MCSD.Net , Microsoft MVP, Certified Scrummaster, Austin .Net User Group leader, AgileAustin board member, INETA speaker, INETA Membership Mentor, Christian, husband, father, motorcyclist, Eagle Scout, U.S. Army Veteran, and Texas A&M University graduate. Check out Devlicio.us!

This Blog

Syndication

News

Headspring Systems

View Jeffrey Palermo's profile on LinkedIn

See my new blog at .jeffreypalermo.com