日期:2014-05-19  浏览次数:20907 次

webClient.UploadFile抛出405异常.请问怎么解决请看代码,谢谢.
WebClient   webClient   =   new   WebClient();
sIniPath   =   sExePathIni   +   "\\NewsList.txt ";
try
{
webClient.UploadFile(@ "http://192.168.1.250/CMScreenWebService/Scenario/newslist ",@ "D:\ad\adcs\adcs\bin\Debug ");
//webClient.UploadFile(NewsList,sIniPath);
}
catch(Exception   eh)
{
string   nnnnn   =   eh.ToString();
int   uu   =   0;
}
网上说是权限问题,权限好象够,我可以直接往那个目录写文件.

------解决方案--------------------
webClient.UploadFile(@ "//192.168.1.250/CMScreenWebService/Scenario/newslist/aaa.txt ",@ "D:\ad\adcs\adcs\bin\Debug/aaa.txt ");
应该这样写.