Error: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Net.WebException: An exception occurred during a WebClient request. ---> System.IO.PathTooLongException: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
I'm using this code in ;
public void Main()
{
System.Net.WebClient myWebClient = new System.Net.WebClient();
myWebClient.DownloadFile(Dts.Variables[0].Value.ToString(),
Dts.Variable[1].Value.ToString());
Dts.TaskResult = (int)ScriptResults.Success;
}
where:
Dts.Variables[0].Value.ToString() == https://secure.f-prot.com/keyportal/cgi-bin/keyportalorder.pl?u=l&p=ooetcetcd&product_id=1&number_of_u=3&type=1&length=a&partner_id=2932&order_ref=4&account_reference_name=audney&account_reference_value=margaretculclagers%sbcglobal.net
Dts.Variables[1].Value.ToString() == C:\Audiney_API_File\keyportal_accountinfo.pl.xml
Kindly help me .