1. #91
    Ext JS Premium Member
    Join Date
    Jul 2009
    Location
    Seattle, Washington USA
    Posts
    200
    Vote Rating
    0
    geewhizbang is on a distinguished road

      0  

    Default Possible Timeout problems

    Possible Timeout problems


    I have some requests that never return. I'm using the paging controller, on the server side the data is returned, but the clientside never finishes.

    I suspect that it is a timeout issue, because the requests that don't work are randomly distributed, but all the requests that don't work are larger in size.

    There is a way to add to the direct request timeout in 3.0.2 but I don't know where this is set. It has to be really low right now, because the requests that don't work are not very large at all, they are just bigger than the others.

  2. #92
    Ext JS Premium Member
    Join Date
    Jul 2009
    Location
    Seattle, Washington USA
    Posts
    200
    Vote Rating
    0
    geewhizbang is on a distinguished road

      0  

    Default I found out why

    I found out why


    I finally figured out why some request never return.

    They were a bit huger than I expected because the server was returning all attachments that had been uploaded along with a page content.

    I guess that is the downside of handing a complex object off to Direct() parser. Deeply nested inside one of the objects, one of these were too big.

  3. #93
    Sencha User
    Join Date
    Jan 2008
    Location
    Toronto, Canada
    Posts
    480
    Vote Rating
    4
    elishnevsky is on a distinguished road

      0  

    Default


    ** Important update. Please read. **

    Ext.Direct for ASP.NET MVC v0.6.3 is uploaded.

    In previous versions all dates were serialized using Json.NET's JavaScriptDateTimeConverter by default unless another converter is specified by a developer.

    In this version a new dateFormat configuration attribute is introduced that allows you to specify what DateTime serialization format to use by default. Supported values are "Iso" and "JavaScript" to use Json.NET's IsoDateTimeConverter or JavaScriptDateTimeConverter respectively. If this attribute is not set in your application's config file, or contains value other than supported, then all dates will be serialized using the default Json.NET's serialization format which is the same as the one used by Microsoft. "\/Date(1198908717056)\/"

    If you are upgrading from an older version you will most likely have to add the new dateFormat config attribute to your application's web.config file since the default serialization format of dates has changed in this version.

    Please refer to the first post for the updated version of Ext.Direct.Mvc.

  4. #94
    Ext User
    Join Date
    Sep 2008
    Posts
    7
    Vote Rating
    0
    kriz is on a distinguished road

      0  

    Default


    I can't download this file from the author's link,can some one send it to my email: kenkrizzard@gmail.com ?

    I'll very appreciate you help.

  5. #95
    Ext User
    Join Date
    Oct 2009
    Posts
    3
    Vote Rating
    0
    jcsarda is on a distinguished road

      0  

    Default Self referencing loop error

    Self referencing loop error


    I have a recreation of your test application working fine displaying records from your "Employees" table. I've created and tested my data context, so it should be working fine but I keep getting the following error...

    Code:
    Newtonsoft.Json.JsonSerializationException was unhandled by user code
      Message="Self referencing loop"
      Source="Newtonsoft.Json"
      StackTrace:
           at Newtonsoft.Json.Serialization.JsonSerializerWriter.CheckForCircularReference(Object value, Nullable`1 referenceLoopHandling)
           at Newtonsoft.Json.Serialization.JsonSerializerWriter.WriteMemberInfoProperty(JsonWriter writer, Object value, JsonProperty property)
           at Newtonsoft.Json.Serialization.JsonSerializerWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract)
           at Newtonsoft.Json.Serialization.JsonSerializerWriter.SerializeValue(JsonWriter writer, Object value, JsonConverter memberConverter)
           at Newtonsoft.Json.Serialization.JsonSerializerWriter.SerializeList(JsonWriter writer, IList values, JsonArrayContract contract)
           at Newtonsoft.Json.Serialization.JsonSerializerWriter.SerializeValue(JsonWriter writer, Object value, JsonConverter memberConverter)
           at Newtonsoft.Json.Serialization.JsonSerializerWriter.WriteMemberInfoProperty(JsonWriter writer, Object value, JsonProperty property)
           at Newtonsoft.Json.Serialization.JsonSerializerWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract)
           at Newtonsoft.Json.Serialization.JsonSerializerWriter.SerializeValue(JsonWriter writer, Object value, JsonConverter memberConverter)
           at Newtonsoft.Json.Serialization.JsonSerializerWriter.WriteMemberInfoProperty(JsonWriter writer, Object value, JsonProperty property)
           at Newtonsoft.Json.Serialization.JsonSerializerWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract)
           at Newtonsoft.Json.Serialization.JsonSerializerWriter.SerializeValue(JsonWriter writer, Object value, JsonConverter memberConverter)
           at Newtonsoft.Json.Serialization.JsonSerializerWriter.SerializeList(JsonWriter writer, IList values, JsonArrayContract contract)
           at Newtonsoft.Json.Serialization.JsonSerializerWriter.SerializeEnumerable(JsonWriter writer, IEnumerable values, JsonArrayContract contract)
           at Newtonsoft.Json.Serialization.JsonSerializerWriter.SerializeValue(JsonWriter writer, Object value, JsonConverter memberConverter)
           at Newtonsoft.Json.Serialization.JsonSerializerWriter.WriteMemberInfoProperty(JsonWriter writer, Object value, JsonProperty property)
           at Newtonsoft.Json.Serialization.JsonSerializerWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract)
           at Newtonsoft.Json.Serialization.JsonSerializerWriter.SerializeValue(JsonWriter writer, Object value, JsonConverter memberConverter)
           at Newtonsoft.Json.Serialization.JsonSerializerWriter.WriteMemberInfoProperty(JsonWriter writer, Object value, JsonProperty property)
           at Newtonsoft.Json.Serialization.JsonSerializerWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract)
           at Newtonsoft.Json.Serialization.JsonSerializerWriter.SerializeValue(JsonWriter writer, Object value, JsonConverter memberConverter)
           at Newtonsoft.Json.Serialization.JsonSerializerWriter.Serialize(JsonWriter jsonWriter, Object value)
           at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value)
           at Newtonsoft.Json.JsonSerializer.Serialize(JsonWriter jsonWriter, Object value)
           at Newtonsoft.Json.JsonSerializer.Serialize(TextWriter textWriter, Object value)
           at Ext.Direct.Mvc.DirectResult.ExecuteResult(ControllerContext context) in C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\iNote\Ext.Direct.Mvc\Ext.Direct.Mvc\DirectResult.cs:line 71
           at System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult)
           at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass11.<InvokeActionResultWithFilters>b__e()
           at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)
      InnerException:
    Has anybody gotten this error before? I'm sure it's something small... I'm a little new to both ASP.net MVC and Ext.js...

    Anyways, thanks ahead of time for any help you can give me.

  6. #96
    Sencha User
    Join Date
    Dec 2007
    Posts
    17
    Vote Rating
    0
    aritchie is on a distinguished road

      0  

    Default


    The JSON serializer has no concept of what it can and cannot serialize (unless specified). It looks like you may have some lazy loading objects that is causing this (child -> parent, parent -> children, etc). My suggestion is to flatten out your objects to DTO's instead of sending a raw business object. Look at something like AutoMapper to make your life easy for this.

  7. #97
    Ext User
    Join Date
    Oct 2009
    Posts
    3
    Vote Rating
    0
    jcsarda is on a distinguished road

      0  

    Default Excluding my relationships may fix the problem, how would I go about doing this?

    Excluding my relationships may fix the problem, how would I go about doing this?


    My model designer includes a bunch of extra code in my data context that would include relationship values to another table. Is there a way to exclude my one-to-many relationship (using LinqToSql) from my IQueryable object before I hand it over to result["data"]?

    Here's my controller code:

    Code:
            SchcommDataContext _db = new SchcommDataContext();
    
            public ActionResult Get(int start, int limit, string sort, string dir)
            {
    
                var schcommList = _db.Schcomms
                    .OrderBy(sort + " " + dir)
                    .Skip(start)
                    .Take(limit);
    
                var result = new
                {
                    total = _db.Schcomms.Count(),
                    data = schcommList // This value must contain information about my model associations that doesn't serialize properly
                };
    
                return Direct(result);
            }

  8. #98
    Sencha User
    Join Date
    Jan 2008
    Location
    Toronto, Canada
    Posts
    480
    Vote Rating
    4
    elishnevsky is on a distinguished road

      0  

    Default


    Ext.Direct for ASP.NET MVC v0.6.4 is uploaded. Please see the first post for download link.

    Latest changes:
    * Added: small adjustment for integration with the Ext Designer

    If you're currently using v0.6.3 you don't have to upgrade.

  9. #99
    Ext User
    Join Date
    Aug 2009
    Posts
    78
    Vote Rating
    0
    isit.gd is on a distinguished road

      0  

    Default


    Hi

    I want to be able to send down method names as properties on objects - i basically want to send an object which is the colmodel. each of the colmodel items has a renderer method in it:

    Code:
    {header: 'Name', dataIndex: 'Name', sortable: true, renderer: renderers.defaultRenderer }
    i omit the quotes to send it as an object using a JsonConverter:

    Code:
    public class JavascriptMethodConverter : JsonConverter 
        {
            public override bool CanConvert(Type objectType)
            {
                return true;
            }
    
            public override object ReadJson(JsonReader reader, Type objectType, JsonSerializer serializer)
            {
                throw new NotImplementedException();
            }
    
            public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
            {
                writer.WriteRaw((string)value);
            }
        }
    which gets added to the c# property like:

    Code:
      [JsonConverter(typeof(JavascriptMethodConverter))]
      public virtual string Renderer { get; set; }
    i keep getting an error saying it would result in invalid js whenever this is included.

    this seems like a standard use case to me - is there anything i'm doing wrong?

    cheers

    w://

  10. #100
    Ext JS Premium Member
    Join Date
    Jul 2009
    Location
    Seattle, Washington USA
    Posts
    200
    Vote Rating
    0
    geewhizbang is on a distinguished road

      0  

    Default Form returns with server error, even though everything appears to work!

    Form returns with server error, even though everything appears to work!


    ExtJS code to do post submit:
    Code:
    f.submit
    (
      {
          success: function(form, action)
          {
              debugger;
              if (action.result.Success)
              {
                  if (action.result.Tags != null)
                  {
                      var newTags = action.result.Tags;
                      for (var iTag = 0; iTag < newTags.length; iTag++)
                      {
                          var TagData = kbForum.ThreadView.Tags[params.ThreadId];
                          var newTags = action.result.Tags;
                          if (Ext.isDefined(TagData.TagIdIndex[newTagId]))
                          {
                              TagData[TagData.TagIdIndex[newTagId]] = newTags[iTag];
                          }
                          else
                          {
                              TagData.TagIdIndex[newTags[iTag].TagID] = TagData.length;
                              TagData.TagNameIndex[newTags[iTag].TagName] = TagData.length;
                              TagData.push(newTags[iTag]);
                          }
                      }
                  }
                  if (Ext.isDefined(kbForum.EditorParams.onSave)) kbForum.EditorParams.onSave(action.result);
                  kbForum.CloseEditor();
              }
          },
          failure: function(form, action)
    {
              debugger;
              //arrives here with a "server" failure result.
              //the data is actually returned correctly, everything works.
          }
      }
    );
    
    Serverside code

    Code:
    [FormHandler]
    [ValidateInput(false)]
    public ActionResult SavePost()
    {
       string Title = Request.Form["PostTitle"];
       string PostBody = Request.Form["PostBody"];
       string Tags = Request.Form["Tags"].ToLower();
       Dictionary<string, string> start = null;
       List<CommunityTagMember> UpdatedTags = null;
       int PostId = -1;
       int PageSize = Utility.FixNullInt(Request.Form["PageSize"],5);
       bool bSuccess = true;
       int ThreadId = Utility.FixNullInt(Request.Form["ThreadId"], -1);
     
       //snip – a whole bunch of code here, all of which runs just fine. It may 
       //be a lot of code, but I doubt that it is timing out.
       var result = new
       {
           Success = bSuccess,
           Tags = UpdatedTags,
           PostId = PostId,
           Start = start
       };
    // the code returns all of the way to here, but it isn't possible
       // to follow this into the Direct() function without reconfiguring 
       // the project
       return Direct(result);
    }

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar