c# - error - Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml' -


i have web service method call saveitem function following:

public static bool saveitem(string connection, dataset dset) {         bool rtnval = false;         sqlconnection  conn = new sqlconnection(connection);         conn.open();         sqltransaction tran = conn.begintransaction();         sqlcommand command = conn.createcommand();         command.connection = conn;         command.transaction = tran;         command.commandtimeout = 320;         command.commandtext = "sp_update_item";         command.commandtype = system.data.commandtype.storedprocedure;          try         {             foreach(system.data.datarow drow in dset.tables["items"].rows)             {                  command.parameters.add("@itemid", sqldbtype.int).value = drow["itemid"];                 command.parameters.add("@itemname ", sqldbtype.varchar).value = drow["itemname"];                 command.executenonquery();                  command.parameters.clear();                          }             tran.commit();             rtnvalue = true;             }         catch (exception ex)         {             tran.rollback();             rtnval = false;         }         return rtnval; } 

however, following error message:

client found response content type of 'text/html; charset=utf-8', expected 'text/xml'

this function loop through dataset , update each item 1 one, after time failed , whole transaction rollback.

any idea ?


Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -