+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / can't make my site to associate with the .Net Framework 4

can't make my site to associate with the .Net Framework 4

6 posts, 0 answered
  1. Inna
    Inna avatar
    97 posts
    Registered:
    08 Jun 2012
    04 Feb 2011
    Link to this post
    Hello, my site is associated with framework 2. in order to install sp 4 for sitefinity 3.7, i need it to be associated with .net 4. i've installed the framework and tried to switch to it in Inetmgr. The site goes down when i switch with the following error:
    Error Summary

    HTTP Error 500.19 - Internal Server Error

    The requested page cannot be accessed because the related configuration data for the page is invalid.

    Detailed Error Information
    Module IIS Web Core
    Notification Unknown
    Handler Not yet determined
    Error Code 0x800700b7
    Config Error There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined
    Config File \\?\D:\Annapolis\web.config
    Requested URL http://annapolis.gov:80/
    Physical Path
    Logon Method Not yet determined
    Logon User Not yet determined
    onfig Source
        5:       <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
        6:         <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
        7:         <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
    


    Do I have to change anything in the config file?

    thanks
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    08 Feb 2011
    Link to this post
    Hello Inna,

    Try removing the following line from your web.config

    <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

    Clean the solution ( right click on the solution file and choose "Clean Solution"). If you are running the website under .NET 4.0, them you are not using the proper build for .NET 4.0 and your project has been compiled against .NET 3.5. Just to let you know that we have a separate builds for .NET 4.0, 3.5 and 2.0

    Another reason for this error is application inheritance of the web.config.

    Make sure that the application pool runs in the proper version of ASP.NET - which should be the same as this one your project uses.

    All the best,
    Ivan Dimitrov
    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
  3. Inna
    Inna avatar
    97 posts
    Registered:
    08 Jun 2012
    08 Feb 2011
    Link to this post
    Ivan,
    I need to get to version 4 of Sitefinity ASAP. I am not a developer and my knowledge of C# is very limited. Thus, I'm following all your instructions 100%, trying to get at first to make it work with SP4, as you recommended, then, finally, with your one-click upgrading tool move successfully (hopefully) to version 4.0.

    Here are the problems I ran into when upgrading to SP4. I downloaded the pack and installed it folder - by - folder (except the "bin" folder) and everything was fine - with only 1, but big, issue - I lost the custom made style that was inserted in the shape of drop-down by the company that has developed the site for us. The very same issue I had when I previously was upgrading sitefinity. I am not sure why the company (DeepBlue) that is your partner has developed the site the way that every upgrade deletes the functionality.

    So, 1st question: how do I restore it - the style in the drop - down of the visual editor?

    Second, when I copy the "bin" folder into my project, the site crashes, it displays at first this following message:

    Server Error in '/' Application.

    Runtime Error

    Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

    Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".

    <!-- Web.Config Configuration File -->
    
    <configuration>
        <system.web>
            <customErrors mode="Off"/>
        </system.web>
    </configuration>

    Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.

    <!-- Web.Config Configuration File -->
    
    <configuration>
        <system.web>
            <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
        </system.web>
    </configuration>

    Then, after I refresh the page, this one:

    Server Error in '/' Application.

    Could not load file or assembly 'Telerik.Blogs.Data' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

    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.BadImageFormatException: Could not load file or assembly 'Telerik.Blogs.Data' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

    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.Blogs.Data' 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:

    [BadImageFormatException: Could not load file or assembly 'Telerik.Blogs.Data' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.]
       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) +43
       System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +127
       System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +142
       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.Blogs.Data' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.]
       System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +613
       System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +203
       System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +105
       System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +178
       System.Web.Compilation.BuildProvidersCompiler..ctor(VirtualPath configPath, Boolean supportLocalization, String outputAssemblyName) +54
       System.Web.Compilation.CodeDirectoryCompiler.GetCodeDirectoryAssembly(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories, Boolean isDirectoryAllowed) +600
       System.Web.Compilation.BuildManager.CompileCodeDirectory(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories) +128
       System.Web.Compilation.BuildManager.CompileCodeDirectories() +265
       System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +320
    
    [HttpException (0x80004005): Could not load file or assembly 'Telerik.Blogs.Data' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.]
       System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +58
       System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +512
       System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters) +729
    
    [HttpException (0x80004005): Could not load file or assembly 'Telerik.Blogs.Data' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.]
       System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +8897503
       System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +85
       System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +259
    


    Version Information: Microsoft .NET Framework Version:2.0.50727.4206; ASP.NET Version:2.0.50727.4209


    Speaking about your advice, I removed the line in web.config file, and cleaned the solution - to no avail. Also, what do you mean by "the proper build?" The site has been build when .NET 4.0 didn't exist.

    But, the bottom line, how do I upgrade the site to SP 4 without crashing it? Your instructions say: copy the SP 4 into your web project. That is EXACTLY what I did. It didn't work. Could you, please, send instructions that will make the upgrade work?
  4. Inna
    Inna avatar
    97 posts
    Registered:
    08 Jun 2012
    08 Feb 2011
    Link to this post
    You said: "Make sure that the application pool runs in the proper version of ASP.NET - which should be the same as this one your project uses."

    A Question: how do I do it? When I go to IIS 7 manager and look in the advanced settings for the site the application pool is "Annapolis" - as it was set by the developers, the sitefinity partners.

    Then, I go in IIS manager and check what the "Annapolis" pool is set to - it shows .Net 2...... When I switch to .Net 4 (from the drop-down) and run the site in the browser, the site is down again, I get this error:

    Internet Information Services 7.0

    Error Summary

    HTTP Error 500.19 - Internal Server Error

    The requested page cannot be accessed because the related configuration data for the page is invalid.

    Detailed Error Information
    Module IIS Web Core
    Notification Unknown
    Handler Not yet determined
    Error Code 0x800700b7
    Config Error There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined
    Config File \\?\D:\Annapolis\web.config
    Requested URL http://www.annapolis.gov:80/Home.aspx
    Physical Path
    Logon Method Not yet determined
    Logon User Not yet determined
    Config Source
        5:       <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
        6:         <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
        7:         <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
    
    Links and More Information This error occurs when there is a problem reading the configuration file for the Web server or Web application. In some cases, the event logs may contain more information about what caused this error.

    View more information »


    So, how do I make my site to use .Net 4?
  5. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    09 Feb 2011
    Link to this post
    Hi Inna,

    Ok, have you tried to remove the line in the error from your web.config. Can you confirm that the website uses the dlls build for .NET 4.0 and the application pool is set to .NET 4.0

    Best wishes,
    Ivan Dimitrov
    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
  6. Inna
    Inna avatar
    97 posts
    Registered:
    08 Jun 2012
    09 Feb 2011
    Link to this post
    Ivan, as I've said in my posting above, I did remove the line that you told me to remove. How do I find out that the website uses the dlls build for .NET 4.0 and the application pool is set to .NET 4.0?
Register for webinar
6 posts, 0 answered