"You're trying to decode an invalid JSON String: Ext.Net.MVC.StoreResult"

  1. #1

    "You're trying to decode an invalid JSON String: Ext.Net.MVC.StoreResult"

    I just updated my project to EXT.NET v2 from v1.3 on MVC 4.
    I am getting following error message when using AjaxProxy.
    You're trying to decode an invalid JSON String: Ext.Net.MVC.StoreResult
    I have no idea what I am doing wrong.

    Controller
    Imports Ext.Net.MVC
    
    Public Class DataController
        Inherits System.Web.Mvc.Controller
    
        Public Function GetProspects() As ActionResult
            Dim db As LinqPricingDataContext = New LinqPricingDataContext
            Dim query = From p In db.tbl_PROSPECTs Where p.ProspectID = 1 Select p.Prospect
            Return New StoreResult(query)
        End Function
    
    End Class
    aspx
    <form runat="server">
    
            <ext:ResourceManager runat="server" />
    
            <ext:Button ID="Button1" runat="server" Text="Reload">
                <Listeners>
                    <Click Handler="#{gpProspect}.getStore().reload();" />
                </Listeners>
            </ext:Button>
    
            <ext:GridPanel 
                ID="gpProspect" 
                runat="server">
                <Store>
                    <ext:Store runat="server">
                        <Model>
                            <ext:Model runat="server">
                                <Fields>
                                    <ext:ModelField Name="Prospect" />
                                </Fields>
                            </ext:Model>
                        </Model>
                        <Proxy>
                            <ext:AjaxProxy Url="/Data/GetProspects">
                                <Reader>
                                    <ext:JsonReader Root="data" />
                                </Reader>
                                <Listeners>
                                    <Exception Handler="alert(operation.getError());" />
                                </Listeners>
                            </ext:AjaxProxy>
                        </Proxy>
                    </ext:Store>
                </Store>
                <ColumnModel runat="server">
                    <Columns>
                        <ext:Column ColumnID="cProspect" runat="server" DataIndex="Prospect" Text="Legal Entity"></ext:Column>
                    </Columns>
                </ColumnModel>
            </ext:GridPanel>
        </form>
  2. #2
  3. #3
    Quote Originally Posted by Vladimir View Post
    I check on my root web.config. The elements exist. See below
    <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <dependentAssembly>
            <assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
            <bindingRedirect oldVersion="1.0.0.0" newVersion="2.0.0.0" />
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
            <bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
            <bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
            <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" />
            <bindingRedirect oldVersion="1.0.0.0-4.0.0.0" newVersion="4.5.7" />
            <assemblyIdentity name="Ext.Net.Utilities" publicKeyToken="2c34ac34702a3c23" />
            <bindingRedirect oldVersion="0.0.0.0-2.0.0" newVersion="2.0.1" />
          </dependentAssembly>
        </assemblyBinding>
      </runtime>
    I just want use proxy to populate the grid. Is there anything I am doing wrong here?
    Is this a MVC 4 Problem? Would it work in MVC 3?
  4. #4
    Please post response for store request (you can copy it from Fiddler)
  5. #5
    Respone is raw format:
    HTTP/1.1 200 OK
    Server: ASP.NET Development Server/10.0.0.0
    Date: Tue, 03 Jul 2012 14:57:05 GMT
    X-AspNet-Version: 4.0.30319
    X-AspNetMvc-Version: 4.0
    Cache-Control: private
    Content-Type: text/html; charset=utf-8
    Content-Length: 23
    Connection: Close
    
    Ext.Net.MVC.StoreResult
    It seems like there are no JSON data in response only the text "Ext.Net.MVC.StoreResult"
  6. #6
    I just try the same code in MVC 3 and it works.
    Does Proxy just not work on MVC 4?
  7. #7
    The single required thing for MVC4 is change for web.config (mentioned in first post)
    I see that your web.config part of assembly bindings is different then in my post, please use exactly as in my post

Similar Threads

  1. Replies: 7
    Last Post: Dec 19, 2013, 7:16 PM
  2. [CLOSED] TreePanel : "invalid property id" error
    By coleg123 in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Jul 23, 2011, 9:47 PM
  3. Replies: 1
    Last Post: Mar 13, 2011, 9:21 AM
  4. [CLOSED] IE8 combo "Invalid argument" on z-index
    By ljcorreia in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Feb 22, 2011, 10:10 AM
  5. Replies: 0
    Last Post: Oct 18, 2010, 2:48 AM

Posting Permissions