Compile Problem: BC31011- Access is denied

B

Brad

After compiling my asp.net project I'm receiving a "BC31011 - Access is
denied" error when attempting to run or debug. The only thing that seems to
resolve problem is IISReset. After a reset my project runs fine for several
compiles then the error starts up again...and another iisreset. I seem to
recall a similar issue a long time back which required turning off indexing,
which I have had off since (I just re-checked to confirm it is off).

Full error message is below.
Running .Net 1.1 on Win2003 server

- Brad

===============================================
Server Error in '/SIDO' 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\sido\afa6eed6\2910c648\assembly\dl2\5450e5d4\ca86261e_b449c401\county.
dll': Access is denied.

Source Error:


[No relevant source lines]


Source File: vbc : Line: 0



Show Detailed Compiler Output:

c:\windows\system32\inetsrv>
"c:\windows\microsoft.net\framework\v1.1.4322\vbc.exe" /t:library
/utf8output
/R:"c:\windows\assembly\gac\system.web\1.0.5000.0__b03f5f7f11d50a3a\system.w
eb.dll"
/R:"c:\windows\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll"
/R:"c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net
files\sido\afa6eed6\2910c648\assembly\dl2\2730c84d\14e21f86_5bcbc401\county.
web.controls.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\sido\afa6eed6\2910c648\assembly\dl2\5450e5d4\ca86261e_b449c401\county.
dll"
/R:"c:\windows\assembly\gac\system.xml\1.0.5000.0__b77a5c561934e089\system.x
ml.dll" /R:"c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net
files\sido\afa6eed6\2910c648\assembly\dl2\545ae25e\be5d7576_ac4cc401\county.
exception.dll"
/R:"c:\windows\assembly\gac\system.drawing\1.0.5000.0__b03f5f7f11d50a3a\syst
em.drawing.dll"
/R:"c:\windows\assembly\gac\system.web.ui.mobilecontrols.adapters\1.1.0.0__b
03f5f7f11d50a3a\system.web.ui.mobilecontrols.adapters.dll"
/R:"c:\windows\assembly\gac\system.web.mobile\1.0.5000.0__b03f5f7f11d50a3a\s
ystem.web.mobile.dll"
/R:"c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net
files\sido\afa6eed6\2910c648\assembly\dl2\b9c8a8ca\04427f86_5bcbc401\sido.we
b.dll" /R:"c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net
files\sido\afa6eed6\2910c648\assembly\dl2\c3facbc2\7a9fd596_b1c5c401\county.
dataconnecter.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__b03f5f7f11
d50a3a\system.enterpriseservices.dll"
/R:"c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net
files\sido\afa6eed6\2910c648\assembly\dl2\5f320a44\10ba3786_5bcbc401\sido.da
taaccess.dll" /out:"C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary
ASP.NET Files\sido\afa6eed6\2910c648\bd5mutej.dll" /D:DEBUG=1 /debug+
"C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET
Files\sido\afa6eed6\2910c648\bd5mutej.0.vb"


Microsoft (R) Visual Basic .NET Compiler version 7.10.6001.4
for Microsoft (R) .NET Framework version 1.1.4322.2032
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\sido\afa6eed6\2910c648\assembly\dl2\5450e5d4\ca86261e_b449c401\county.
dll': Access is denied.
c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net
files\sido\afa6eed6\2910c648\assembly\dl2\5450e5d4\ca86261e_b449c401\county.
dll : error BC31011: Unable to load referenced library
'c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net
files\sido\afa6eed6\2910c648\assembly\dl2\5450e5d4\ca86261e_b449c401\county.
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\sido\afa6eed6\2910c648\assembly\dl2\5450e5d4\ca86261e_b449c401\county.
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.2032
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 SIDO.Web.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.2032; ASP.NET
Version:1.1.4322.2032
 
G

Guest

It seems its a security error! ur application is begin denied to load ref
libraries.
Do u have the ASP.NEt account and does that have access to the neccessary
folders?




Brad said:
After compiling my asp.net project I'm receiving a "BC31011 - Access is
denied" error when attempting to run or debug. The only thing that seems to
resolve problem is IISReset. After a reset my project runs fine for several
compiles then the error starts up again...and another iisreset. I seem to
recall a similar issue a long time back which required turning off indexing,
which I have had off since (I just re-checked to confirm it is off).

Full error message is below.
Running .Net 1.1 on Win2003 server

- Brad

===============================================
Server Error in '/SIDO' 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\sido\afa6eed6\2910c648\assembly\dl2\5450e5d4\ca86261e_b449c401\county.
dll': Access is denied.

Source Error:


[No relevant source lines]


Source File: vbc : Line: 0



Show Detailed Compiler Output:

c:\windows\system32\inetsrv>
"c:\windows\microsoft.net\framework\v1.1.4322\vbc.exe" /t:library
/utf8output
/R:"c:\windows\assembly\gac\system.web\1.0.5000.0__b03f5f7f11d50a3a\system.w
eb.dll"
/R:"c:\windows\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll"
/R:"c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net
files\sido\afa6eed6\2910c648\assembly\dl2\2730c84d\14e21f86_5bcbc401\county.
web.controls.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\sido\afa6eed6\2910c648\assembly\dl2\5450e5d4\ca86261e_b449c401\county.
dll"
/R:"c:\windows\assembly\gac\system.xml\1.0.5000.0__b77a5c561934e089\system.x
ml.dll" /R:"c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net
files\sido\afa6eed6\2910c648\assembly\dl2\545ae25e\be5d7576_ac4cc401\county.
exception.dll"
/R:"c:\windows\assembly\gac\system.drawing\1.0.5000.0__b03f5f7f11d50a3a\syst
em.drawing.dll"
/R:"c:\windows\assembly\gac\system.web.ui.mobilecontrols.adapters\1.1.0.0__b
03f5f7f11d50a3a\system.web.ui.mobilecontrols.adapters.dll"
/R:"c:\windows\assembly\gac\system.web.mobile\1.0.5000.0__b03f5f7f11d50a3a\s
ystem.web.mobile.dll"
/R:"c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net
files\sido\afa6eed6\2910c648\assembly\dl2\b9c8a8ca\04427f86_5bcbc401\sido.we
b.dll" /R:"c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net
files\sido\afa6eed6\2910c648\assembly\dl2\c3facbc2\7a9fd596_b1c5c401\county.
dataconnecter.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__b03f5f7f11
d50a3a\system.enterpriseservices.dll"
/R:"c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net
files\sido\afa6eed6\2910c648\assembly\dl2\5f320a44\10ba3786_5bcbc401\sido.da
taaccess.dll" /out:"C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary
ASP.NET Files\sido\afa6eed6\2910c648\bd5mutej.dll" /D:DEBUG=1 /debug+
"C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET
Files\sido\afa6eed6\2910c648\bd5mutej.0.vb"


Microsoft (R) Visual Basic .NET Compiler version 7.10.6001.4
for Microsoft (R) .NET Framework version 1.1.4322.2032
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\sido\afa6eed6\2910c648\assembly\dl2\5450e5d4\ca86261e_b449c401\county.
dll': Access is denied.
c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net
files\sido\afa6eed6\2910c648\assembly\dl2\5450e5d4\ca86261e_b449c401\county.
dll : error BC31011: Unable to load referenced library
'c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net
files\sido\afa6eed6\2910c648\assembly\dl2\5450e5d4\ca86261e_b449c401\county.
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\sido\afa6eed6\2910c648\assembly\dl2\5450e5d4\ca86261e_b449c401\county.
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.2032
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 SIDO.Web.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.2032; ASP.NET
Version:1.1.4322.2032
 
S

Steven Cheng[MSFT]

Hi Brad,

In addition to patrick's suggestion on checking the asp.net's process's
permission on those aspnet temporary folder. There is also another known
issue that the running anti-virus software on the server will also lock the
temporary assemblies of the asp.net web application. So it there any
anti-viurs soft running on the server you mentioned? IF so, you can turn
off it to see whether it is the cause.

If there is any other new findings, please feel free to post here.Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
R

Rod

I've begun to experience the same error message. We are not running an
anti-virus program on the server, so that is not the problem.

I will be very interested to learn what the answer to this problem is.

Rod
 
B

Brad

Tried disabling anti-virus and did not resolve problem. And yes, ASP.NET
account does have proper access to folders: If it did not it would always
fail. In my case it sporadically fails: again, sometimes fails after just
1 recompile....sometimes not until after many recompiles (i.e. could be
dozens of compiles before problems occurs again).
Just to be clear, I stateds win2003 server OS: That is my development
workstation which is running win2003 and problem occurs as I work within
VS2003: recompiles are in VS as I progress through development and testing
app.

Brad
 
G

Guest

Hi Brad..
Another thing that came to my mind is that do you belong to the
Debugger User and VS Developers Groups if not pls add the these GROUPS and
add ur self in!
Example:-
To add your user account into "Debugger users" group, you need to do the
following:
Log in as “Administratorâ€
Run “Computer management†in “Administrator toolsâ€
Choose “Local users and groups\groups†node

You may be the member of "Debugger users"†group, but you don’t have the
right to debug the aspnet worker process, because you are not the "aspnet"
user account or the member of “Administrators†group. Please add your user
account to the “Administrators†group on the machine.
Double-click "Debugger users"†group on right pane.
Click “Add†button on “Debugger users properties†dialog box.
Type your user account and click “Ok†button.

Another thing u can do is to try by registerering “aspnet_isapi.dll†with
“aspnet_regiis.exe –iâ€.
U can run "aspnet_regiis.exe –i" from the command line.

Hope this would help.

Patrick
 
S

Steven Cheng[MSFT]

HI Brad,

Also, is there any strong-named or unmanaged assembly used in your web
application? For example, the
\county.dll mentioned in the error message you've provided. Or any
assemblies in your application also referenced by some other project?

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
B

Brad

Yes, there are several strong named assemblies referenced by the web app,
including county.dll. County.dll is a core support assembly used by many of
the other assemblys.
Support assemblies in project are referenced by other projects, however I am
not working with any of those other projects at this time, not even running
the other web apps.
This may be stupid to mention but...I've worked on ***many*** other asp.net
web apps, all using the same core support assemblys (our internal framework)
and not had this problem before (except for the issue with indexing turned
on).
 
B

Brad

Yes, I am. And I am an admin on the box. If this were the issue the
problem should be consistent.
 
S

Steven Cheng[MSFT]

Hi Brad,

Thanks for your followup. Then, are those strong-named assemblies all put
in the GAC?
The index service issue is also concerned with strong-named assemblies put
in privaet bin folder.

PRB: "Access Denied" Error Messages When You Do Not Put Strong-Named
Assemblies in the Global Assembly Cache
http://support.microsoft.com/default.aspx?scid=kb;en-us;813833

If there'is any strong-named one in your asp.net application remain in the
privaet bin dir, you may try moving them to the GAC to see whether it
works. Thanks.

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
P

Patrick.O.Ige

Hi Brad,
Have u tried Steven's idea?
Patrick

Brad said:
Yes, I am. And I am an admin on the box. If this were the issue the
problem should be consistent.

after
 
B

Brad

No, nothing placed into the GAC....all local to the application. As
originally stated, indexing service is disabled.
 
S

Steven Cheng[MSFT]

Hi Brad,

Then, you can try putting those strong-named assemblies into the GAC to see
whether it works. There is some former issue which is just caused by the
strong-named assemblies in private bin folder.
The ASP.NET web application dosn't support private strong-named assemblies,
we need to put them into GAC. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
W

Wayne Brantley

I have the same problem as this thread.
When I reset IIS, it all works fine for a while. The temporary files are
created, then after a while - I will get access denied to a particular dll.
I tried moving the strong named dlls to the GAC, but then it just changes to
another dll (like Application Excecption Code Block) and gives access
denied.

The problem is that for some reason ASP.NET engine can no longer write to
its own temporary directories where it wrote to just a little while before.
I am wondering if it is because there is still a 'client' connected and it
still has the dll open somewhere. It is ASP.NET hat has the dll open -
because if you try to go in to the temp folders and delete the files with
explorer - it will not let you cause they are 'in-use'. If you reset IIS -
they are no longer in use - and it works fine for a while.

I do not have Indexing on. My antivirus does not scan those temporary
folders. This is VERY annoying...

I reset IIS and ran FILEMON from sysutils to see what accessed that file.
It started at 12:17:08 and by 12:32:02 the aspnet_wp.exe process was denied
a delete operation on the file.

The thing that accessed it were:
aspnet_wp.exe
csc.exe
svchost.exe - (you can see this open it and close it immediately)


I can send the complete log - but would need to do so privately.

Please help as this is completely annoying...
 
S

Steven Cheng[MSFT]

Hi Wayne,

If there is no strong-named assemblies in your web app's private bin
folder(and the indexing service is turn off) , is there any unmanaged
assembly or some assemblies which has some unmanaged assemlbies as
dependency? Also, you can also try turn off the anti-virus soft to verify
that it isn't the cause.

Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
W

Wayne Brantley

There ARE strong named assemblies in the private folder - however, this IS a
supported configuration. The only _rule_ is things you put in GAC are
supposed to be strong named. Also, this happens with the Exception
Application block from your folks - not sure if that is signed.

Also, you have to remember that it WORKS after an IIS reset - just after a
while - in this case 30 minutes later it quits working. Surely there is no
way this can be a 'signed' issue. Also, like I said I turned anitvirus off
for those folders.

There was a _related_ issue with always having to do a full solution
rebuild - if you had the Identitiy Impersonate in your web.config. I took
that out now - and I am hoping this issue leaves with it..
 
S

Steven Cheng[MSFT]

Hi Wayne,

As for the strong-named assembly in private bin path, it is not supported
in ASP.NET application and will cause some unexpected behaviors. The
following kb demonstrate two issue on this

#PRB: Appdomains Security Permission Error Message When You Access the
Strong-Named Assembly from the \Bin Directory
http://support.microsoft.com/?id=813830

813833 PRB: "Access Denied" Error Messages When You Do Not Put Strong-Named
http://support.microsoft.com/?id=813833

But still possible to cause some other problems, that's why we need to make
sure the strong-named assembly be put in GAC.

In addition, when we iisreset the server, the web applicatoin's
appdomain(in fact aspnet process) restart, so the original used temporary
assemblies are no longer used( locked), new temporary assemlies are
generated and use, that's why the error will go away for a while. But the
problem will still remain after some period as you've found.

Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 

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

Forum statistics

Threads
473,968
Messages
2,570,153
Members
46,699
Latest member
AnneRosen

Latest Threads

Top