c# - Sending a string from Windows store app to a WCF -


i have got windows store app, , within store app have textbox wich user types in information wich gets sent wcf service.

now here problem. when user types in 1-50 characters , decides send information works fine. but.. when user types in more 50 characters app unable send information.

i have tried change/add maxarraylength, maxstringcontentlength, maxbufferpoolsize , maxbuffersize within app.config file. higher value had before no success.

so question is: able send more 50 characters or there limit? , if possible send more 50 characters.. how can that?

----------------------edit--------------------

this how send info wcf

            var server = new employeeassisterclient();              var timereportlist = _timereport.getall();              foreach (var timereport in timereportlist)             {                 if (!result)                     break;                  result = server.registertimeasync(new employeeassisterwcf.timereport                     {                         customerid = timereport.customerid,                         date = timereport.date,                         invoicetext = timereport.invoicetext,                         timeinvoiced = (int) timereport.invoicedtime,                         timeworked = (int) timereport.workedtime,                         userid = timereport.userid,                     }).result;             } 

the registertime method in wcf

public boolean registertime(timereport timereport)      {                     var connection = new sqlconnection(_connectionstring);         var cmd = new sqlcommand("insert timereport values (@employeeid, @customernumber, @invoicedtime, @workedtime, @date, @invoicetext, @invoiced)", connection);          cmd.parameters.add(new sqlparameter("@employeeid", timereport.userid));         cmd.parameters.add(new sqlparameter("@customernumber", timereport.customerid));         cmd.parameters.add(new sqlparameter("@invoicedtime", timereport.timeinvoiced));         cmd.parameters.add(new sqlparameter("@workedtime", timereport.timeworked));         cmd.parameters.add(new sqlparameter("@date", timereport.date));         cmd.parameters.add(new sqlparameter("@invoicetext", timereport.invoicetext));         cmd.parameters.add(new sqlparameter("@invoiced", false));          try         {             cmd.connection.open();             cmd.executenonquery();         }         catch (sqlexception)         {             cmd.connection.close();             return false;         }                 {             cmd.connection.close();         }         return true;     } 

and bindings

<bindings>   <nethttpbinding>     <binding name="nethttpbindingconfig" maxreceivedmessagesize="2097152"                  maxbuffersize="2097152"                   maxbufferpoolsize="2097152">        <security mode="transportcredentialonly">         <transport clientcredentialtype="windows" />         <message clientcredentialtype="username" />       </security>     </binding>   </nethttpbinding> </bindings> 

regards niklas


Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -