1

我有一个需要在远程服务器上调用 CGI 脚本的 Windows 桌面应用程序。

CGI 脚本如下所示

   RemoteCGIServer/Scripts/CGIScript.exe?UserName=****&GroupName=***&.......

当我运行以下代码时,出现异常

String url = "RemoteCGIServer/Scripts/CGIScript.exe?UserName=****&GroupName=***&......."
WebClient wc = new WebClient();
byte[] returnData = wc.DownloadData(creditNowURI);
sOutputXML = Encoding.ASCII.GetString(returnData);

我得到的例外是

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.

有没有办法将 UserName 和 GroupName 等添加为参数?

4

1 回答 1

0

这是 Windows win32 api 中的限制。您放置项目的目录非常深。你应该把你的项目放到其他目录,更接近根目录。

此链接可能对您有所帮助:http: //msdn.microsoft.com/en-us/library/windows/desktop/aa365247 (v=vs.85).aspx

于 2013-09-19T13:06:41.207 回答