[CLOSED] AjaxStoreResult Problem Migrating from v1.3 to v1.7

  1. #1

    [CLOSED] AjaxStoreResult Problem Migrating from v1.3 to v1.7

    Hi,

    I'm trying to migrate my Ext.NET v1.3 MVC application to v1.7 via NuGET.
    As I see, Ext.NET.MVC is not included in package, so I download Ext.NET 1 from branch and build Ext.NET.MVC dll

    Well, my problem is that in a grid store with httpproxy call, it generates and error and doesn't load grid data.
    This is an example

    CONTROLLER
    public AjaxStoreResult List()
            {
                List<MyClass> hor = new List<MyClass>();
                for (int i = 0; i < 10; i++)
                {
                    hor.Add(new TModel { CI = i, Id= "Identificador", Nombre = "Nombre" });
                }
    
                return new AjaxStoreResult(hor, hor.Count);
            }
    ASPX
    <ext:GridPanel ID="grid1" runat="server" Header="false" Border="false"
                    TrackMouseOver="true" StripeRows="true">
                    <Store>
                        <ext:Store runat="server" RemoteSort="true" ShowWarningOnFailure="false">
                            <Proxy>
                                <ext:HttpProxy Url='<%# this.Page.GetRouteUrl("MyArea", new { controller="MyController", action="List" }) %>'
                                    Method="GET" AutoDataBind="true" />
                            </Proxy>
                            <Reader>
                                <ext:JsonReader IDProperty="CI" Root="data" TotalProperty="total">
                                    <Fields>
                                        <ext:RecordField Name="Id" SortDir="ASC" />
                                        <ext:RecordField Name="Nombre" />
                                    </Fields>
                                </ext:JsonReader>
                            </Reader>
                            <Listeners>
                                <LoadException Handler="alert('error');" />
                            </Listeners>
                        </ext:Store>
                    </Store>
                    <ColumnModel runat="server">
                        <Columns>
                            <ext:Column ColumnID="CI" DataIndex="CI" Header="CI"
                                Hidden="true" Hideable="false" />
                            <ext:Column ColumnID="Id" DataIndex="Id" Header="Id"
                                Width="100">
                                <Renderer Handler="return Ext.util.Format.htmlEncode(value);" />
                            </ext:Column>
                            <ext:Column ColumnID="Nombre" DataIndex="Nombre" Header="Nombre"
                                Width="200">
                                <Renderer Handler="return Ext.util.Format.htmlEncode(value);" />
                            </ext:Column>
                        </Columns>
                    </ColumnModel>
                </ext:GridPanel>
    As I can see with developer tools in IE9, seems that response is "Ext.Net.MVC.AjaxStoreResult"

    In my test case I was using IE9 and Windows7 Pro 32bits
    Last edited by Daniil; Jul 16, 2013 at 4:06 AM. Reason: [CLOSED]
  2. #2
    Related with this error, all results from Ext.NET.MVC namespace returns me it className string instead of a JSON like in v1.3

    Possibly I must compile dll with any arguments or params?

    Any help would be appreciated.
    Thanks
  3. #3
    What MVC version do you use? Ext.Net.MVC for v1 is compiled with MVC2
    You have to update your application like described in the following document (section "Upgrading an ASP.NET MVC 3 Project to ASP.NET MVC 4")
    http://www.asp.net/whitepapers/mvc4-...#_Toc303253806
  4. #4
    My application has MVC v3, I must compile Ext.NET.MVC with v3?
  5. #5
    Well, just add changes to your application like described in that article (just instead MVC4 use MVC3)
    You need to add the following dependentAssembly to your web.config
    <dependentAssembly>
            <assemblyIdentity name="System.Web.Mvc" 
                 publicKeyToken="31bf3856ad364e35" />
            <bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="3.0.0.0"/>
          </dependentAssembly>
  6. #6
    This is how web.config looks when I installed Ext.NET v1.7 via NuGET
    <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <dependentAssembly>
            <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
            <bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
            <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" />
            <bindingRedirect oldVersion="1.0.0.0-4.5.10" newVersion="4.5.11" />
            <assemblyIdentity name="Ext.Net.Utilities" publicKeyToken="2c34ac34702a3c23" />
            <bindingRedirect oldVersion="0.0.0.0-2.2.0" newVersion="2.2.1" />
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="Ext.Net" publicKeyToken="2e12ce3d0176cd87" culture="neutral" />
            <bindingRedirect oldVersion="0.0.0.0-1.7.0.0" newVersion="1.7.0.0" />
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="Ext.Net.Utilities" publicKeyToken="2c34ac34702a3c23" culture="neutral" />
            <bindingRedirect oldVersion="0.0.0.0-2.2.0.0" newVersion="2.2.0.0" />
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
            <bindingRedirect oldVersion="0.0.0.0-4.5.0.0" newVersion="4.5.0.0" />
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="System.Web.Routing" publicKeyToken="31bf3856ad364e35" culture="neutral" />
            <bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
          </dependentAssembly>
        </assemblyBinding>
      </runtime>
    And without touch anything, I recompile Ext.NET.MVC with ASP.NET MVC 3 NuGET package. It solves my problem

    Is there anything wrong?
  7. #7
    See first dependentAssembly section. It is wrong. Each assemblyIdentity/bindingRedirect pair must be inside separate dependentAssembly
  8. #8
    Quote Originally Posted by softmachine2011 View Post
    As I see, Ext.NET.MVC is not included in package, so I download Ext.NET 1 from branch and build Ext.NET.MVC dll
    It is also available to download here.
    http://ext.net/archives/1-7-0/Ext.NET.Pro.1.7.0.zip

Similar Threads

  1. Replies: 1
    Last Post: Aug 21, 2012, 7:37 AM
  2. AjaxStoreResult response.Message
    By threewonders in forum 1.x Help
    Replies: 1
    Last Post: May 18, 2011, 8:06 AM
  3. [CLOSED] AjaxStoreResult and ExtraParams
    By Stefanaccio in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Oct 28, 2010, 5:24 PM
  4. [CLOSED] [1.0] MVC AjaxStoreResult Question
    By Timothy in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Feb 26, 2010, 10:14 AM
  5. [CLOSED] problem migrating from 06 to 07
    By Lex in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Mar 05, 2009, 3:57 PM

Tags for this Thread

Posting Permissions