Hi Team,
I have created a SSIS package which is posting data into a webservice. But Its getting failed for time our error:
Please find the error message below.
Error: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Net.WebException: The operation has timed out
at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)
at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at ST_723a17c65ef446c98de755bac0b82731.csproj.EC_EmissionImport.EC_EmissionImport.doEmissionsImportLocalTime(emissionLocalTime[] doEmissionsImportLocalTime1)
at ST_723a17c65ef446c98de755bac0b82731.csproj.ScriptMain.Main()
Could you please let me know how to eradicate the above error for the following code.
public void Main()
{
consumptionParameter CP = new consumptionParameter();
List<consumptionLocalTime> L2 = new List<consumptionLocalTime>();
consumptionLocalTime CLT = null;
OleDbDataAdapter oledb = new OleDbDataAdapter();
DataTable dt = new DataTable();
oledb.Fill(dt, Dts.Variables["User::Var_RecordSet_Hourly_Consumption"].Value);
if (dt.Rows.Count > 0)
{
foreach (DataRow dr in dt.Rows)
{
CLT = new consumptionLocalTime();
CLT.pAmount = System.Convert.ToDouble(dr["pAmount"]);
CLT.pAmountUnit = System.Convert.ToString(dr["pAmountUnit"].ToString());
CLT.pSystemId = System.Convert.ToString(dr["pSystemId"].ToString());
CLT.pSystemTagId = System.Convert.ToString(dr["pSystemTagId"].ToString());
CLT.pEndDateString = System.Convert.ToDateTime(dr["pEndDateString"].ToString()).ToString("yyyy-MM-dd");
CLT.pEndTimeString = System.Convert.ToString(dr["pEndTimeString"].ToString());
CLT.pStartDateString = System.Convert.ToDateTime(dr["pStartDateString"].ToString()).ToString("yyyy-MM-dd");
CLT.pStartTimeString = System.Convert.ToString(dr["pStartTimeString"].ToString());
L2.Add(CLT);
}
EC_ConsumptionImport.EC_ConsumptionImport CIS = new EC_ConsumptionImport.EC_ConsumptionImport();
CIS.Credentials = new System.Net.NetworkCredential("shell", "newuser@1", "");
int[] wsResponceArray = CIS.doConsumptionsImportLocalTime(L2.ToArray());
Thanks,
Partha