Could not load file or assembly 'ceTe.DynamicPDF' or one of its dependencies. Access is denied.

Could not load file or assembly 'ceTe.DynamicPDF' or one of its dependencies. Access is denied.

Forum member · Aug 21, 2008
I am receiving the following error message when opening one of our web applications. I did find in the forum about changing/adding permission and stopping/starting services but it didn't work. We have moved our test server to another machine, which started this error (it was a virtual). I have also attempted to do a repair on the PDF Generator but that also didn't work. Any ideas on what to do next? 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.FileLoadException: Could not load file or assembly 'ceTe.DynamicPDF' 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 'ceTe.DynamicPDF' could not be loaded. WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\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\Microsoft\Fusion!EnableLog]. Stack Trace: [FileLoadException: Could not load file or assembly 'ceTe.DynamicPDF' or one of its dependencies. Access is denied.] [FileLoadException: Could not load file or assembly 'ceTe.DynamicPDF, Version=4.0.0.0, Culture=neutral, PublicKeyToken=09b5ce0d5c0a9d8b' or one of its dependencies. Access is denied.] System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0 System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +54 System.Reflection.Assembly.InternalLoad(AssemblyName 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.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +32 [ConfigurationErrorsException: Could not load file or assembly 'ceTe.DynamicPDF, Version=4.0.0.0, Culture=neutral, PublicKeyToken=09b5ce0d5c0a9d8b' or one of its dependencies. Access is denied.] System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +596 System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +211 System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +46 System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +177 System.Web.Compilation.BuildProvidersCompiler..ctor(VirtualPath configPath, Boolean supportLocalization, String outputAssemblyName) +185 System.Web.Compilation.CodeDirectoryCompiler.GetCodeDirectoryAssembly(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories, Boolean isDirectoryAllowed) +350 System.Web.Compilation.BuildManager.CompileCodeDirectory(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories) +125 System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +441 [HttpException (0x80004005): Could not load file or assembly 'ceTe.DynamicPDF, Version=4.0.0.0, Culture=neutral, PublicKeyToken=09b5ce0d5c0a9d8b' or one of its dependencies. Access is denied.] System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +57 System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +612 System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters) +644 [HttpException (0x80004005): Could not load file or assembly 'ceTe.DynamicPDF, Version=4.0.0.0, Culture=neutral, PublicKeyToken=09b5ce0d5c0a9d8b' or one of its dependencies. Access is denied.] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +3465427 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +69 System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +279 -------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433

Re: Could not load file or assembly 'ceTe.DynamicPDF' or one of its dependencies. Access is denied.

Support · Aug 21, 2008
Hello, The problem appears to be related to permission on the DLL file on the production server. The solution to this is then, make sure that the "IUSR_MACHINE" has at least "read & execute" permissions on the dll. Keep in mind that you will need to clear out the Temporary ASP .NET Files in order for this change to take effect. Here are the steps to follow to complete this: 1. Go to the DynamicPDF dll file in the bin folder of your application. 2. Add/give the "Machine/IUSR_MACHINE" account "read & execute" permissions. 3. Next you will need to stop the "WWW Publishing" service so that you can clear the Temp ASP files. 4. Once that is stopped then explore to the "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files" folder and then delete the folder associated with this particular application (if you are unsure you can just delete every folder in the folder). 5. Once the folders have been deleted then start the "WWW Publishing" service again. 6. Now run the application again. Following the above steps and recompling the application will likely solve your problem. Thanks, ceTe Software Support Team

Re: Could not load file or assembly 'ceTe.DynamicPDF' or one of its dependencies. Access is denied.

Forum member · Aug 21, 2008
I already tried that. It still didn't work.

Re: Could not load file or assembly 'ceTe.DynamicPDF' or one of its dependencies. Access is denied.

Support · Aug 21, 2008
Hello, This could likely be caused by a timing issue in .NET when the assemblies are loaded. We have seen many threads about this and it is not particular to our product. This can happen when your Web Applications attempts to restart after recompiling your assembly. Here is a Microsoft article related to this issue: http://support.microsoft.com/default.aspx?scid=kb;en-us;329065 Two solutions are: 1) Stop the Indexing Service on the machine. OR 2) Place our assemblies in the GAC. If you have the release build installed, there are batch file to place the assemblies in the GAC. Thanks, ceTe Software Support Team

Re: Could not load file or assembly 'ceTe.DynamicPDF' or one of its dependencies. Access is denied.

Forum member · Aug 21, 2008
Which version of the GAC? I see 2. Version 1.0 and 1.1.

Re: Could not load file or assembly 'ceTe.DynamicPDF' or one of its dependencies. Access is denied.

Support · Aug 21, 2008
Hello, There should only be one GAC. It should be at the following location: "C:\WINDOWS\assembly". Thanks, ceTe Software Support Team

Re: Could not load file or assembly 'ceTe.DynamicPDF' or one of its dependencies. Access is denied.

Forum member · Aug 21, 2008
I do not see anything in there regarding GAC

Re: Could not load file or assembly 'ceTe.DynamicPDF' or one of its dependencies. Access is denied.

Forum member · Aug 21, 2008
I see 2 batch files for install and uninstall in: C:\Program Files\ceTe Software\DynamicPDF v4.0 for .NET Server Edition\bin

Re: Could not load file or assembly 'ceTe.DynamicPDF' or one of its dependencies. Access is denied.

Support · Aug 21, 2008
Hello, Run the install batch file and that will install the DLL files in the GAC. Thanks, ceTe Software Support Team

Re: Could not load file or assembly 'ceTe.DynamicPDF' or one of its dependencies. Access is denied.

Forum member · Aug 21, 2008
Both versions?

Re: Could not load file or assembly 'ceTe.DynamicPDF' or one of its dependencies. Access is denied.

Support · Aug 21, 2008
Hello, Only run the batch file corresponding to the version of .NET Framework you will be using. Thanks, ceTe Software Support Team

Re: Could not load file or assembly 'ceTe.DynamicPDF' or one of its dependencies. Access is denied.

Forum member · Aug 21, 2008
Have installed both versions but still having same problem. Does the system need a reboot or anything else?

Re: Could not load file or assembly 'ceTe.DynamicPDF' or one of its dependencies. Access is denied.

Support · Aug 22, 2008
Hello, You can try rebooting your system and see if that helps in resolving the problem. Thanks, ceTe Software Support Team

Re: Could not load file or assembly 'ceTe.DynamicPDF' or one of its dependencies. Access is denied.

Forum member · Aug 22, 2008
Tried that as well.

Re: Could not load file or assembly 'ceTe.DynamicPDF' or one of its dependencies. Access is denied.

Support · Aug 22, 2008
Hello, Please make sure that you have sufficient permissions. It still looks like the necessary permissions are not being applied on the DLL file. Thanks, ceTe Software Support Team

Re: Could not load file or assembly 'ceTe.DynamicPDF' or one of its dependencies. Access is denied.

Forum member · Aug 22, 2008
The permissions were set exactly as requested for both IUSR_Machine and ASPNET