This is a migrated thread and some comments may be shown as answers.

Could not load file or assembly on Medium Trust Level

7 Answers 322 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jun Ting
Top achievements
Rank 1
Jun Ting asked on 22 Oct 2009, 11:33 AM
The error below is showing when using the Radgrid.
The server has Medium Trust Level. Others component such as Tabstrip is working.
The telerik version is "2009.2.826.35".
We have also add the line to the web.config:
 

<

 

add assembly="Telerik.Web.UI, Version=2009.2.826.35, Culture=neutral, PublicKeyToken=121FAE78165BA3D4"/>
<httpHandlers>
<add path="Telerik.Web.UI.WebResource.axd" verb="*"

 

 

 

 

 

type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2009.2.826.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4"

 

 

 

validate="false" />

 

 

</

 

httpHandlers>

 

 

 

 

 

 

 

 

 
 
Could not load file or assembly 'System, Version=1.0.7.30072, Culture=neutralPublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified.   
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.FileNotFoundException: Could not load file or assembly 'System, Version=1.0.7.30072, Culture=neutralPublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified.  
 
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 'System, Version=1.0.7.30072, Culture=neutralPublicKeyToken=c5687fc88969c44d' could not be loaded.  
 

7 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 26 Oct 2009, 09:43 AM
Hi Jun,

In order to avoid this error, please review the following online resources which elaborate on this matter:
Meet Telerik.Web.Design.dll
General Troubleshooting (the bottom section of the article)

I hope this information helps.
 
Greetings,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Jun Ting
Top achievements
Rank 1
answered on 27 Oct 2009, 02:06 AM

I still can't find the reason that causing the error. It working in our local server. But, it didn't work in the shared hosting. (Medium Trust Level).
Here is the page that showed the error.
http://www.mercy.org.my/default4.aspx

Below is the web.config:

<?xml version="1.0"?>  
<!--   
    Note: As an alternative to hand editing this file you can use the   
    web admin tool to configure settings for your application. Use  
    the Website->Asp.Net Configuration option in Visual Studio.  
    A full list of settings and comments can be found in   
    machine.config.comments usually located in   
    \Windows\Microsoft.Net\Framework\v2.x\Config   
--> 
<configuration> 
  <configSections> 
    <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">  
      <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">  
        <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" /> 
        <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">  
          <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere" /> 
          <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" /> 
          <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" /> 
          <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" /> 
        </sectionGroup> 
      </sectionGroup> 
    </sectionGroup> 
  </configSections> 
    <appSettings> 
         
        <!--Remove App Setting--> 
         
    </appSettings> 
    <connectionStrings> 
 
      <!--Remove connection string--> 
 
    </connectionStrings> 
  <system.net> 
    <mailSettings> 
      <!--<smtp deliveryMethod="SpecifiedPickupDirectory">--> 
      <smtp> 
          
      </smtp> 
    </mailSettings> 
  </system.net> 
  <system.web> 
    <!--   
            Set compilation debug="true" to insert debugging   
            symbols into the compiled page. Because this   
            affects performance, set this value to true only   
            during development.  
 
            Visual Basic options:  
            Set strict="true" to disallow all data type conversions   
            where data loss can occur.   
            Set explicit="true" to force declaration of all variables.  
        --> 
    <compilation debug="true" strict="false" explicit="true">  
      <assemblies> 
        <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> 
        <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
        <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> 
        <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> 
         <add assembly="Telerik.Web.UI, Version=2009.2.826.35, Culture=neutral, PublicKeyToken=121FAE78165BA3D4"/>  
      </assemblies> 
    </compilation> 
    <pages> 
      <namespaces> 
        <clear /> 
        <add namespace="System" /> 
        <add namespace="System.Collections" /> 
        <add namespace="System.Collections.Generic" /> 
        <add namespace="System.Collections.Specialized" /> 
        <add namespace="System.Configuration" /> 
        <add namespace="System.Text" /> 
        <add namespace="System.Text.RegularExpressions" /> 
        <add namespace="System.Linq" /> 
        <add namespace="System.Xml.Linq" /> 
        <add namespace="System.Web" /> 
        <add namespace="System.Web.Caching" /> 
        <add namespace="System.Web.SessionState" /> 
        <add namespace="System.Web.Security" /> 
        <add namespace="System.Web.Profile" /> 
        <add namespace="System.Web.UI" /> 
        <add namespace="System.Web.UI.WebControls" /> 
        <add namespace="System.Web.UI.WebControls.WebParts" /> 
        <add namespace="System.Web.UI.HtmlControls" /> 
      </namespaces> 
      <controls> 
        <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
        <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
      </controls> 
    </pages> 
    <!--  
            The <authentication> section enables configuration   
            of the security authentication mode used by   
            ASP.NET to identify an incoming user.   
        --> 
    <!--  
            The <customErrors> section enables configuration   
            of what to do if/when an unhandled error occurs   
            during the execution of a request. Specifically,   
            it enables developers to configure html error pages   
            to be displayed in place of a error stack trace.  
 
        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">  
            <error statusCode="403" redirect="NoAccess.htm" /> 
            <error statusCode="404" redirect="FileNotFound.htm" /> 
        </customErrors> 
        --> 
    <customErrors mode="Off" defaultRedirect="error.htm">  
      <error statusCode="404" redirect="error.htm?e=404" /> 
    </customErrors> 
    <authentication mode="Forms">  
      <forms loginUrl="icube/default.aspx?e=1" protection="All" timeout="120" name=".ASPXAUTH" path="/" requireSSL="false" slidingExpiration="true" defaultUrl="icube/menu.aspx" cookieless="UseDeviceProfile" enableCrossAppRedirects="false" /> 
    </authentication> 
    <httpRuntime executionTimeout="900" maxRequestLength="10240" /> 
    <httpHandlers> 
      <remove verb="*" path="*.asmx" /> 
      <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
      <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
      <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" /> 
        <!--<add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" />--> 
        <add path="Telerik.Web.UI.WebResource.axd" verb="*" 
  type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2009.2.826.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" 
  validate="false" /> 
    </httpHandlers> 
    <httpModules> 
      <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
    </httpModules> 
  </system.web> 
  <system.codedom> 
    <compilers> 
      <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">  
        <providerOption name="CompilerVersion" value="v3.5" /> 
        <providerOption name="WarnAsError" value="false" /> 
      </compiler> 
      <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">  
        <providerOption name="CompilerVersion" value="v3.5" /> 
        <providerOption name="OptionInfer" value="true" /> 
        <providerOption name="WarnAsError" value="false" /> 
      </compiler> 
    </compilers> 
  </system.codedom> 
  <!--   
        The system.webServer section is required for running ASP.NET AJAX under Internet  
        Information Services 7.0.  It is not necessary for previous version of IIS.  
    --> 
  <system.webServer> 
    <validation validateIntegratedModeConfiguration="false" /> 
    <modules> 
      <remove name="ScriptModule" /> 
      <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
    </modules> 
    <handlers> 
      <remove name="WebServiceHandlerFactory-Integrated" /> 
      <remove name="ScriptHandlerFactory" /> 
      <remove name="ScriptHandlerFactoryAppServices" /> 
      <remove name="ScriptResource" /> 
      <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
      <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
      <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
      <add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" /> 
    </handlers> 
  </system.webServer> 
  <runtime> 
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">  
      <dependentAssembly> 
        <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35" /> 
        <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" /> 
      </dependentAssembly> 
      <dependentAssembly> 
        <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35" /> 
        <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" /> 
      </dependentAssembly> 
    </assemblyBinding> 
  </runtime> 
</configuration> 

0
Pavlina
Telerik team
answered on 27 Oct 2009, 04:01 PM
Hi Jun Ting,

Could you please confirm that when you change the trust level to 'Full' everything works fine?

Regards,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Jun Ting
Top achievements
Rank 1
answered on 28 Oct 2009, 04:43 AM
Hi Pavlina,

I have been tested in local server. The grid is working when i changed the trust level to "Medium".
What could be the reason for the error below when deployed in shared hosting?

Could not load file or assembly 'System, Version=1.0.7.30072, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified.

0
Pavlina
Telerik team
answered on 28 Oct 2009, 05:02 PM
Hello Jun Ting,

All Telerik controls are server controls and have to be installed on the web server in order to function properly. This also means that you will need to create the respective virtual directories and give the proper permissions (ASPNET [IIS5], NEtwork Service [IIS6]) in order to use them on the shared hosting.

For more information about deploying RadControls on server, refer to the following articles:
Deploying RadControls on Shared Hosting
http://www.google.bg/search?sourceid=navclient&aq=h0&oq=deploy%20&ie=UTF-8&rlz=1T4GPTB_enBG314BG314&q=deploy+asp.net+web+site

I hope this helps.

Greetings,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Dave V
Top achievements
Rank 1
answered on 09 Mar 2010, 05:01 PM
Hi Jun,

    I'm having this exact same problem with RadGrid, but I'm using Q3-2009.  Did you ever get a resolution to this issue?  This is driving me nuts.

Thanks,
Dave
0
Pavlina
Telerik team
answered on 10 Mar 2010, 05:04 PM
Hi Dave,

Please review the following online resources which elaborate on how to avoid this error:
http://blogs.telerik.com/atanaskorchev/posts/09-03-06/Meet_Telerik_Web_Design_dll.aspx
http://www.telerik.com/help/aspnet-ajax/troubleshooting.html (the bottom section of the article)

I hope this information helps.

Greetings,
Pavlina
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Grid
Asked by
Jun Ting
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Jun Ting
Top achievements
Rank 1
Dave V
Top achievements
Rank 1
Share this question
or