MSXML2.ServerXMLHTTP objHTTP = new ServerXMLHTTP();
ServerIP = txtTallyPath.Text.ToString();
try
{
objHTTP.open("POST", ServerIP, false, null, null);
string strFileName = string.Empty;
strFileName = System.Configuration.ConfigurationManager.AppSettings["XMLPath"].ToString();
if (System.IO.File.Exists(strFileName))
{
System.IO.File.Delete(strFileName);
}
using (StreamWriter sw = new StreamWriter(strFileName, true))
{
sw.WriteLine(strXMLData);
}
//objHTTP.send(strFileName);
objHTTP.send(strXMLData);
}
catch (System.Runtime.InteropServices.COMException ex)
{
ErrorLogClass.PrintText(ex.ToString(), "GetTallyInvoice()");
}
strResponse = string.Empty;
strResponse = objHTTP.responseText.ToString();
I am getting error on this line,
strResponse = objHTTP.responseText.ToString();
and data is not imported into Tally. There is no error shown apart from this.
What I have tried:
I tried all the possible ways to solve this issue even i am getting help from my senior also, but he also cannot solve this. Anyone give the solution. Last 3 days i am trying to solve this.