[CLOSED] Random Ext.Net.Mvc Razor Issues / NuGet Deployment

Page 1 of 2 12 LastLast
  1. #1

    [CLOSED] Random Ext.Net.Mvc Razor Issues / NuGet Deployment

    Hi, recently I complained about a random exception that can be checked in this thread: Randomly Displaying Warning Message - The web.config file for this project is missing the required AjaxRequestModule
    The exception in the Ext.Net was occurring randomly when the application was starting.
    Other case of random exception that was ocurring randomly is the below

    <Type>System.ObjectDisposedException</Type>
    <Message>Cannot write to a closed TextWriter.</Message>
    <Source>mscorlib</Source>
    <StackTrace> at System.IO.__Error.WriterClosed()
    at System.IO.StringWriter.Write(String value)
    at System.Web.HttpResponseWrapper.Write(String s)
    at Ext.Net.MVC.PartialViewResult.RenderScript(Control lerContext context, String script)
    The application uses Asp.Net MVC5 and Ext.Net.MVC / Razor pages with a lot of partial views and conditional component items that are rendered conditionally (partial views and also items are conditionals), based on business rules, something as the little sample below and the issue occurs randomly in any of these partial views without any specific pattern.

    @model MyModel
     
    @{
        Layout = "~/Views/Shared/Master.cshtml";
    }
     
    @section myBody
    {
        var X = Html.X();
     
        var xPanel = X.Panel().Border(false).Layout(LayoutType.VBox);
     
        xPanel.Items(X.Container().ID("Det1").ItemsFromAction("Det1", new { model = Model, containerId = "Det1" }));
     
        if (ViewBag.bDet2)
        {
            xPanel.Items(X.Container().ID("Det2").ItemsFromAction("Det2", new { model = Model, containerId = "Det2" }));
        }
     
        if (ViewBag.bDet3)
        {
            xPanel.Items(X.Container().ID("Det3").ItemsFromAction("Det3", new { model = Model, containerId = "Det3" }));
        }
     
        xPanel.Items(
             X.Container()
                 .Layout(LayoutType.HBox)
                 .Items(
                     X.DisplayFieldFor(s => s.FieldA).Width(200).LabelWidth(100)),
                     X.DisplayFieldFor(s => s.FieldB).Width(200).LabelWidth(100))
                 )
        );
    
        if (ViewBag.bShowFieldC)
        {
           xPanel.Items(
                X.Container()
                    .Layout(LayoutType.HBox)
                    .Items(
                        X.TextFieldFor(s => s.FieldC).Width(200).LabelWidth(100))
                    )
           );
        }
    
        xPanel.Items(
             X.Container()
                 .Layout(LayoutType.HBox)
                 .Items( items=> {
                     if (ViewBag.bShowFieldD)
                         items.Add( X.TextFieldFor(s => s.FieldD).Width(200).LabelWidth(100)) );
    
                     if (ViewBag.bShowFieldE)
                         items.Add( X.TextFieldFor(s => s.FieldE).Width(200).LabelWidth(100)) );
                 })
        );
    
    
        // dozens of others conditional partial views and conditional component items here
     
        @xPanel;
    }
    The issue is still occurring and checking your SVN log, I could see the following revision: 5724 - [FIX] Ext.Net.MVC can be unstable (raise an exception) under Razor.

    I don't know what kind of the exception was addressed by this revision by yours, but I was suspecting this could have a chance to be the case.

    The interesting thing is that even with your last updated version performed directly by NuGet, in my case the issue was not solved and so I cannot prove my suspect.

    Investigating a little more the thread http://forums.ext.net/showthread.php...ase-2-4-to-2-5 that I opened before, when I asked whether the assembly version updated by NuGet was the right version because the assembly was indicating as 2.5.0 and you answered that could be a cache issue in my side, I decided to download today again the Ext.Net.MVC directly from the URL https://www.nuget.org/api/v2/package/Ext.Net.MVC/2.5.1 and through the NuGet Package Explorer, I confirmed the exact same version (2.5.0.31282) that was being downloaded from NuGet Manager in the VS2012.

    To double check, I also downloaded the package Ext.Net directly from the URL https://www.nuget.org/api/v2/package/Ext.Net/2.5.1 and checked from the explorer and confirmed that the version is different: 2.5.1.24988.

    So, to conclude, the release version number that you deployed to Ext.Net.MVC does not have the same release version number as the Ext.Net.

    I know that their contents is different, but my doubt is that the Ext.Net.MVC package that was deployed by you would be using a older source code version than the package Ext.Net.

    Could it be the reason of the issues that I am still experiencing.

    Could you please inform if these different versions numbers of these libraries are using the same source code?

    If the source code is different, do you have any plan to deploy the right release number of the Ext.Net.MVC?

    And also, could you inform what kind of issues was solved by your revision 5724 in the SVN?

    Best regards, thanks,
    Last edited by Daniil; May 28, 2014 at 4:24 AM. Reason: [CLOSED]
  2. #2
    I will check the release numbers on all the NuGet packages today.

    And also, could you inform what kind of issues was solved by your revision 5724 in the SVN?
    Just look up the commit using Tortoise, then do a Diff on the code. That will show you exactly what code was changed.
    Geoffrey McGill
    Founder
  3. #3
    Hi Geoffrey, thanks for your response.

    Quote Originally Posted by geoffrey.mcgill View Post
    Just look up the commit using Tortoise, then do a Diff on the code. That will show you exactly what code was changed.
    Actually I already did that, but what I would like to know is the kind of scenario that it is being addressed by these modifications.

    Additionally, after your checking the deployments, could you inform if the source code of the package Ext.Net.MVC deployed was really outdated?

    Best regards,

    Jose Carlos.
    Last edited by jcarlos; May 19, 2014 at 5:31 PM.
  4. #4
    Additionally, after your checking the deployments, could you inform if the source code of the package Ext.Net.MVC deployed was really outdated?
    Only the .dll's in the Ext.NET.MVC NuGet packages are out of date. The .dll's included in the .zip downloads are correct.

    For some reason the .dll's for the NuGet MVC packages didn't get copied.

    I will be fixing today.
    Geoffrey McGill
    Founder
  5. #5
    Quote Originally Posted by jcarlos View Post
    Actually I already did that, but what I would like to know is the kind of scenario that it is being addressed by these modifications.
    The scenario which caused this failure message:
    "The web.config file for this project is missing the required AjaxRequestModule."
    It could happen if many requests occurs at the same time. Maintaining an HtmlHelper reference in a different way helped.

    This exception
    Cannot write to a closed TextWriter.
    we could not reproduce. So, we need to reproduce it. If you can guide us how to reproduce, it would be a big step in solving that problem.
    Last edited by Daniil; May 20, 2014 at 5:10 AM.
  6. #6
    Hi,

    I noticed that you use Ext.Net.MVC.PartialViewResult for views which are loaded by ItemsFromAction
    Please switch to standard System.Web.Mvc.PartialViewResult class like in following sample
    http://mvc.ext.net/#/Items/Action/

    Frankly, I tried to reproduce the writer issue with System.Web.Mvc.PartialViewResult (just did not notice that you use Ext.Net class)

    Ext.Net.MVC.PartialViewResult is designed to handle ajax request to render view to response
  7. #7
    Quote Originally Posted by Vladimir View Post
    I noticed that you use Ext.Net.MVC.PartialViewResult for views which are loaded by ItemsFromAction
    Please switch to standard System.Web.Mvc.PartialViewResult class like in following sample
    http://mvc.ext.net/#/Items/Action/

    Frankly, I tried to reproduce the writer issue with System.Web.Mvc.PartialViewResult (just did not notice that you use Ext.Net class)

    Ext.Net.MVC.PartialViewResult is designed to handle ajax request to render view to response
    Ok, I changed the code as per your suggestion that is really much more easy.

    I am going to followup the logs with these changes this week and after that I will let you know the results, thank you.

    Jose Carlos.
  8. #8
    Quote Originally Posted by Daniil View Post
    we could not reproduce. So, we need to reproduce it. If you can guide us how to reproduce, it would be a big step in solving that problem.
    Ok, I am really suspecting that these two issues can be related to the fix that you already made and was not deployed in the NuGet combined to my misuse of the Ext.Net.MVC.PartialViewResult that Vladimir observed and suggested me to change.

    Now I just compiled with current source code downloaded from SVN and also applyed the changes suggested by Vladminir in the PartialViewResult.

    I am going to followup the logs with these changes this week and after that I will let you know the results, thank you.

    Jose Carlos.
  9. #9
    @jcarlos, I am marking the thread as closed, but please feel free to post your feedback anyway.
  10. #10
    Hi, just to give you a feedback about the issues that I reported and followed up in these last weeks.

    The issues was totally solved with the fixes that you made in revision 5724 and also the modifications that you suggested in my code, changing from Ext.Net.MVC.PartialViewResult to the standard System.Web.Mvc.PartialViewResult.

    Thank you very much by your support, it was really giving me a big headache and now it is running well.

    Best regards,

    Jose Carlos.
Page 1 of 2 12 LastLast

Similar Threads

  1. [CLOSED] Issues getting MultiComboFor in MVC Razor to bind
    By AmitM in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Nov 15, 2013, 10:48 PM
  2. [CLOSED] Ext.Net.MVC.Demo v1.x IIS deployment issues
    By vadym.f in forum 1.x Legacy Premium Help
    Replies: 13
    Last Post: Jun 07, 2013, 11:41 AM
  3. Using Ext.net 1.4 some random garbled
    By lionel in forum 1.x Help
    Replies: 1
    Last Post: Jul 12, 2012, 9:49 AM
  4. [CLOSED] Ext.net random id in querystring
    By speedstepmem3 in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Sep 15, 2011, 10:27 AM
  5. [CLOSED] Random Request
    By rnachman in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Jun 13, 2011, 5:35 PM

Tags for this Thread

Posting Permissions