By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,864 Members | 1,324 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,864 IT Pros & Developers. It's quick & easy.

Says DLL file is in use and can't be loaded until restart IIS

P: n/a
Hi;

I copied a new set of files over to my ASP.NET dir (and subdirs) on our test
server. This replaced every file for the app. When I first then tried to
bring it up, I got the below error.

After I bounced IIS, then it worked fine. log4net.dll is in the Bin
directory. What is going on here - this makes no sense to me.

[FileLoadException: Could not load file or assembly 'log4net' or one of its
dependencies. The process cannot access the file because it is being used by
another process. (Exception from HRESULT: 0x80070020)]

[FileLoadException: Could not load file or assembly 'log4net,
Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' or one of
its dependencies. The process cannot access the file because it is being used
by another process. (Exception from HRESULT: 0x80070020)]
System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase,
Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark,
Boolean throwOnFileNotFound, Boolean forIntrospection) +0
System.Reflection.Assembly.InternalLoad(AssemblyNa me assemblyRef,
Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean
forIntrospection) +211
System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence
assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +141
System.Reflection.Assembly.Load(String assemblyString) +25
System.Web.Configuration.CompilationSection.LoadAs semblyHelper(String
assemblyName, Boolean starDirective) +32

[ConfigurationErrorsException: Could not load file or assembly 'log4net,
Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' or one of
its dependencies. The process cannot access the file because it is being used
by another process. (Exception from HRESULT: 0x80070020)]
System.Web.Configuration.CompilationSection.LoadAs semblyHelper(String
assemblyName, Boolean starDirective) +596

System.Web.Configuration.CompilationSection.LoadAl lAssembliesFromAppDomainBinDirectory() +3487241
System.Web.Configuration.CompilationSection.LoadAs sembly(AssemblyInfo ai)
+46

System.Web.Compilation.BuildManager.GetReferencedA ssemblies(CompilationSection compConfig) +177
System.Web.Compilation.BuildProvidersCompiler..cto r(VirtualPath
configPath, Boolean supportLocalization, String outputAssemblyName) +180

System.Web.Compilation.CodeDirectoryCompiler.GetCo deDirectoryAssembly(VirtualPath
virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet
excludedSubdirectories, Boolean isDirectoryAllowed) +347
System.Web.Compilation.BuildManager.CompileCodeDir ectory(VirtualPath
virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet
excludedSubdirectories) +125
System.Web.Compilation.BuildManager.EnsureTopLevel FilesCompiled() +378

[HttpException (0x80004005): Could not load file or assembly 'log4net,
Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' or one of
its dependencies. The process cannot access the file because it is being used
by another process. (Exception from HRESULT: 0x80070020)]
System.Web.Compilation.BuildManager.ReportTopLevel CompilationException()
+57
System.Web.Compilation.BuildManager.EnsureTopLevel FilesCompiled() +612
System.Web.Hosting.HostingEnvironment.Initialize(A pplicationManager
appManager, IApplicationHost appHost, IConfigMapPathFactory
configMapPathFactory, HostingEnvironmentParameters hostingParameters) +456

[HttpException (0x80004005): Could not load file or assembly 'log4net,
Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' or one of
its dependencies. The process cannot access the file because it is being used
by another process. (Exception from HRESULT: 0x80070020)]
System.Web.HttpRuntime.FirstRequestInit(HttpContex t context) +3434943
System.Web.HttpRuntime.EnsureFirstRequestInit(Http Context context) +88
System.Web.HttpRuntime.ProcessRequestInternal(Http WorkerRequest wr) +252


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET
Version:2.0.50727.210

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm
Apr 7 '07 #1
Share this Question
Share on Google+
8 Replies


P: n/a
It sounds to me like some process was still holding onto references to these
modules. Does it happen consistently?

Sysinterals.com has some utilities you can use to find out what processes
are holding onto what libraries. Sounds to me like some ASP.Net process was
just not behaving well...

--
~~~~~~~~~~~
Ben Rush
http://www.ben-rush.net/blog
"David Thielen" <th*****@nospam.nospamwrote in message
news:8F**********************************@microsof t.com...
Hi;

I copied a new set of files over to my ASP.NET dir (and subdirs) on our
test
server. This replaced every file for the app. When I first then tried to
bring it up, I got the below error.

After I bounced IIS, then it worked fine. log4net.dll is in the Bin
directory. What is going on here - this makes no sense to me.

[FileLoadException: Could not load file or assembly 'log4net' or one of
its
dependencies. The process cannot access the file because it is being used
by
another process. (Exception from HRESULT: 0x80070020)]

[FileLoadException: Could not load file or assembly 'log4net,
Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' or one
of
its dependencies. The process cannot access the file because it is being
used
by another process. (Exception from HRESULT: 0x80070020)]
System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase,
Evidence assemblySecurity, Assembly locationHint, StackCrawlMark&
stackMark,
Boolean throwOnFileNotFound, Boolean forIntrospection) +0
System.Reflection.Assembly.InternalLoad(AssemblyNa me assemblyRef,
Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean
forIntrospection) +211
System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence
assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
+141
System.Reflection.Assembly.Load(String assemblyString) +25
System.Web.Configuration.CompilationSection.LoadAs semblyHelper(String
assemblyName, Boolean starDirective) +32

[ConfigurationErrorsException: Could not load file or assembly 'log4net,
Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' or one
of
its dependencies. The process cannot access the file because it is being
used
by another process. (Exception from HRESULT: 0x80070020)]
System.Web.Configuration.CompilationSection.LoadAs semblyHelper(String
assemblyName, Boolean starDirective) +596

System.Web.Configuration.CompilationSection.LoadAl lAssembliesFromAppDomainBinDirectory()
+3487241
System.Web.Configuration.CompilationSection.LoadAs sembly(AssemblyInfo
ai)
+46

System.Web.Compilation.BuildManager.GetReferencedA ssemblies(CompilationSection
compConfig) +177
System.Web.Compilation.BuildProvidersCompiler..cto r(VirtualPath
configPath, Boolean supportLocalization, String outputAssemblyName) +180

System.Web.Compilation.CodeDirectoryCompiler.GetCo deDirectoryAssembly(VirtualPath
virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet
excludedSubdirectories, Boolean isDirectoryAllowed) +347
System.Web.Compilation.BuildManager.CompileCodeDir ectory(VirtualPath
virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet
excludedSubdirectories) +125
System.Web.Compilation.BuildManager.EnsureTopLevel FilesCompiled() +378

[HttpException (0x80004005): Could not load file or assembly 'log4net,
Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' or one
of
its dependencies. The process cannot access the file because it is being
used
by another process. (Exception from HRESULT: 0x80070020)]
System.Web.Compilation.BuildManager.ReportTopLevel CompilationException()
+57
System.Web.Compilation.BuildManager.EnsureTopLevel FilesCompiled() +612
System.Web.Hosting.HostingEnvironment.Initialize(A pplicationManager
appManager, IApplicationHost appHost, IConfigMapPathFactory
configMapPathFactory, HostingEnvironmentParameters hostingParameters) +456

[HttpException (0x80004005): Could not load file or assembly 'log4net,
Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' or one
of
its dependencies. The process cannot access the file because it is being
used
by another process. (Exception from HRESULT: 0x80070020)]
System.Web.HttpRuntime.FirstRequestInit(HttpContex t context) +3434943
System.Web.HttpRuntime.EnsureFirstRequestInit(Http Context context) +88
System.Web.HttpRuntime.ProcessRequestInternal(Http WorkerRequest wr) +252


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42;
ASP.NET
Version:2.0.50727.210

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm


Apr 8 '07 #2

P: n/a
Yes it happens consistently but when I use the sysinternals tools it does not
show another app locking it.

And in this case - how would another app have it locked so it can't be read
when I had just copied it to that computer? I was able to overwrite it in the
copy so at that point nothing had it locked. And the next thing I did was try
to bring up the website.

This is very weird.

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm


"Ben Rush" wrote:
It sounds to me like some process was still holding onto references to these
modules. Does it happen consistently?

Sysinterals.com has some utilities you can use to find out what processes
are holding onto what libraries. Sounds to me like some ASP.Net process was
just not behaving well...

--
~~~~~~~~~~~
Ben Rush
http://www.ben-rush.net/blog
"David Thielen" <th*****@nospam.nospamwrote in message
news:8F**********************************@microsof t.com...
Hi;

I copied a new set of files over to my ASP.NET dir (and subdirs) on our
test
server. This replaced every file for the app. When I first then tried to
bring it up, I got the below error.

After I bounced IIS, then it worked fine. log4net.dll is in the Bin
directory. What is going on here - this makes no sense to me.

[FileLoadException: Could not load file or assembly 'log4net' or one of
its
dependencies. The process cannot access the file because it is being used
by
another process. (Exception from HRESULT: 0x80070020)]

[FileLoadException: Could not load file or assembly 'log4net,
Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' or one
of
its dependencies. The process cannot access the file because it is being
used
by another process. (Exception from HRESULT: 0x80070020)]
System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase,
Evidence assemblySecurity, Assembly locationHint, StackCrawlMark&
stackMark,
Boolean throwOnFileNotFound, Boolean forIntrospection) +0
System.Reflection.Assembly.InternalLoad(AssemblyNa me assemblyRef,
Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean
forIntrospection) +211
System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence
assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
+141
System.Reflection.Assembly.Load(String assemblyString) +25
System.Web.Configuration.CompilationSection.LoadAs semblyHelper(String
assemblyName, Boolean starDirective) +32

[ConfigurationErrorsException: Could not load file or assembly 'log4net,
Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' or one
of
its dependencies. The process cannot access the file because it is being
used
by another process. (Exception from HRESULT: 0x80070020)]
System.Web.Configuration.CompilationSection.LoadAs semblyHelper(String
assemblyName, Boolean starDirective) +596

System.Web.Configuration.CompilationSection.LoadAl lAssembliesFromAppDomainBinDirectory()
+3487241
System.Web.Configuration.CompilationSection.LoadAs sembly(AssemblyInfo
ai)
+46

System.Web.Compilation.BuildManager.GetReferencedA ssemblies(CompilationSection
compConfig) +177
System.Web.Compilation.BuildProvidersCompiler..cto r(VirtualPath
configPath, Boolean supportLocalization, String outputAssemblyName) +180

System.Web.Compilation.CodeDirectoryCompiler.GetCo deDirectoryAssembly(VirtualPath
virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet
excludedSubdirectories, Boolean isDirectoryAllowed) +347
System.Web.Compilation.BuildManager.CompileCodeDir ectory(VirtualPath
virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet
excludedSubdirectories) +125
System.Web.Compilation.BuildManager.EnsureTopLevel FilesCompiled() +378

[HttpException (0x80004005): Could not load file or assembly 'log4net,
Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' or one
of
its dependencies. The process cannot access the file because it is being
used
by another process. (Exception from HRESULT: 0x80070020)]
System.Web.Compilation.BuildManager.ReportTopLevel CompilationException()
+57
System.Web.Compilation.BuildManager.EnsureTopLevel FilesCompiled() +612
System.Web.Hosting.HostingEnvironment.Initialize(A pplicationManager
appManager, IApplicationHost appHost, IConfigMapPathFactory
configMapPathFactory, HostingEnvironmentParameters hostingParameters) +456

[HttpException (0x80004005): Could not load file or assembly 'log4net,
Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' or one
of
its dependencies. The process cannot access the file because it is being
used
by another process. (Exception from HRESULT: 0x80070020)]
System.Web.HttpRuntime.FirstRequestInit(HttpContex t context) +3434943
System.Web.HttpRuntime.EnsureFirstRequestInit(Http Context context) +88
System.Web.HttpRuntime.ProcessRequestInternal(Http WorkerRequest wr) +252


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42;
ASP.NET
Version:2.0.50727.210

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm


Apr 8 '07 #3

P: n/a
Do you, by any chance, have the indexing service turned on ?
The indexing service has been known to cause errors like that one.

You might want to exclude the .Net Framework temp directory, the system temp
directory and the wwwroot and subdirectories from the indexing service's search.

Or, maybe, an antivirus system is interfering ?


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"David Thielen" <th*****@nospam.nospamwrote in message
news:90**********************************@microsof t.com...
Yes it happens consistently but when I use the sysinternals tools it does not
show another app locking it.

And in this case - how would another app have it locked so it can't be read
when I had just copied it to that computer? I was able to overwrite it in the
copy so at that point nothing had it locked. And the next thing I did was try
to bring up the website.

This is very weird.

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm


"Ben Rush" wrote:
>It sounds to me like some process was still holding onto references to these
modules. Does it happen consistently?

Sysinterals.com has some utilities you can use to find out what processes
are holding onto what libraries. Sounds to me like some ASP.Net process was
just not behaving well...

--
~~~~~~~~~~~
Ben Rush
http://www.ben-rush.net/blog
"David Thielen" <th*****@nospam.nospamwrote in message
news:8F**********************************@microso ft.com...
Hi;

I copied a new set of files over to my ASP.NET dir (and subdirs) on our
test
server. This replaced every file for the app. When I first then tried to
bring it up, I got the below error.

After I bounced IIS, then it worked fine. log4net.dll is in the Bin
directory. What is going on here - this makes no sense to me.

[FileLoadException: Could not load file or assembly 'log4net' or one of
its
dependencies. The process cannot access the file because it is being used
by
another process. (Exception from HRESULT: 0x80070020)]

[FileLoadException: Could not load file or assembly 'log4net,
Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' or one
of
its dependencies. The process cannot access the file because it is being
used
by another process. (Exception from HRESULT: 0x80070020)]
System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase,
Evidence assemblySecurity, Assembly locationHint, StackCrawlMark&
stackMark,
Boolean throwOnFileNotFound, Boolean forIntrospection) +0
System.Reflection.Assembly.InternalLoad(AssemblyNa me assemblyRef,
Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean
forIntrospection) +211
System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence
assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
+141
System.Reflection.Assembly.Load(String assemblyString) +25
System.Web.Configuration.CompilationSection.LoadAs semblyHelper(String
assemblyName, Boolean starDirective) +32

[ConfigurationErrorsException: Could not load file or assembly 'log4net,
Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' or one
of
its dependencies. The process cannot access the file because it is being
used
by another process. (Exception from HRESULT: 0x80070020)]
System.Web.Configuration.CompilationSection.LoadAs semblyHelper(String
assemblyName, Boolean starDirective) +596

System.Web.Configuration.CompilationSection.LoadAl lAssembliesFromAppDomainBinDirectory()
+3487241
System.Web.Configuration.CompilationSection.LoadAs sembly(AssemblyInfo
ai)
+46

System.Web.Compilation.BuildManager.GetReferencedA ssemblies(CompilationSection
compConfig) +177
System.Web.Compilation.BuildProvidersCompiler..cto r(VirtualPath
configPath, Boolean supportLocalization, String outputAssemblyName) +180

System.Web.Compilation.CodeDirectoryCompiler.GetCo deDirectoryAssembly(VirtualPath
virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet
excludedSubdirectories, Boolean isDirectoryAllowed) +347
System.Web.Compilation.BuildManager.CompileCodeDir ectory(VirtualPath
virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet
excludedSubdirectories) +125
System.Web.Compilation.BuildManager.EnsureTopLevel FilesCompiled() +378

[HttpException (0x80004005): Could not load file or assembly 'log4net,
Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' or one
of
its dependencies. The process cannot access the file because it is being
used
by another process. (Exception from HRESULT: 0x80070020)]
System.Web.Compilation.BuildManager.ReportTopLevel CompilationException()
+57
System.Web.Compilation.BuildManager.EnsureTopLevel FilesCompiled() +612
System.Web.Hosting.HostingEnvironment.Initialize(A pplicationManager
appManager, IApplicationHost appHost, IConfigMapPathFactory
configMapPathFactory, HostingEnvironmentParameters hostingParameters) +456

[HttpException (0x80004005): Could not load file or assembly 'log4net,
Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' or one
of
its dependencies. The process cannot access the file because it is being
used
by another process. (Exception from HRESULT: 0x80070020)]
System.Web.HttpRuntime.FirstRequestInit(HttpContex t context) +3434943
System.Web.HttpRuntime.EnsureFirstRequestInit(Http Context context) +88
System.Web.HttpRuntime.ProcessRequestInternal(Http WorkerRequest wr) +252


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42;
ASP.NET
Version:2.0.50727.210

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm




Apr 8 '07 #4

P: n/a
have you tried to delete the fields in temporary aspnet folder?

Daniel

"David Thielen" <th*****@nospam.nospamwrote in message
news:8F**********************************@microsof t.com...
Hi;

I copied a new set of files over to my ASP.NET dir (and subdirs) on our
test
server. This replaced every file for the app. When I first then tried to
bring it up, I got the below error.

After I bounced IIS, then it worked fine. log4net.dll is in the Bin
directory. What is going on here - this makes no sense to me.

[FileLoadException: Could not load file or assembly 'log4net' or one of
its
dependencies. The process cannot access the file because it is being used
by
another process. (Exception from HRESULT: 0x80070020)]

[FileLoadException: Could not load file or assembly 'log4net,
Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' or one
of
its dependencies. The process cannot access the file because it is being
used
by another process. (Exception from HRESULT: 0x80070020)]
System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase,
Evidence assemblySecurity, Assembly locationHint, StackCrawlMark&
stackMark,
Boolean throwOnFileNotFound, Boolean forIntrospection) +0
System.Reflection.Assembly.InternalLoad(AssemblyNa me assemblyRef,
Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean
forIntrospection) +211
System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence
assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
+141
System.Reflection.Assembly.Load(String assemblyString) +25
System.Web.Configuration.CompilationSection.LoadAs semblyHelper(String
assemblyName, Boolean starDirective) +32

[ConfigurationErrorsException: Could not load file or assembly 'log4net,
Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' or one
of
its dependencies. The process cannot access the file because it is being
used
by another process. (Exception from HRESULT: 0x80070020)]
System.Web.Configuration.CompilationSection.LoadAs semblyHelper(String
assemblyName, Boolean starDirective) +596

System.Web.Configuration.CompilationSection.LoadAl lAssembliesFromAppDomainBinDirectory()
+3487241
System.Web.Configuration.CompilationSection.LoadAs sembly(AssemblyInfo
ai)
+46

System.Web.Compilation.BuildManager.GetReferencedA ssemblies(CompilationSection
compConfig) +177
System.Web.Compilation.BuildProvidersCompiler..cto r(VirtualPath
configPath, Boolean supportLocalization, String outputAssemblyName) +180

System.Web.Compilation.CodeDirectoryCompiler.GetCo deDirectoryAssembly(VirtualPath
virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet
excludedSubdirectories, Boolean isDirectoryAllowed) +347
System.Web.Compilation.BuildManager.CompileCodeDir ectory(VirtualPath
virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet
excludedSubdirectories) +125
System.Web.Compilation.BuildManager.EnsureTopLevel FilesCompiled() +378

[HttpException (0x80004005): Could not load file or assembly 'log4net,
Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' or one
of
its dependencies. The process cannot access the file because it is being
used
by another process. (Exception from HRESULT: 0x80070020)]
System.Web.Compilation.BuildManager.ReportTopLevel CompilationException()
+57
System.Web.Compilation.BuildManager.EnsureTopLevel FilesCompiled() +612
System.Web.Hosting.HostingEnvironment.Initialize(A pplicationManager
appManager, IApplicationHost appHost, IConfigMapPathFactory
configMapPathFactory, HostingEnvironmentParameters hostingParameters) +456

[HttpException (0x80004005): Could not load file or assembly 'log4net,
Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' or one
of
its dependencies. The process cannot access the file because it is being
used
by another process. (Exception from HRESULT: 0x80070020)]
System.Web.HttpRuntime.FirstRequestInit(HttpContex t context) +3434943
System.Web.HttpRuntime.EnsureFirstRequestInit(Http Context context) +88
System.Web.HttpRuntime.ProcessRequestInternal(Http WorkerRequest wr) +252


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42;
ASP.NET
Version:2.0.50727.210

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm


Apr 8 '07 #5

P: n/a
It is weird, especially since the sysinternals tool isn't showing what is
locking it down. Perhaps something more low-level is holding onto it - an
antivirus software tool, perhaps?
--
~~~~~~~~~~~
Ben Rush
http://www.ben-rush.net/blog
"David Thielen" <th*****@nospam.nospamwrote in message
news:90**********************************@microsof t.com...
Yes it happens consistently but when I use the sysinternals tools it does
not
show another app locking it.

And in this case - how would another app have it locked so it can't be
read
when I had just copied it to that computer? I was able to overwrite it in
the
copy so at that point nothing had it locked. And the next thing I did was
try
to bring up the website.

This is very weird.

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm


"Ben Rush" wrote:
>It sounds to me like some process was still holding onto references to
these
modules. Does it happen consistently?

Sysinterals.com has some utilities you can use to find out what processes
are holding onto what libraries. Sounds to me like some ASP.Net process
was
just not behaving well...

--
~~~~~~~~~~~
Ben Rush
http://www.ben-rush.net/blog
"David Thielen" <th*****@nospam.nospamwrote in message
news:8F**********************************@microso ft.com...
Hi;

I copied a new set of files over to my ASP.NET dir (and subdirs) on our
test
server. This replaced every file for the app. When I first then tried
to
bring it up, I got the below error.

After I bounced IIS, then it worked fine. log4net.dll is in the Bin
directory. What is going on here - this makes no sense to me.

[FileLoadException: Could not load file or assembly 'log4net' or one of
its
dependencies. The process cannot access the file because it is being
used
by
another process. (Exception from HRESULT: 0x80070020)]

[FileLoadException: Could not load file or assembly 'log4net,
Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' or
one
of
its dependencies. The process cannot access the file because it is
being
used
by another process. (Exception from HRESULT: 0x80070020)]
System.Reflection.Assembly.nLoad(AssemblyName fileName, String
codeBase,
Evidence assemblySecurity, Assembly locationHint, StackCrawlMark&
stackMark,
Boolean throwOnFileNotFound, Boolean forIntrospection) +0
System.Reflection.Assembly.InternalLoad(AssemblyNa me assemblyRef,
Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean
forIntrospection) +211
System.Reflection.Assembly.InternalLoad(String assemblyString,
Evidence
assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
+141
System.Reflection.Assembly.Load(String assemblyString) +25
System.Web.Configuration.CompilationSection.LoadAs semblyHelper(String
assemblyName, Boolean starDirective) +32

[ConfigurationErrorsException: Could not load file or assembly
'log4net,
Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' or
one
of
its dependencies. The process cannot access the file because it is
being
used
by another process. (Exception from HRESULT: 0x80070020)]
System.Web.Configuration.CompilationSection.LoadAs semblyHelper(String
assemblyName, Boolean starDirective) +596

System.Web.Configuration.CompilationSection.LoadAl lAssembliesFromAppDomainBinDirectory()
+3487241
System.Web.Configuration.CompilationSection.LoadAs sembly(AssemblyInfo
ai)
+46

System.Web.Compilation.BuildManager.GetReferencedA ssemblies(CompilationSection
compConfig) +177
System.Web.Compilation.BuildProvidersCompiler..cto r(VirtualPath
configPath, Boolean supportLocalization, String outputAssemblyName)
+180

System.Web.Compilation.CodeDirectoryCompiler.GetCo deDirectoryAssembly(VirtualPath
virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet
excludedSubdirectories, Boolean isDirectoryAllowed) +347
System.Web.Compilation.BuildManager.CompileCodeDir ectory(VirtualPath
virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet
excludedSubdirectories) +125
System.Web.Compilation.BuildManager.EnsureTopLevel FilesCompiled()
+378

[HttpException (0x80004005): Could not load file or assembly 'log4net,
Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' or
one
of
its dependencies. The process cannot access the file because it is
being
used
by another process. (Exception from HRESULT: 0x80070020)]

System.Web.Compilation.BuildManager.ReportTopLevel CompilationException()
+57
System.Web.Compilation.BuildManager.EnsureTopLevel FilesCompiled()
+612
System.Web.Hosting.HostingEnvironment.Initialize(A pplicationManager
appManager, IApplicationHost appHost, IConfigMapPathFactory
configMapPathFactory, HostingEnvironmentParameters hostingParameters)
+456

[HttpException (0x80004005): Could not load file or assembly 'log4net,
Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' or
one
of
its dependencies. The process cannot access the file because it is
being
used
by another process. (Exception from HRESULT: 0x80070020)]
System.Web.HttpRuntime.FirstRequestInit(HttpContex t context) +3434943
System.Web.HttpRuntime.EnsureFirstRequestInit(Http Context context)
+88
System.Web.HttpRuntime.ProcessRequestInternal(Http WorkerRequest wr)
+252


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42;
ASP.NET
Version:2.0.50727.210

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm




Apr 8 '07 #6

P: n/a
The indexing service is disabled and no anti-virus. This is a test server so
it's pretty vanilla.

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm


"Juan T. Llibre" wrote:
Do you, by any chance, have the indexing service turned on ?
The indexing service has been known to cause errors like that one.

You might want to exclude the .Net Framework temp directory, the system temp
directory and the wwwroot and subdirectories from the indexing service's search.

Or, maybe, an antivirus system is interfering ?


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"David Thielen" <th*****@nospam.nospamwrote in message
news:90**********************************@microsof t.com...
Yes it happens consistently but when I use the sysinternals tools it does not
show another app locking it.

And in this case - how would another app have it locked so it can't be read
when I had just copied it to that computer? I was able to overwrite it in the
copy so at that point nothing had it locked. And the next thing I did was try
to bring up the website.

This is very weird.

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm


"Ben Rush" wrote:
It sounds to me like some process was still holding onto references to these
modules. Does it happen consistently?

Sysinterals.com has some utilities you can use to find out what processes
are holding onto what libraries. Sounds to me like some ASP.Net process was
just not behaving well...

--
~~~~~~~~~~~
Ben Rush
http://www.ben-rush.net/blog
"David Thielen" <th*****@nospam.nospamwrote in message
news:8F**********************************@microsof t.com...
Hi;

I copied a new set of files over to my ASP.NET dir (and subdirs) on our
test
server. This replaced every file for the app. When I first then tried to
bring it up, I got the below error.

After I bounced IIS, then it worked fine. log4net.dll is in the Bin
directory. What is going on here - this makes no sense to me.

[FileLoadException: Could not load file or assembly 'log4net' or one of
its
dependencies. The process cannot access the file because it is being used
by
another process. (Exception from HRESULT: 0x80070020)]

[FileLoadException: Could not load file or assembly 'log4net,
Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' or one
of
its dependencies. The process cannot access the file because it is being
used
by another process. (Exception from HRESULT: 0x80070020)]
System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase,
Evidence assemblySecurity, Assembly locationHint, StackCrawlMark&
stackMark,
Boolean throwOnFileNotFound, Boolean forIntrospection) +0
System.Reflection.Assembly.InternalLoad(AssemblyNa me assemblyRef,
Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean
forIntrospection) +211
System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence
assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
+141
System.Reflection.Assembly.Load(String assemblyString) +25
System.Web.Configuration.CompilationSection.LoadAs semblyHelper(String
assemblyName, Boolean starDirective) +32

[ConfigurationErrorsException: Could not load file or assembly 'log4net,
Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' or one
of
its dependencies. The process cannot access the file because it is being
used
by another process. (Exception from HRESULT: 0x80070020)]
System.Web.Configuration.CompilationSection.LoadAs semblyHelper(String
assemblyName, Boolean starDirective) +596

System.Web.Configuration.CompilationSection.LoadAl lAssembliesFromAppDomainBinDirectory()
+3487241
System.Web.Configuration.CompilationSection.LoadAs sembly(AssemblyInfo
ai)
+46

System.Web.Compilation.BuildManager.GetReferencedA ssemblies(CompilationSection
compConfig) +177
System.Web.Compilation.BuildProvidersCompiler..cto r(VirtualPath
configPath, Boolean supportLocalization, String outputAssemblyName) +180

System.Web.Compilation.CodeDirectoryCompiler.GetCo deDirectoryAssembly(VirtualPath
virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet
excludedSubdirectories, Boolean isDirectoryAllowed) +347
System.Web.Compilation.BuildManager.CompileCodeDir ectory(VirtualPath
virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet
excludedSubdirectories) +125
System.Web.Compilation.BuildManager.EnsureTopLevel FilesCompiled() +378

[HttpException (0x80004005): Could not load file or assembly 'log4net,
Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' or one
of
its dependencies. The process cannot access the file because it is being
used
by another process. (Exception from HRESULT: 0x80070020)]
System.Web.Compilation.BuildManager.ReportTopLevel CompilationException()
+57
System.Web.Compilation.BuildManager.EnsureTopLevel FilesCompiled() +612
System.Web.Hosting.HostingEnvironment.Initialize(A pplicationManager
appManager, IApplicationHost appHost, IConfigMapPathFactory
configMapPathFactory, HostingEnvironmentParameters hostingParameters) +456

[HttpException (0x80004005): Could not load file or assembly 'log4net,
Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' or one
of
its dependencies. The process cannot access the file because it is being
used
by another process. (Exception from HRESULT: 0x80070020)]
System.Web.HttpRuntime.FirstRequestInit(HttpContex t context) +3434943
System.Web.HttpRuntime.EnsureFirstRequestInit(Http Context context) +88
System.Web.HttpRuntime.ProcessRequestInternal(Http WorkerRequest wr) +252


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42;
ASP.NET
Version:2.0.50727.210

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm




Apr 8 '07 #7

P: n/a
I will try that next time. But I would hope that IIS/ASP does not trip over
something like that.

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm


"daniel #" wrote:
have you tried to delete the fields in temporary aspnet folder?

Daniel

"David Thielen" <th*****@nospam.nospamwrote in message
news:8F**********************************@microsof t.com...
Hi;

I copied a new set of files over to my ASP.NET dir (and subdirs) on our
test
server. This replaced every file for the app. When I first then tried to
bring it up, I got the below error.

After I bounced IIS, then it worked fine. log4net.dll is in the Bin
directory. What is going on here - this makes no sense to me.

[FileLoadException: Could not load file or assembly 'log4net' or one of
its
dependencies. The process cannot access the file because it is being used
by
another process. (Exception from HRESULT: 0x80070020)]

[FileLoadException: Could not load file or assembly 'log4net,
Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' or one
of
its dependencies. The process cannot access the file because it is being
used
by another process. (Exception from HRESULT: 0x80070020)]
System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase,
Evidence assemblySecurity, Assembly locationHint, StackCrawlMark&
stackMark,
Boolean throwOnFileNotFound, Boolean forIntrospection) +0
System.Reflection.Assembly.InternalLoad(AssemblyNa me assemblyRef,
Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean
forIntrospection) +211
System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence
assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
+141
System.Reflection.Assembly.Load(String assemblyString) +25
System.Web.Configuration.CompilationSection.LoadAs semblyHelper(String
assemblyName, Boolean starDirective) +32

[ConfigurationErrorsException: Could not load file or assembly 'log4net,
Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' or one
of
its dependencies. The process cannot access the file because it is being
used
by another process. (Exception from HRESULT: 0x80070020)]
System.Web.Configuration.CompilationSection.LoadAs semblyHelper(String
assemblyName, Boolean starDirective) +596

System.Web.Configuration.CompilationSection.LoadAl lAssembliesFromAppDomainBinDirectory()
+3487241
System.Web.Configuration.CompilationSection.LoadAs sembly(AssemblyInfo
ai)
+46

System.Web.Compilation.BuildManager.GetReferencedA ssemblies(CompilationSection
compConfig) +177
System.Web.Compilation.BuildProvidersCompiler..cto r(VirtualPath
configPath, Boolean supportLocalization, String outputAssemblyName) +180

System.Web.Compilation.CodeDirectoryCompiler.GetCo deDirectoryAssembly(VirtualPath
virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet
excludedSubdirectories, Boolean isDirectoryAllowed) +347
System.Web.Compilation.BuildManager.CompileCodeDir ectory(VirtualPath
virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet
excludedSubdirectories) +125
System.Web.Compilation.BuildManager.EnsureTopLevel FilesCompiled() +378

[HttpException (0x80004005): Could not load file or assembly 'log4net,
Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' or one
of
its dependencies. The process cannot access the file because it is being
used
by another process. (Exception from HRESULT: 0x80070020)]
System.Web.Compilation.BuildManager.ReportTopLevel CompilationException()
+57
System.Web.Compilation.BuildManager.EnsureTopLevel FilesCompiled() +612
System.Web.Hosting.HostingEnvironment.Initialize(A pplicationManager
appManager, IApplicationHost appHost, IConfigMapPathFactory
configMapPathFactory, HostingEnvironmentParameters hostingParameters) +456

[HttpException (0x80004005): Could not load file or assembly 'log4net,
Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' or one
of
its dependencies. The process cannot access the file because it is being
used
by another process. (Exception from HRESULT: 0x80070020)]
System.Web.HttpRuntime.FirstRequestInit(HttpContex t context) +3434943
System.Web.HttpRuntime.EnsureFirstRequestInit(Http Context context) +88
System.Web.HttpRuntime.ProcessRequestInternal(Http WorkerRequest wr) +252


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42;
ASP.NET
Version:2.0.50727.210

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm


Apr 8 '07 #8

P: n/a
Hi Dave,

When you copy new content into your ASP.NET site, have you also copy the
Log4net dll and overwrite the original one? I suspect that the problem may
due to the shadow copied log4net assembly(in ASP.NET temporary folder) be
locked. Have you tried putting the log4net assembly into GAC to see whether
you'll suffer the same problem. also, when testing ,you can also change the
<compilation debug="xxx" /to false so as to make the dynamic compilation
as release condition.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Apr 9 '07 #9

This discussion thread is closed

Replies have been disabled for this discussion.