Horrible Versioning Issues I guess?

2 posts, 0 answers
  1. Dustin Dodson
    Dustin Dodson avatar
    21 posts
    Member since:
    Jun 2012

    Posted 12 Aug 2013 Link to this post

    OK I tried to update everything at once... probably not the smartest thing in the world, but that's what we have this community for right? ;-)

    Anyway, here we go a lot to explain.

    I updated to the latest Telerik.Web.UI.dll and Skins.dll 2013.2.717.40 as of right this second. I also decided it would be a great idea to go ahead and update the OpenAccessORM as well to the latest version.. 2013.2.702.1....

    So of course things are going to blow up, I expected that... what I didn't expect was this:

    Server Error in '/ADotNET' Application.

    Could not load file or assembly 'Telerik.Web.UI' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))

    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 'Telerik.Web.UI' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))

    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 'Telerik.Web.UI' could not be loaded.

    === Pre-bind state information ===
    LOG: User = ciisuser
    LOG: DisplayName = Telerik.Web.UI
     (Partial)
    WRN: Partial binding information was supplied for an assembly:
    WRN: Assembly Name: Telerik.Web.UI | Domain ID: 4
    WRN: A partial bind occurs when only part of the assembly display name is provided.
    WRN: This might result in the binder loading an incorrect assembly.
    WRN: It is recommended to provide a fully specified textual identity for the assembly,
    WRN: that consists of the simple name, version, culture, and public key token.
    WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
    LOG: Appbase = file:///E:/MyDoeProjects/ADotNET/
    LOG: Initial PrivatePath = E:\MyDoeProjects\ADotNET\bin Calling assembly : (Unknown). === LOG: This bind starts in default load context. LOG: Using application configuration file: E:\MyDoeProjects\ADotNET\web.config LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet.config LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config. LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind). LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/adotnet/6cbcc12d/eaa54d1e/Telerik.Web.UI.DLL. LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/adotnet/6cbcc12d/eaa54d1e/Telerik.Web.UI/Telerik.Web.UI.DLL. LOG: Attempting download of new URL file:///E:/MyDoeProjects/ADotNET/AppaloosaDotNET/bin/Telerik.Web.UI.DLL. LOG: Using application configuration file: E:\MyDoeProjects\ADotNET\web.config LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet.config LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config. LOG: Post-policy reference: Telerik.Web.UI, Version=2013.2.717.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4 ERR: Failed to complete setup of assembly (hr = 0x80070057). Probing terminated.

    Stack Trace:

    [FileLoadException: Could not load file or assembly 'Telerik.Web.UI' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))]
    
    [FileLoadException: Could not load file or assembly 'Telerik.Web.UI, Version=2013.2.717.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))]
       System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0
       System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +39
       System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks) +132
       System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +144
       System.Reflection.Assembly.Load(String assemblyString) +28
       System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +46
    
    [ConfigurationErrorsException: Could not load file or assembly 'Telerik.Web.UI, Version=2013.2.717.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))]
       System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +618
       System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +209
       System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +130
       System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +178
       System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() +94
       System.Web.Compilation.BuildManager.CallPreStartInitMethods() +332
       System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +677
    
    [HttpException (0x80004005): Could not load file or assembly 'Telerik.Web.UI, Version=2013.2.717.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))]
       System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9104200
       System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +97
       System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +256
    


    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.276


    I think I can safely say this is the first time I've ever seen this error.

    Now the Telerik.Web.UI is not in the GAC. So I added the reference by browsing to the install directory.

    Another fear of mine is that more than likely the page I'm trying to call is referencing custom .dll files that we wrote using an older version of OpenAccess. They are all class files, so I don't think I can use the awesome PublisherPolicy.cfg on anything that is just a class assembly.

    So I will probably have to go back through all of those and update them individually which is a whole bunch of them... so if anyone does know of a better way to update OpenAccess references to newer versions on class assemblies.... please do tell :D

    Anyway, back to the original issue above, I have double checked the bin file of my project and the Telerik.Web.UI.dll, etc.. files are there.
    To make it worse, we have an Assemblies folder that we reference for all of the custom individual class assemblies that we write. If I move the Telerik.Web.UI.dll files and it's crew over to that file I then get this error instead.

    Server Error in '/ADotNET' Application.

    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: Could not load type 'Telerik.Web.UI.RadSessionPageStateCompression'.

    Source Error:

    Line 6:    <browser refID="Default">
    Line 7:      <controlAdapters>
    Line 8:        <adapter controlType="System.Web.UI.Page" adapterType="Telerik.Web.UI.RadSessionPageStateCompression" />
    Line 9:      </controlAdapters>    
    Line 10:   </browser>   

    Source File: E:\MyDoeProjects\ADotNET\App_Browsers\BrowserFile.browser    Line: 8


    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.276


    Yes that's the browser file saying that it cannot find the Telerik.Web.UI.RadSessionPageStateCompression... I'm guessing that's just because it couldn't load the file from the reference folder we have... but even if that was the case shouldn't have copied the Telerik.Web.UI file from the non GAC reference that I specified???

    Anyway lots of confusion and frustration going on...

    Since I know you are going to want to see the web.config here it is.

    <?xml version="1.0"?>
    <configuration
    <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.
            -->
        <!--
          Set compilation debug="true" to insert debugging
          symbols into the compiled page. Because this
          affects performance, set this value to true only
          during development.
        -->
    <browserCaps>
          <case>
            RequiresControlStateInSession=true
          </case>
        </browserCaps>  
        <compilation debug="true" targetFramework="4.0">
          <assemblies>
            <add assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
            <add assembly="Microsoft.ReportViewer.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
            <add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
            <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
            <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
            <add assembly="System.Web.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
            <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
            <add assembly="Telerik.ReportViewer.WebForms, Version=7.1.13.802, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" />
            <add assembly="Telerik.Reporting, Version=7.1.13.802, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" />
            <add assembly="System.Speech, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
          </assemblies>
          <buildProviders>
            <add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
          </buildProviders>
        </compilation>
        <!--
                The <authentication> section enables configuration
                of the security authentication mode used by
                ASP.NET to identify an incoming user.
            -->
        <!--
          The <authentication> section enables configuration
          of the security authentication mode used by
          ASP.NET to identify an incoming user.
        -->
        <authentication mode="Windows" />
        <!--
                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>
            -->
        <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
        <!--<pages>-->
          <controls>
            <add tagPrefix="tlk" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI, Version=2013.2.717.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4" />
            <add tagPrefix="tlkRpt" assembly="Telerik.ReportViewer.WebForms, Version=7.1.13.802, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" namespace="Telerik.ReportViewer.WebForms" />       
            <!--<add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI" />-->
            <!--<add tagPrefix="tlkRpt" assembly="Telerik.ReportViewer.WebForms, Version=5.1.11.713, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" namespace="Telerik.ReportViewer.WebForms" />-->
            <!--<add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI" />-->
          </controls>
        </pages>
        <!--
          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>
        -->
        <httpHandlers>
          <add path="elmah.axd" verb="POST,GET,HEAD" type="Elmah.ErrorLogPageFactory, Elmah" />
          <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" />
          <add path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" validate="false" />
          <add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false" />
          <add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false" />
          <add path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" validate="false" />
          <add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false" />
          <add type="Telerik.ReportViewer.WebForms.HttpHandler, Telerik.ReportViewer.WebForms, Version=7.1.13.802, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" path="Telerik.ReportViewer.axd" verb="*" validate="true" />
        </httpHandlers>
        <httpModules>
          <add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" />
          <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" />
          <add name="RadCompression" type="Telerik.Web.UI.RadCompression" />
        </httpModules>
      </system.web>
      <!--
            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 runAllManagedModulesForAllRequests="true">
          <remove name="RadUploadModule" />
          <remove name="RadCompression" />
          <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" preCondition="integratedMode" />     
          <add name="RadCompression" type="Telerik.Web.UI.RadCompression" preCondition="integratedMode" />
          <!--<add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" />
          <add name="RadCompression" type="Telerik.Web.UI.RadCompression" />-->
        </modules>
        <handlers>
          <remove name="ChartImage_axd" />
          <remove name="Telerik_Web_UI_SpellCheckHandler_axd" />
          <remove name="Telerik_Web_UI_DialogHandler_aspx" />
          <remove name="Telerik_RadUploadProgressHandler_ashx" />
          <remove name="Telerik_Web_UI_WebResource_axd" />
          <remove name="Telerik.ReportViewer.axd_*" />
          <add name="Telerik_Web_UI_WebResource_axd" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" preCondition="integratedMode" />
          <add name="ChartImage_axd" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" preCondition="integratedMode" />
          <add name="Telerik_Web_UI_SpellCheckHandler_axd" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" preCondition="integratedMode" />
          <add name="Telerik_Web_UI_DialogHandler_aspx" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" preCondition="integratedMode" />
          <add name="Telerik_RadUploadProgressHandler_ashx" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" preCondition="integratedMode" />
          <add name="Telerik.ReportViewer.axd_*" type="Telerik.ReportViewer.WebForms.HttpHandler, Telerik.ReportViewer.WebForms, Version=7.1.13.802, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" path="Telerik.ReportViewer.axd" verb="*" preCondition="integratedMode" />
        </handlers>   
      </system.webServer>
      <elmah>
        <errorLog type="Elmah.XmlFileErrorLog, Elmah" logPath="~/App_Data" />
        <security allowRemoteAccess="0" />
      </elmah>
      <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <dependentAssembly>
            <assemblyIdentity name="Telerik.OpenAccess.Web"
              publicKeyToken="7ce17eeaf1d59342"
              culture="neutral"/>
            <bindingRedirect oldVersion="2008.0.0.0-2013.2.702.1"
                             newVersion="2013.2.702.1"/>
          </dependentAssembly>
        </assemblyBinding>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <dependentAssembly>
            <assemblyIdentity name="Telerik.OpenAccess.Runtime"
              publicKeyToken="7ce17eeaf1d59342"
              culture="neutral"/>
            <bindingRedirect oldVersion="2008.0.0.0-2013.2.702.1"
                             newVersion="2013.2.702.1"/>
          </dependentAssembly>
        </assemblyBinding>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <dependentAssembly>
            <assemblyIdentity name="Telerik.OpenAccess.35.Extensions"
              publicKeyToken="7ce17eeaf1d59342"
              culture="neutral"/>
            <bindingRedirect oldVersion="2008.0.0.0-2013.2.702.1"
                             newVersion="2013.2.702.1"/>
          </dependentAssembly>
        </assemblyBinding>
      </runtime>
    </configuration>

    Hopefully it's just something that I overlooked and an easy fix.... but I'm out of ideas.... so any help would be much appreciated!

    Thanks,

    Dustin
  2. Dyanko
    Admin
    Dyanko avatar
    122 posts

    Posted 15 Aug 2013 Link to this post

    Hi Dustin,

    Thank you for writing us.

    I am sorry to hear you are experiencing such issues.

    You need to use the Upgrade References wizard to upgrade all OpenAccess assembly references in your project with the latest installed.

    If you are referencing the OpenAccess assemblies from a specific folder the cause for the issue could be either not all of the updated assemblies are copied in this folder or the project is still referencing a different version of the OpenAccess bits. You could find this article helpful, it shows to use OpenAccess ORM without installing it.

    In case the issue still occurs you can check this topic on general troubleshooting in order to check if your case is there: LINK

    As to check if the error is changed we suggest to set the following tagPrefix in your webconfig file:
    <add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI" /> 

    Please let me know how it is going.

    Regards,
    Dyanko
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top