Frans,
I'm lucky enough to be experiencing the same problem. I have a runtime error that I'm trying to debug and it's throwing an exception.
When I first run my application in debug mode I am prompted to enter user cradentials to initiate a debug session. The app then runs along happily until it crashes.
The next time I run the application I'm not prompted to enter user cradentials for the debug session. I assume that these persist until you exit .NET or log off. Don't know which.
The error I'm seeing ("Unable to load reference library" and "Access is denied") leads me to think that the sd.llblgen.pro.ormsupportclasses.net11.dll isn't being released after the crash. The debug session still has control.
I can start and stop the application as many times as I want, recompile, change code, it doesn't matter.
In my case, if I shut down the .NET Dev Environment, open it again, and then reopen the solution I'm able to run the application, to its crashing point, one more time before the "Access is Denied" error re-occurs.
I don't know if this is a .NET debugging issue or an issue with the DLL's?
As with Sink, I'm using impersonation. However, this application is the first "impersonation" type web application that I've been prompted to enter user cradentials to debug. I believe If I can figure out how to eliminate that, the problem will go away.
Sinks solution seems to buy time but I don't think it answers why the dll isn't being freed after the crash.
The real question is why doesn't the debug session release the dll?
or what is the proper way to close a debug session when a fatal error occurs?
What are your thoughts?
Paul
ERROR TO FOLLOW:
Server Error in '/EDC' Application.
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: BC31011: Unable to load referenced library 'c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net files\edc\b132c426\d3f51767\assembly\dl2\ f608dc5e\00e4bcda_190ec401\sd.llblgen.pro.ormsupportclasses.net11.dll': Access is denied.
Source Error:
[No relevant source lines]
Source File: vbc : Line: 0
Show Detailed Compiler Output:
C:\Windows\system32> "c:\windows\microsoft.net\framework\v1.1.4322\vbc.exe" /t:library /utf8output /R:"c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net files\edc\b132c426\d3f51767\assembly\dl2\98d4ca8e\c1e14a0e_7112c401\dp.dll" /R:"c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net files\edc\b132c426\d3f51767\assembly\dl2\0f1dc74a\98178113_7112c401\dal.dll" /R:"c:\windows\assembly\gac\system.web.mobile\1.0.5000.0__b03f5f7f11d50a3a\system.web.mobile.dll" /R:"c:\windows\assembly\gac\system.data\1.0.5000.0__b77a5c561934e089\system.data.dll" /R:"c:\windows\assembly\gac\system.enterpriseservices\ 1.0.5000.0__b03f5f7f11d50a3a\system.enterpriseservices.dll" /R:"c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net files\edc\b132c426\d3f51767\assembly\dl2\f608dc5e\ 00e4bcda_190ec401\sd.llblgen.pro.ormsupportclasses.net11.dll" /R:"c:\windows\assembly\gac\system.web\1.0.5000.0__b03f5f7f11d50a3a\system.web.dll" /R:"c:\windows\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll" /R:"c:\windows\assembly\gac\system.web.services\ 1.0.5000.0__b03f5f7f11d50a3a\system.web.services.dll" /R:"c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net files\edc\b132c426\d3f51767\assembly\dl2\44d82700\5a1c0cc4_7212c401\edc.dll" /R:"c:\windows\assembly\gac\system.xml\1.0.5000.0__b77a5c561934e089\system.xml.dll" /R:"c:\windows\assembly\gac\system.drawing\1.0.5000.0__b03f5f7f11d50a3a\system.drawing.dll" /R:"c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net files\edc\b132c426\d3f51767\assembly\dl2\301dc5c1\ 00e4bcda_190ec401\sd.llblgen.pro.dqe.sqlserver.net11.dll" /out:"C:\Windows\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\edc\b132c426\d3f51767\i_bn3awl.dll" /D EBUG=1 /debug+ "C:\Windows\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\edc\b132c426\d3f51767\i_bn3awl.0.vb"
Microsoft (R) Visual Basic .NET Compiler version 7.10.3052.4
for Microsoft (R) .NET Framework version 1.1.4322.573
Copyright (C) Microsoft Corporation 1987-2002. All rights reserved.
vbc : error BC31011: Unable to load referenced library 'c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net files\edc\b132c426\d3f51767\assembly\dl2\f608dc5e\ 00e4bcda_190ec401\sd.llblgen.pro.ormsupportclasses.net11.dll': Access is denied.
c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net files\edc\b132c426\d3f51767\assembly\dl2\f608dc5e\ 00e4bcda_190ec401\sd.llblgen.pro.ormsupportclasses.net11.dll : error BC31011: Unable to load referenced library 'c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net files\edc\b132c426\d3f51767\assembly\dl2\f608dc5e\ 00e4bcda_190ec401\sd.llblgen.pro.ormsupportclasses.net11.dll': Access is denied.
vbc : error BC30142: Unable to generate a reference to file 'c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net files\edc\b132c426\d3f51767\assembly\dl2\f608dc5e \00e4bcda_190ec401\sd.llblgen.pro.ormsupportclasses.net11.dll' (use TLBIMP utility to reference COM DLLs): Access is denied.
Show Complete Compilation Source:
Line 1: '------------------------------------------------------------------------------
Line 2: ' <autogenerated>
Line 3: ' This code was generated by a tool.
Line 4: ' Runtime Version: 1.1.4322.573
Line 5: '
Line 6: ' Changes to this file may cause incorrect behavior and will be lost if
Line 7: ' the code is regenerated.
Line 8: ' </autogenerated>
Line 9: '------------------------------------------------------------------------------
Line 10:
Line 11: Option Strict Off
Line 12: Option Explicit On
Line 13:
Line 14: Imports Microsoft.VisualBasic
Line 15: Imports System
Line 16: Imports System.Collections
Line 17: Imports System.Collections.Specialized
Line 18: Imports System.Configuration
Line 19: Imports System.Text
Line 20: Imports System.Text.RegularExpressions
Line 21: Imports System.Web
Line 22: Imports System.Web.Caching
Line 23: Imports System.Web.Security
Line 24: Imports System.Web.SessionState
Line 25: Imports System.Web.UI
Line 26: Imports System.Web.UI.HtmlControls
Line 27: Imports System.Web.UI.WebControls
Line 28:
Line 29: Namespace ASP
Line 30:
Line 31: <System.Runtime.CompilerServices.CompilerGlobalScopeAttribute()> _
Line 32: Public Class Global_asax
Line 33: Inherits XXXXXX.Manufacturing.EDC.Global
Line 34:
Line 35: Private Shared __initialized As Boolean = false
Line 36:
Line 37: Public Sub New()
Line 38: MyBase.New
Line 39: If (ASP.Global_asax.__initialized = false) Then
Line 40: ASP.Global_asax.__initialized = true
Line 41: End If
Line 42: End Sub
Line 43: End Class
Line 44: End Namespace
Line 45:
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573