Step 1)Open Tally application Check whether tally port is working or not on
http://localhost:9000
You can also change it.
Step 2) Follow Below code for reference and replace your Value my value(objdata).
String lResponseStr = "";
String xmlstc = "";
xmlstc = "<ENVELOPE>\r\n";
xmlstc = xmlstc + "<HEADER>\r\n";
xmlstc = xmlstc + "<TALLYREQUEST>Import Data</TALLYREQUEST>\r\n";
xmlstc = xmlstc + "</HEADER>\r\n";
xmlstc = xmlstc + "<BODY>\r\n";
xmlstc = xmlstc + "<IMPORTDATA>\r\n";
xmlstc = xmlstc + "<REQUESTDESC>\r\n";
xmlstc = xmlstc + "<REPORTNAME>All Masters</REPORTNAME>\r\n";
xmlstc = xmlstc + "<STATICVARIABLES><SVCURRENTCOMPANY>Pratik </SVCURRENTCOMPANY></STATICVARIABLES>\r\n";
xmlstc = xmlstc + "</REQUESTDESC>\r\n";
xmlstc = xmlstc + "<REQUESTDATA>\r\n";
xmlstc = xmlstc + "<TALLYMESSAGE xmlns:UDF=" + "\"" + "TallyUDF" + "\">\r\n";
xmlstc = xmlstc + "<LEDGER NAME=" + "\"" + objData.Rows[i]["title"] + objData.Rows[i]["partyname"] + "\" Action =" + "\"" + "Create" + "\">\r\n";
xmlstc = xmlstc + "<NAME>" + objData.Rows[i]["title"] + objData.Rows[i]["partyname"] + "</NAME>\r\n";
xmlstc = xmlstc + "<PARENT>Sundry Debtors</PARENT>\r\n";
xmlstc = xmlstc + "<ADDRESS.LIST><ADDRESS>" + objData.Rows[i]["vinstaddress"] + ",City :" + objData.Rows[i]["city"] + ",Route :" + objData.Rows[i]["route"] + "</ADDRESS></ADDRESS.LIST>\r\n";
xmlstc = xmlstc + "<EMAIL>" + objData.Rows[i]["vinstemail"] + "</EMAIL>\r\n";
xmlstc = xmlstc + "<LEDGERMOBILE>" + objData.Rows[i]["vinsttel1"] + "</LEDGERMOBILE>\r\n";
xmlstc = xmlstc + "<LEDGERPHONE>" + objData.Rows[i]["vbilltel1"] + "</LEDGERPHONE>\r\n";
xmlstc = xmlstc + "<PINCODE>" + objData.Rows[i]["vinstpostalcode"] + "</PINCODE>\r\n";
xmlstc = xmlstc + "<WEBSITE>" + objData.Rows[i]["vwebsite"] + "</WEBSITE>\r\n";
xmlstc = xmlstc + "<LEDGERFAX>" + objData.Rows[i]["vinstfax"] + "</LEDGERFAX>\r\n";
xmlstc = xmlstc + "<LEDGERCONTACT>" + objData.Rows[i]["contactperson"] + "</LEDGERCONTACT>\r\n";
xmlstc = xmlstc + "<COUNTRYNAME>India</COUNTRYNAME>\r\n";
xmlstc = xmlstc + "</LEDGER>\r\n";
xmlstc = xmlstc + "</TALLYMESSAGE>\r\n";
xmlstc = xmlstc + "</REQUESTDATA>\r\n";
xmlstc = xmlstc + "</IMPORTDATA>\r\n";
xmlstc = xmlstc + "</BODY>";
xmlstc = xmlstc + "</ENVELOPE>";
try
{
String lTallyLocalHost = "http://localhost:9000";
HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(lTallyLocalHost);
httpWebRequest.Method = "POST";
httpWebRequest.ContentLength = (long)xmlstc.Length;
httpWebRequest.ContentType = "application/x-www-form-urlencoded";
StreamWriter lStrmWritr = new StreamWriter(httpWebRequest.GetRequestStream());
lStrmWritr.Write(xmlstc);
lStrmWritr.Close();
HttpWebResponse lhttpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
Stream lreceiveStream = lhttpResponse.GetResponseStream();
StreamReader lStreamReader = new StreamReader(lreceiveStream, Encoding.UTF8);
lResponseStr = lStreamReader.ReadToEnd();
lhttpResponse.Close();
lStreamReader.Close();
}