Error in production but not in dev.

5 posts, 0 answers
  1. Dustin
    Dustin avatar
    7 posts
    Member since:
    May 2015

    Posted 28 Oct 2015 Link to this post

    I am running into an issue when trying to bind a detail grid.

    It works fine on my dev machine, but when I publish the project and run it on the production environment, I get the attached error.

    The only difference I can think of is the size of the data that is coming across. Obviously production has a lot more data than my dev machine does. Any Ideas?

     ​

  2. Dustin
    Dustin avatar
    7 posts
    Member since:
    May 2015

    Posted 28 Oct 2015 Link to this post

    OK it has to be something to do with the amount of data.

    It would appear that if I have only a few entries for my detail grid, it works fine, but if I have a lot of entries it has the error.

    Any Ideas?

  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 29 Oct 2015 Link to this post

    Hello,

    Unfortunately from the stack trace we cannot understand what is causing the error in your case. It will be best if you could isolate the behavior in a runnable example which we can debug locally in order to assist you further.
     
    Regards,
    Pavlina
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  5. Dustin
    Dustin avatar
    7 posts
    Member since:
    May 2015

    Posted 29 Oct 2015 Link to this post

    OK I have figured out what the issue was.

    I had a ViewModel that had another model in it that was coming back as null. I put an inline if to check for null to fix the issue.

    Hope this can help anyone running into the same issue:

     

    Location = usr.Location.HasValue ? usr.Location.Value : default(int),
    Loc = usr.Location.HasValue ? new LocationViewModel()
    {
       ID = usr.Locations.ID,
       Name = usr.Locations.Name,
       Enabled = usr.Locations.Enabled
    } : new LocationViewModel(),

  6. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 02 Nov 2015 Link to this post

    Hello,

    Thank you for sharing your findings with the community.

    Regards,
    Pavlina
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
UI for ASP.NET MVC is VS 2017 Ready