Access Denied

DynamicPDF Generator for .NET (v3 and older) Forum

 Feb 04 2006 11:22 AM
Hello,

I tried to follow "Hello World" example from the help file, and I get a following error:

Access is denied: 'DynamicPDF.Generator.Community'.
Exception Details: System.IO.FileLoadException: Access is denied: 'DynamicPDF.Generator.Community'.

=== Pre-bind state information ===
LOG: DisplayName = DynamicPDF.Generator.Community, Version=3.0.3.0, Culture=neutral, PublicKeyToken=09b5ce0d5c0a9d8b
 (Fully-specified)
LOG: Appbase = file:///c:/inetpub/wwwroot/CoverageSummary
LOG: Initial PrivatePath = bin
Calling assembly : CoverageSummary, Version=1.0.2226.19735, Culture=neutral, PublicKeyToken=null.
===

LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/coveragesummary/a40900b8/29201b07/DynamicPDF.Generator.Community.DLL.
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/coveragesummary/a40900b8/29201b07/DynamicPDF.Generator.Community/DynamicPDF.Generator.Community.DLL.
LOG: Attempting download of new URL file:///c:/inetpub/wwwroot/CoverageSummary/bin/DynamicPDF.Generator.Community.DLL.

Any help would be appreciated.
 Feb 04 2006 11:41 AM
I narrowed it down to Forms Authentication.  Once I change the application to Windows authentication it works fine.

So haw can I make it work with Forms Authentication?

Thanks!
 Feb 08 2006 3:24 PM
Posted by a ceTe Software moderator
This post has been resolved.  The problem was a permissions issue on the DynamicPDF dll files.

The solution was to first figure out which user the Forms Authentication was being logged in with so that they could grant that user the correct permissions needed.  Take a look at the following MSDN link if you need assistance determining the identity of certain configuration setting, http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetAP05.asp

Once the user identity is know then the solution was just a matter of making sure that that user identity (typically "IUSR_MACHINE" or "ASPNET") has at least “read & execute” permissions on the dll.  Keep in mind that this will require you to clear out the Temporary ASP .NET Files for that project in order for this change to take affect.  Here are the steps to follow to complete this:

- Go to the DynamicPDF dll file in the bin folder of your application and add/give the appropriate account (typically "IUSR_MACHINE" or "ASPNET")  “read & execute” permissions.
- Next you will need to stop the “WWW Publishing” service so that you can clear the Temp ASP files.
- Once the "WWW Publishing" service is stopped then explore to the “C:\WINDOWS\Microsoft.NET\Framework\v[your_framework_version]\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).
- Once the folders have been deleted then Start the “WWW Publishing” service again.
- Now run the application again.

If anyone is receiving a similair error message and is not using forms authentication then you will likely need to follow the above steps for the ASPNET user since this is typically the identity of the default user account.

Thanks,
ceTe Software Support Team
 Mar 10 2006 2:29 PM
I get the access denied error constantly.  I have given permissions to the aspnet user as well as the iusr_machine user for the dll, stopped the www service, deleted temp files (when it allows me to do so, a majority of the time it tells me the files are in use) but still get the error.  Please help!
 Mar 10 2006 2:48 PM
Posted by a ceTe Software moderator
Hello,

Can you tell us what error or stack trace are you getting when trying to compile your code?

Thanks,
ceTe Software Support Team
 Mar 10 2006 2:51 PM
Error message paste below.

Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Access is denied: 'DynamicPDF.Generator.Developer'.

Source Error:

Line 196:                                <add assembly="System.EnterpriseServices, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
Line 197:                                <add assembly="System.Web.Mobile, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
Line 198:                                <add assembly="*"/>
Line 199:                        </assemblies>
Line 200:                </compilation>
 

Source File: c:\windows\microsoft.net\framework\v1.1.4322\Config\machine.config    Line: 198

Assembly Load Trace: The following information can be helpful to determine why the assembly 'DynamicPDF.Generator.Developer' could not be loaded.


=== Pre-bind state information ===
LOG: DisplayName = DynamicPDF.Generator.Developer
 (Partial)
LOG: Appbase = file:///C:/Inetpub/wwwroot/EnrollmentReport
LOG: Initial PrivatePath = bin
Calling assembly : (Unknown).
===

LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Post-policy reference: DynamicPDF.Generator.Developer
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/enrollmentreport/d3cc0eff/ed4e0587/DynamicPDF.Generator.Developer.DLL.
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/enrollmentreport/d3cc0eff/ed4e0587/DynamicPDF.Generator.Developer/DynamicPDF.Generator.Developer.DLL.
LOG: Attempting download of new URL file:///C:/Inetpub/wwwroot/EnrollmentReport/bin/DynamicPDF.Generator.Developer.DLL.
LOG: Publisher policy file is not found.
LOG: No redirect found in host configuration file (C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet.config).
LOG: Using machine configuration file from C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\config\machine.config.
LOG: Post-policy reference: DynamicPDF.Generator.Developer, Version=3.0.3.0, Culture=neutral, PublicKeyToken=09b5ce0d5c0a9d8b

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032
 Mar 10 2006 2:54 PM
Posted by a ceTe Software moderator
Hello,

This is 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
 Mar 10 2006 3:00 PM
you guys are the best!  thank you!

All times are US Eastern Standard time. The time now is 11:19 AM.