CSLA Light Error :The remote server returned an error: NotFound.

CSLA Light Error :The remote server returned an error: NotFound.

Old forum URL: forums.lhotka.net/forums/t/10304.aspx


ddredstar posted on Tuesday, April 26, 2011

When update EditableList ,a error happen :The remote server returned an error: NotFound.

I have involved Compress feature and modified httpRuntime maxRequestLength big enough

<httpRuntime maxRequestLength="819200000" enable="true" executionTimeout="60" />

this error still happens.

 

when i narrow the List result and save it again, it works.

Please help me out!!!

 

 

RockfordLhotka replied on Tuesday, April 26, 2011

It is possible that your object graph is just too big.

The best thing to do if that is the case is switch to a diffgram/datagram model for this particular object graph.

The Samples\Net\cs\Csla.DiffGram sample demonstrates how to do this.

ddredstar replied on Wednesday, April 27, 2011

Thank you . I referred to the DiffGram sample but i cannot fully understand immediately.

I have alternative way to update big List when only few items changed,  define a temporary list , and add dirty item to this list, and Save this temporary list instead of Save the whole big List, how about this?

                MyObjectList myObjects= new MyObjectList ();// temporary list
                foreach (var item in MyObjects)// add dirty item to temporary list
                {
                    if (item .IsDirty == true)
                    {
                        myObjects.Add(item);
                    }
                }

                // Save the temporary list instead
                myObjects.BeginSave((s, e) => {
                    if (e.Error == null)
                    {
                       //
                    }
                    else
                        HandleException(e.Error);
                });

RockfordLhotka replied on Wednesday, April 27, 2011

That can work, as long as you merge the results of the save back into your original list without making the now-saved objects dirty.

Copyright (c) Marimer LLC