I am trying to move an application from my system to a new test system. I really should have tried an easier program first, but I didn't really have a chance. My application was originally written in ASP.NET 1.1, but was migrated to 2.0 during development. The reason this is an issue is because the application is using the Microsoft.Web.U I.WebControls.d ll for the tree view and tab strip controls that didn't exist prior to 2.0. Well, that is where my problem lies. I am getting an access denied message when it is trying to load that dll. I am impersonating a user and I am pretty sure that I have granted access every where that I needed. Please assist.
Here is the ASP.NET error message:
Could not load file or assembly 'microsoft.web. ui.webcontrols' or one of its dependencies. Access is denied.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.FileL oadException: Could not load file or assembly 'microsoft.web. ui.webcontrols' or one of its dependencies. Access is denied.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'microsoft.web. ui.webcontrols' could not be loaded.
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\M icrosoft\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\M icrosoft\Fusion !EnableLog].
Stack Trace:
[FileLoadExcepti on: Could not load file or assembly 'microsoft.web. ui.webcontrols' or one of its dependencies. Access is denied.]
[FileLoadExcepti on: Could not load file or assembly 'Microsoft.Web. UI.WebControls, Version=1.0.2.2 26, Culture=neutral , PublicKeyToken= null' or one of its dependencies. Access is denied.]
System.Reflecti on.Assembly.nLo ad(AssemblyName fileName, String codeBase, Evidence assemblySecurit y, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotF ound, Boolean forIntrospectio n) +0
System.Reflecti on.Assembly.Int ernalLoad(Assem blyName assemblyRef, Evidence assemblySecurit y, StackCrawlMark& stackMark, Boolean forIntrospectio n) +211
System.Reflecti on.Assembly.Int ernalLoad(Strin g assemblyString, Evidence assemblySecurit y, StackCrawlMark& stackMark, Boolean forIntrospectio n) +141
System.Reflecti on.Assembly.Loa d(String assemblyString) +25
System.Web.Conf iguration.Compi lationSection.L oadAssemblyHelp er(String assemblyName, Boolean starDirective) +32
[ConfigurationEr rorsException: Could not load file or assembly 'Microsoft.Web. UI.WebControls, Version=1.0.2.2 26, Culture=neutral , PublicKeyToken= null' or one of its dependencies. Access is denied.]
System.Web.Conf iguration.Compi lationSection.L oadAssemblyHelp er(String assemblyName, Boolean starDirective) +596
System.Web.Conf iguration.Compi lationSection.L oadAllAssemblie sFromAppDomainB inDirectory() +3479033
System.Web.Conf iguration.Compi lationSection.L oadAssembly(Ass emblyInfo ai) +46
System.Web.Comp ilation.BuildMa nager.GetRefere ncedAssemblies( CompilationSect ion compConfig) +177
System.Web.Comp ilation.BuildPr ovidersCompiler ..ctor(VirtualP ath configPath, Boolean supportLocaliza tion, String outputAssemblyN ame) +180
System.Web.Comp ilation.Applica tionBuildProvid er.GetGlobalAsa xBuildResult(Bo olean isPrecompiledAp p) +3446613
System.Web.Comp ilation.BuildMa nager.CompileGl obalAsax() +51
System.Web.Comp ilation.BuildMa nager.EnsureTop LevelFilesCompi led() +462
[HttpException (0x80004005): Could not load file or assembly 'Microsoft.Web. UI.WebControls, Version=1.0.2.2 26, Culture=neutral , PublicKeyToken= null' or one of its dependencies. Access is denied.]
System.Web.Comp ilation.BuildMa nager.ReportTop LevelCompilatio nException() +57
System.Web.Comp ilation.BuildMa nager.EnsureTop LevelFilesCompi led() +612
System.Web.Host ing.HostingEnvi ronment.Initial ize(Application Manager appManager, IApplicationHos t appHost, IConfigMapPathF actory configMapPathFa ctory, HostingEnvironm entParameters hostingParamete rs) +456
[HttpException (0x80004005): Could not load file or assembly 'Microsoft.Web. UI.WebControls, Version=1.0.2.2 26, Culture=neutral , PublicKeyToken= null' or one of its dependencies. Access is denied.]
System.Web.Http Runtime.FirstRe questInit(HttpC ontext context) +3426839
System.Web.Http Runtime.EnsureF irstRequestInit (HttpContext context) +88
System.Web.Http Runtime.Process RequestInternal (HttpWorkerRequ est wr) +149
Here is the message that was left in the event log:
Description:
Event code: 3008
Event message: A configuration error has occurred.
Event time: 7/6/2007 11:22:11 AM
Event time (UTC): 7/6/2007 4:22:11 PM
Event ID: 8db6944cf5db4e6 49d716259d49e6c 5b
Event sequence: 1
Event occurrence: 1
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/1/Root/kdoc-3-128282125313601 282
Trust level: Full
Application Virtual Path: /kdoc
Application Path: c:\inetpub\wwwr oot\kdoc\
Machine name: [HIDDEN NAME]
Process information:
Process ID: 2268
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWO RK SERVICE
Exception information:
Exception type: HttpException
Exception message: Could not load file or assembly 'Microsoft.Web. UI.WebControls, Version=1.0.2.2 26, Culture=neutral , PublicKeyToken= null' or one of its dependencies. Access is denied.
Request information:
Request URL: http://localhost/kdoc/Default.aspx
Request path: /kdoc/Default.aspx
User host address: 127.0.0.1
User:
Is authenticated: False
Authentication Type:
Thread account name: [HIDDEN NAME]
Thread information:
Thread ID: 1
Thread account name: [HIDDEN NAME]
Is impersonating: False
Stack trace: at System.Web.Comp ilation.BuildMa nager.ReportTop LevelCompilatio nException()
at System.Web.Comp ilation.BuildMa nager.EnsureTop LevelFilesCompi led()
at System.Web.Host ing.HostingEnvi ronment.Initial ize(Application Manager appManager, IApplicationHos t appHost, IConfigMapPathF actory configMapPathFa ctory, HostingEnvironm entParameters hostingParamete rs)