【问题标题】:check if image exists on intranet检查图像是否存在于 Intranet 上
【发布时间】:2011-11-02 18:19:20
【问题描述】:

我正在使用这个问题的答案Test to see if an image exists in C# 来确定图像是否存在。

但是我得到一个异常错误:远程服务器返回一个错误:(401) Unauthorized。

图像在我们的共享点内网中,那么我如何测试图像是否存在?

谢谢

【问题讨论】:

  • 我记得IIS用户默认没有网络权限。
  • request.Credentials = new NetworkCredential(username, password);
  • @L.B - 有效,如果你添加它,我会标记为答案..

标签: c# .net intranet


【解决方案1】:

request.Credentials = new NetworkCredential(username, password);

【讨论】:

    猜你喜欢
    • 2011-12-17
    • 2013-09-21
    • 2010-11-24
    • 2012-06-09
    • 2021-07-02
    • 2011-03-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多