首页 新闻 会员 周边

紧急求助:我想通过windows任务计划定时调用一个c#编写的exe文件去更新网站数据,但没实现更新

0
悬赏园豆:100 [已关闭问题]

namespace TimerDay
{
    using System;
    using System.IO;
    using System.Net;

    internal class Program
    {
        private static void Main(string[] args)
        {
            WebClient client = new WebClient();
            try
            {
                client.DownloadString("http://www.xx.com/deluser.aspx?id=5");
            }
            catch
            {
            }
            finally
            {
                client.Dispose();
            }
        }
    }
}

问题补充: 经调试发现: client.DownloadString("http://www.xx.com/deluser.aspx?id=5"); 是正常的 client.DownloadString("http://localhost/deluser.aspx?id=5");抛出异常:……401 未经许可
qjjnet的主页 qjjnet | 初学一级 | 园豆:100
提问于:2010-05-17 01:31
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册