[CLOSED] Running Ext v1 and Ext v2 side by side

Page 2 of 3 FirstFirst 123 LastLast
  1. #11
    Yes, that is exactly what I am doing in my test case, but:
    Quote Originally Posted by Daniil View Post
    The Child Page cannot load the JavaScript and CSS resources. Are they loaded on your side?
    So, I just want to get it working as it does on your side.
  2. #12
    yes, both extjs libraries load and function. I have functioning pages with textareas, textfields, radiobuttons, treepanels, gridpanels and imagebuttons
    looking in firebug, heres the snip from comments in 2 seperate loaded axd files
    Ext JS Library 3.0+
    This file is part of Ext JS 4.2
  3. #13
    For some reason, it doesn't load the resources in my project.

    Could you, please, demonstrate the entire Web.config?
  4. #14
    Daniil, I've sent it to support@object.net

    also here's the things we had to do:

    • Rename Ext.Net folders to Ext.v1Net
    • Rename Assembly name to Ext.v1Net and Default namespace to Ext.v1Net in project file
    • Replace Ext.Net with Ext.v1Net in .CS files
    • Replace HttpContext.Current.Items["xx"] with HttpContext.Current.Items["v1xx"] in .CS files
    • Replace Ext.net with Ext.v1net in all files
    • Replace X-Ext.Net with X-Ext.v1Net in .JS files
    • You'll also need to change namespaces in Ext.Net.Utilities & NewtonSoft
    Last edited by betamax; Sep 13, 2013 at 6:08 PM.
  5. #15
    Thank you for the Web.config and the instruction.

    I see it is going to work.

    You made many changes. Probably, you need to apply some more changes regarding license keys.

    Probably, it is not getting read from a Web.config.

    There is the following ResourceManager's property.
    public virtual string LicenseKey
    {
        get
        {
            if (this.licenseKey != null)
            {
                return this.licenseKey;
            }
    
            if (this.DesignMode)
            {
                return "";
            }
    
            if (HttpContext.Current != null)
            {
                string token = "Ext.Net.LicenseKey";
    
                object obj = HttpContext.Current.Application[token];
    
                if (obj == null)
                {
                    obj = ResourceManager.Session(token);
                }
    
                if (obj != null && obj is string)
                {
                    return (string)obj;
                }
            }
    
            return GlobalConfig.Settings.LicenseKey;
        }
        set
        {
            this.licenseKey = value;
        }
    }
    It is from v2. It looks very similar in v1.

    You could debug it trying to understand why it is not getting read. Also you can consider a possibility to set up a license key in another way, for example, in the global Application object.
  6. #16
    Ok. That's a start. Thanks for the suggestion. We will look into this asap.
  7. #17
    You were close in saying it was not getting read from config file. This line of code defines where Ext looks for the key:

    private static GlobalConfig settings = ConfigurationManager.GetSection("extnet") as GlobalConfig;
    We changed that hard-coded string to "extnet1" and now v1 will look for extnet1 and version 2 will look for extnet in web.config.
  8. #18
    So, have the unlicensed messages disappeared?
  9. #19
    yes.

    FYI - there is also an issue where in certain scenarios the two DirectRequestModuleswill both run, as in when changing the page encoding type, and though they are identical, the ResourceManagers that are subsequently called are not. The result is a empty response context being returned.
    We have had to add code in DirectRequestModule that determines which version of ext is making the request. Then we either allow the code to run through, or return.
  10. #20
    OK, thank you for all the details. You have done the good job.

    I am not sure we are going to support it in Ext.NET. Though, we will bear it in mind.

    Anyway, this thread will help others who would like to use both v1 and v2 in the same application.
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. [CLOSED] Running ext.net 1 and 2 side by side
    By bogc in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Nov 06, 2012, 5:40 PM
  2. Replies: 3
    Last Post: Dec 26, 2011, 1:32 PM
  3. Replies: 1
    Last Post: Dec 01, 2010, 5:14 PM
  4. Replies: 4
    Last Post: Mar 19, 2010, 11:35 AM
  5. Replies: 6
    Last Post: Sep 01, 2009, 1:06 PM

Tags for this Thread

Posting Permissions