C1 Community
ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

Could not load file or assembly 'c1.c1zip' or one of its dependencies. Access is denied.

rated by 0 users
This post has 1 Reply | 1 Follower

Not Ranked
Posts 1
nearle Posted: Thu, Mar 13 2008 12:40 PM

The majority of the time our website is working perfectly, but from time-to-time we are getting a "Server Error in '/' Application". I'd be grateful if anyone could shed some light on what might be causing the problem.

The stack trace is shown below.

Stack Trace:

[FileLoadException: Could not load file or assembly 'c1.c1zip' 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 'c1.c1zip' 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.Configuration.AssemblyInfo.get_AssemblyInternal() +3014107
   System.Web.Compilation.CompilationUtil.GetTypeFromAssemblies(AssemblyCollection assembliesCollection, String typeName, Boolean ignoreCase) +136
   System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +325
   System.Web.UI.Page.get_IsPartialRenderingSupported() +71
   System.Web.UI.WebControls.ValidationSummary.OnPreRender(EventArgs e) +253
   System.Web.UI.Control.PreRenderRecursiveInternal() +86
   System.Web.UI.Control.PreRenderRecursiveInternal() +170
   System.Web.UI.Control.PreRenderRecursiveInternal() +170
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +7248
   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +213
   System.Web.UI.Page.ProcessRequest() +86
   System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +18
   System.Web.UI.Page.ProcessRequest(HttpContext context) +49
   ASP.system_artist_aspx.ProcessRequest(HttpContext context) +4
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +358
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433

Top 25 Contributor
Posts 455
C1_GaryB replied on Thu, Mar 20 2008 3:20 AM
Hi,
 
Please try out the following as from the strack trace, it seems to me that this is more of a permission issue rather than anything else -
 
1. Right click on the folder where the application has been deployed and check for its websharing rights - it should have all the rights checked if you want to create or modify the zip file.
2. Open up for ASP.NET version selected - the version should be selected as 2.x.
3. Right click on the folder and select the security tab - make sure that the ASPNET account has been given all the required rights.
4. Also we will need to set the following trust level for ComponentOne controls to make them working -
 
A) Security Classes:
 
<SecurityClass Name="ReflectionPermission" Description="System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<SecurityClass Name="OleDbPermission" Description="System.Data.OleDb.OleDbPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/> This is required only when our application is using MS-Access
 
B) PermissionSet:
1. <IPermission  class="ReflectionPermission" version="1" Flags="ReflectionEmit,MemberAccess"/>
2. <IPermission class="OleDbPermission" version="1" Unrestricted="true" />
3. <!-- Below is default SecurityPermission object and flags -->
 
<!--<IPermission
class="SecurityPermission" 
version="1" 
Flags="Assertion, Execution, ControlThread, ControlPrincipal, RemotingConfiguration
 />-->
<!--
We need to Add SerializationFormatter flag to security permission.  This allows deserialization of the license added to App_Licenses.dll by the Microsoft IDE.
-->
<IPermission
class="SecurityPermission"
version="1"
Flags="Assertion, Execution, ControlThread, ControlPrincipal, RemotingConfiguration, SerializationFormatter"
/>
 
This should help you to get your application running.
 
Regards,
Gary.
 
<nearle> wrote in message news:202857@10.0.1.98...

The majority of the time our website is working perfectly, but from time-to-time we are getting a "Server Error in '/' Application". I'd be grateful if anyone could shed some light on what might be causing the problem.

The stack trace is shown below.

Stack Trace:

[FileLoadException: Could not load file or assembly 'c1.c1zip' 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 'c1.c1zip' 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.Configuration.AssemblyInfo.get_AssemblyInternal() +3014107
   System.Web.Compilation.CompilationUtil.GetTypeFromAssemblies(AssemblyCollection assembliesCollection, String typeName, Boolean ignoreCase) +136
   System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +325
   System.Web.UI.Page.get_IsPartialRenderingSupported() +71
   System.Web.UI.WebControls.ValidationSummary.OnPreRender(EventArgs e) +253
   System.Web.UI.Control.PreRenderRecursiveInternal() +86
   System.Web.UI.Control.PreRenderRecursiveInternal() +170
   System.Web.UI.Control.PreRenderRecursiveInternal() +170
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +7248
   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +213
   System.Web.UI.Page.ProcessRequest() +86
   System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +18
   System.Web.UI.Page.ProcessRequest(HttpContext context) +49
   ASP.system_artist_aspx.ProcessRequest(HttpContext context) +4
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +358
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433



http://helpcentral.componentone.com/cs/forums/p/74623/202857.aspx#202857

Page 1 of 1 (2 items) | RSS
Contact ComponentOne: 1.800.858.2739 ©1987-2010 ComponentOne LLC All Rights Reserved.