[CLOSED] Ext is undefined & re-built Ext.Net

Page 1 of 6 123 ... LastLast
  1. #1

    [CLOSED] Ext is undefined & re-built Ext.Net

    Hello,

    for our project, we need to use Ext.Net 1.x and Ext.Net 2.x in reference because we made our web application in 1.x a few years ago and now we want to slowly migrate to 2.x.

    So, initially, we want to use both version because it will be very expensive (in time) to migrate everything.
    To use both, we need to change the Ext.Net.dll of one version.
    To do this, we get the source code of 2.x.
    We built a sample project which works with Ext.Net 2.x.
    Now we try to rename it.

    To test, we changed this :
    - the default namespace in the 2.x sourcecode
    - the namespace of every files
    - every webResource in AssemblyInfo.cs
    - the Web.config of our sample project.

    The compilation of Ext.Net2 (the new name) do not throw any errors.
    But when we try to generate the project, we have this error :

    "Ext" is undefined on :
        <script type="text/javascript">
        //<![CDATA[
            Ext.net.ResourceMgr.init({id:"ResourceManager1",aspForm:"form1",theme:"gray",appName:"Test_Tableau_Bord",icons:[{name:"Information",url:"/Test_Tableau_Bord/WebResource.axd?d=rCuciMpIuTMe2gBP1iGvW5lpteGWUDwa8Ql8CS7SyeoC4fy3ZTywkLvQ8NOHCfEHf0PA6z3JwzZr8dXyVP3zUCdcJpGL28VsURpwIrCGCTzyqdBCkx5euVK1_-h2udmuNTZNjUNi2HjC1A96Fv1MzQ2&amp;t=635494012503630000"},{name:"Table",url:"/Test_Tableau_Bord/WebResource.axd?d=KVYltv9pZmJ7b4F_byExMIPN0pMa26GP5rSarHBXfBAaQYyK9UAOjHCP_aYxQcIfHeP2aKQIfu5iulpgPBBW0lkT8aZNgYrV_iyWvMn7sLa38GTZu2U-Y69N7WGWwZZWbnx23u4 [...I cut this]
        //]]>
        </scrip
    With firebug, I have these errors :

    "NetworkError: 404 Not Found - http://localhost/Test_Tableau_Bord/WebResource.axd?d=zZ7PktA2Vr2DX3-zLhBeBZU64nd-OMC5pX-l3YgYfNFe_6eQMSFHd35SLojPe8t8b2vQK1Chx35dK4uNZb0-MQsG1F-yHdesgTb-98pnoIA7Ds9SX_q9GaLz1GJUx8RTxFQDjPP-wWff7CzcLLV8ceBoUewQyFhwUqfHfS5w5tDkevyI4xc7fBStE4OUr0OHdkRE6QDmJT9YDBC1kfjZNA2&t=635494012503630000"
    WebReso...3630000
    
    "NetworkError: 404 Not Found - http://localhost/Test_Tableau_Bord/WebResource.axd?d=s80zOnwElwT3FdcBgTt9On-CLWoHwImgPDI9e2hBRCj3rL7uXu7jB86QXVQEdKgrWXhrRhVs-yRMUfnVPnd2d9lRiAwO8ROleXYOfJU8U-viBxb_iL1aY42MWbZZzZG2L3sfonUYh7qZr7q_azFrdaMWqjJOARFCk61Im_OMN9V0F_Vbk76ULpc0Vsvxh77-0&t=635494012503630000"
    WebReso...3630000
    
    "NetworkError: 404 Not Found - http://localhost/Test_Tableau_Bord/WebResource.axd?d=CfsPshHlsfpEZwv3c2RXxcs1g355TF50N0cis9m4hfuvwF2VzuTVSA71RlgXEmSTaWdW5616xVHUoHYCokWda4uesMg7zNSjZU-yWnjBkx-9QIiqj_VcRodxZAw21buhbLk__Td5r1U3H6gonkChg6pjO5TnMawr3me0BOfC2GiUo_EqTI8XNykjZk25figt0&t=635494012503630000"
    WebReso...3630000
    
    "NetworkError: 404 Not Found - http://localhost/Test_Tableau_Bord/WebResource.axd?d=ylozb5tQudCk5r37PMpw4VZ7bGN9x7XM83H7TJD2EKCSJV4E2lMZ98WeUdxDnOvPej2dEerV_x_HE1dICq5JtpmJt7g3Yzd66wYzDTQ5u8bW5fggUlsCdspTe19iqAucLqpshfz3lvF8-tvWLp6vLg2&t=635494012503630000"
    WebReso...3630000
    
    "NetworkError: 404 Not Found - http://localhost/Test_Tableau_Bord/WebResource.axd?d=4NA1P-P2nWHZ1NdjZn0S2pyAaqKTjS-EGu1J4PRRmjMyBLACBcdkEDBJnFJdU3wOWFfHitYPQ-ozvAP6RU-rTHZXVxwVkqz-eHokpK5ILN2AwUe3olHzzTqh-OP-3ev5lFiNmD5w8Awq_Ec4tP3oRw2&t=635494012503630000"
    WebReso...3630000
    
    "NetworkError: 404 Not Found - http://localhost/Test_Tableau_Bord/WebResource.axd?d=ahos8t34Iw02W4yXwK7OzVAfVa3I5l7RJUYO29xb4ZLFazeY8dwtD68co8UqzgKq1FRn5n3Mhk2D0kTcBQhdzD5la787opcpBWD_bF43Symwi9A-gKxCQTNR549RplDgF40GHmeMFilVx0TwkzREEAv6FH6RLOBXqV0cSV0jwIQ1&t=635494012503630000"
    WebReso...3630000
    
    "NetworkError: 404 Not Found - http://localhost/Test_Tableau_Bord/WebResource.axd?d=4NA1P-P2nWHZ1NdjZn0S2pyAaqKTjS-EGu1J4PRRmjMyBLACBcdkEDBJnFJdU3wOWFfHitYPQ-ozvAP6RU-rTHZXVxwVkqz-eHokpK5ILN2AwUe3olHzzTqh-OP-3ev5lFiNmD5w8Awq_Ec4tP3oRw2&t=635494012503630000"
    WebReso...3630000
    
    "NetworkError: 404 Not Found - http://localhost/Test_Tableau_Bord/WebResource.axd?d=ahos8t34Iw02W4yXwK7OzVAfVa3I5l7RJUYO29xb4ZLFazeY8dwtD68co8UqzgKq1FRn5n3Mhk2D0kTcBQhdzD5la787opcpBWD_bF43Symwi9A-gKxCQTNR549RplDgF40GHmeMFilVx0TwkzREEAv6FH6RLOBXqV0cSV0jwIQ1&t=635494012503630000"
    WebReso...3630000
    
    ReferenceError: Ext is not defined
    Ext.net.ResourceMgr.init({id:"ResourceManager1",aspForm:"form1",theme:"gray",app...
    Do you have any idea?
    Last edited by Daniil; Jan 06, 2015 at 4:25 PM. Reason: [CLOSED]
  2. #2
    Hi @slavina,

    Welcome to the Ext.NET forums!

    Somebody have got working what you want, please investigate.
    http://forums.ext.net/showthread.php?26299
  3. #3
    I read this topic but the web.config is missing for this example and I don't understand how to solve this point "You'll also need to change namespaces in Ext.Net.Utilities & NewtonSoft"
    Should I ask here or in the other topic?
  4. #4
    I read this topic
    Reading is OK, but have you tried this instruction?
    http://forums.ext.net/showthread.php...l=1#post117319

    but the web.config is missing
    Yes, there is no a full Web.config, but, seems, @betamax has highlighted the essential parts.

    I don't understand how to solve this point "You'll also need to change namespaces in Ext.Net.Utilities & NewtonSoft"
    I am not sure as well. Though, when you can start to convert and some compile error will occur at some point regarding Ext.Net.Utilities or Newtonsoft, you will understand.

    I would add that using two different versions of Ext.NET in the same project is not officially supported and what you are doing is at your own risk. Also we don't have a ready solution for you? unfortunately. All that we can do on this topic is to push you to the right direction and/or help with some specific issues, but not with the whole task from scratch.
  5. #5
    Yes, I have done this :

    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

    But I dont understand these points :

    Replace X-Ext.Net with X-Ext.v1Net in .JS files
    You'll also need to change namespaces in Ext.Net.Utilities & NewtonSoft

    The compilation of Ext.Net is ok but we still have the error "Ext is undefined".

    this is my webconfig

    <?xml version="1.0" encoding="utf-8"?>
    
    <configuration>
      <configSections>
        <section name="extnetv2" type="Ext.v2Net.GlobalConfig" requirePermission="false" />
      </configSections>
    
      <extnetv2 theme="Gray" />
      
        <system.web>
            <compilation debug="true" targetFramework="4.0" />
          <httpHandlers>
            <add path="*/ext.axd" verb="*" type="Ext.v2Net.ResourceHandler" validate="false" />
          </httpHandlers>
          <httpModules>
            <add name="DirectRequestModule" type="Ext.v2Net.DirectRequestModule, Ext.v2Net" />
          </httpModules>
    
          <pages>
            <controls>
              <add assembly="Ext.v2Net" namespace="Ext.v2Net" tagPrefix="ext" />
            </controls>
          </pages>
        </system.web>
    
      <system.webServer>
        <validation validateIntegratedModeConfiguration="false" />
    
        <modules>
          <add name="DirectRequestModule" preCondition="managedHandler" type="Ext.v2Net.DirectRequestModule, Ext.v2Net" />
        </modules>
    
        <handlers>
          <add name="DirectRequestHandler" verb="*" path="*/ext.axd" preCondition="integratedMode" type="Ext.v2Net.ResourceHandler" />
        </handlers>
    
        <defaultDocument>
          <files>
            <clear />
            <add value="default.aspx" />
            <add value="Default.htm" />
            <add value="Default.asp" />
            <add value="index.htm" />
            <add value="index.html" />
            <add value="iisstart.htm" />
            <add value="DashBoard.aspx"/>
          </files>
        </defaultDocument>
    
      </system.webServer>
    
      <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <dependentAssembly>
            <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" />
            <bindingRedirect oldVersion="1.0.0.0-6.0.1" newVersion="6.0.2" />
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="Ext.Net.Utilities" publicKeyToken="2c34ac34702a3c23" />
            <bindingRedirect oldVersion="0.0.0.0-2.3.0" newVersion="2.4.0" />
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="Transformer.NET" publicKeyToken="e274d618e7c603a7" />
            <bindingRedirect oldVersion="0.0.0.0-2.1.0" newVersion="2.1.1" />
          </dependentAssembly>
        </assemblyBinding>
      </runtime>
    
    </configuration>
  6. #6
    Yes, it all might be quite a challenge task.

    Replace X-Ext.Net with X-Ext.v1Net in .JS files
    The Ext.NET JavaScript files you can find inside the Ext.Net\Build\Ext.Net\extnet folder.

    You'll also need to change namespaces in Ext.Net.Utilities & NewtonSoft
    I am also unsure about that item still. Though, if the project build without any compilation errors, I would forget about that for now.

    More important at this point is to resolve the "Ext is undefined" error.

    It happens because of "Not Found" errors that you've talked about in the original post.

    So, there are WebResource.axd links... It needs to determine why they are not "ext.axd" links.

    Most of resource links are constructed inside the GetWebResourceUrl method of ResourceManager. See the Ext.Net\Core\ResourceManager\ResourceManager.cs file.

    This files checks
    ResourceHandler.HasHandler()
    I guess there is something within the HasHandler method that you should change.
  7. #7
    So, I changed every Ext.Net in resourceManager and the error disappear.
    After that, I changed every "url("<%=WebResource([...])%>")" in css of ext-theme with the new path.

    Now it's almost good. Just the default theme configured in the web.config does not work. It's still "classic".
    I tried directmethod, directevent, js function... no problem!
  8. #8
    Please review the Ext.Net\Configuration\GlobalConfig.cs file. There is
    private static GlobalConfig settings = ConfigurationManager.GetSection("extnet") as GlobalConfig;
    I guess you should replace "extnet" with "extnetv2".
  9. #9
    Everything looks good. I will make an other try with Ext.Net v1.x.
    If I have any problems, I will post here!
  10. #10
    I tried with Ext.Net 1.x and I have an other error on :

    this.StoreLanguage=new Ext.ux.data.PagingStore({proxyId:" [...]
    Ext.ux.data is undefined
    I only have :

    Ext.ux.plugins
    Ext.ux.layout
    Ext.ux.FieldLabeler
    With Firebug :

    "NetworkError: 404 Not Found - http://localhost/*******/WebResource.axd?d=BQ_qNswYDEBNq0xgd5atcau920jOAjI1ZTIkUE84Zm8E9qx1zj-FM4OylR0ePmPG1J190O4cQVlRM_RdI7KTmwewwZnS9T38G3SiNZauxFBcADu2M0k7NYTXhoR6KKkfS7YTm5OyX4JnIFuNpHV2JGh2jzKWWsmZRz3HwTMIT801&t=635496752358720000"
    
    TypeError: Ext.ux.data is undefined
    	...",Ext.applyIf(config || {}, {}));} });this.StoreLanguage=new Ext.ux.data.PagingS...
Page 1 of 6 123 ... LastLast

Similar Threads

  1. [CLOSED] CycleButton built from store
    By cwolcott in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Nov 24, 2013, 12:52 AM
  2. [Gauge] Minimum not correct when built in code behind.
    By joris.moonen in forum 2.x Help
    Replies: 0
    Last Post: May 10, 2012, 10:08 AM
  3. Replies: 14
    Last Post: Mar 02, 2012, 9:22 AM
  4. are they in built method?
    By joydeepsen in forum 1.x Help
    Replies: 2
    Last Post: Jun 04, 2009, 4:18 AM
  5. [CLOSED] Will v0.6 be released/built under .net 2.0 framework
    By stevejebson in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Sep 09, 2008, 7:35 PM

Tags for this Thread

Posting Permissions