路径、文件名或两者都太长.名称必须小于260个字符,目录名称必须小于248个字符



错误:System.Reflection.TargetInvocationException:异常已被调用的目标抛出。--> system.net.webeexception:在WebClient请求期间发生异常。--> System.IO.PathTooLongException: 指定的路径、文件名或两者都太长。

全限定文件名必须小于260个字符,目录名必须小于248个字符。

我在;

中使用这段代码
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;
}

地点:

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_Filekeyportal_accountinfo.pl.xml

请帮帮我。

My Error is Resolved .

根本原因:我使用了错误的变量..

即;而不是这样写(URL,LocalFolder)

我写了(LocalFolder,URL)。:) . .

最新更新