webclient出现远程服务器返回错误: (401) 未经授权(100分)

S

SENGg

Unregistered / Unconfirmed
GUEST, unregistred user!
string fileName = "c://1.xml";
string uriString = "http://localhost/yj/receivefile/BangDaToSea.aspx";

WebClient myWebClient = new WebClient();
try
{
myWebClient.UploadFile(uriString,"POST",fileName);
}
catch(Exception err)
{
Button1.Text = err.Message;
}
出现“远程服务器返回错误: (401) 未经授权”,在网上找了一些解决方法,都不好用,请大家指点一下。。
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
I
回复
0
查看
835
import
I
顶部