New Posts New Posts RSS Feed: Issue saving huge data
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Issue saving huge data

 Post Reply Post Reply
Author
bjmreddy View Drop Down
Newbie
Newbie


Joined: 22-Jun-2010
Posts: 3
Post Options Post Options   Quote bjmreddy Quote  Post ReplyReply Direct Link To This Post Topic: Issue saving huge data
    Posted: 22-Jun-2010 at 11:12am
Hi Gurus,
I am new to Silverlight, currently I am having issue when executing below code @ _mgr.SaveChangesAsync , it works fine when there are about 500- 1000 rows, but fails if total records to save are more than 1000 only error I get is "NOT FOUND"
 
            if (!_mgr.HasChanges())
            {
                WriteMessage("No changes to save.");
                return;
            }
            WriteMessage("Saving ...");
         
            _mgr.SaveChangesAsync(
              args =>
              {
                  if (args.IsCompleted)
                  {
                      WriteMessage("Changes saved");
                  }
                  else
                  {
                      WriteMessage(args.Error.Message);
                  }
              },
              null);
 
your help in this regard is appriciated.
 
Thanks,
 
Back to Top
ting View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 27-Mar-2009
Location: San Francisco
Posts: 427
Post Options Post Options   Quote ting Quote  Post ReplyReply Direct Link To This Post Posted: 23-Jun-2010 at 6:38pm
You are likely running into a WCF/HTTP request size or timeout limit, which you can adjust in the .NET configuration files.

On the client, you should add a ServiceReferences.ClientConfig to the Silverlight project to provide configuration info, and on the server, modify the serviceModel settings in the web.config.
 
In the Learning Resources, there is a sample ClientConfig in Deployment -> Code Snippets -> Sample Files for a Silverlight App deployment.
 
In Deployment -> Code Snippets -> Sample Configuration Files for an N-Tier Deployment there are some server-side samples.  See “Server app.config.default” for an example including timeouts (unfortunately there’s no web.config sample in this folder, but the serviceModel stuff is the same).  Make sure to set both the sendTimeout and receiveTimeout on the client and the server.

There’s also another setting in system.web for large packet sizes:

<system.web>
   <!-- HTTP RUNTIME CUSTOMIZATION
         To customize the HTTP runtime, esp. when sending large amounts of data, uncomment this element
                 and set the appropriate attributes.  See http://support.softartisans.com/kbview_825.aspx
         and http://msdn.microsoft.com/en-us/library/e1f13641.aspx
         for more information.
    <httpRuntime maxRequestLength="102400"/>
    -->
  </system.web>

I would recommend using the WCF Service Configuration Editor (available from the Tools menu in Visual Studio) to edit the ServiceModel stuff.
 
You can also look up WCF system.serviceModel on the web for additional help.

 


Edited by ting - 23-Jun-2010 at 6:39pm
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down