http://imgc.zol.com.cn/small_flash_channel/shoot/21ssssaq.swf
这个flash的url,我是从51flash网站找到的。但我用webclient下载却下载不下来,这个swf的文件直接在ie中访问,也是出来403错误。
可是51flash网上,为什么可以播放这个flash呢?网址如下
http://www.51flash.com/play_detail_451674.html

解决方案 »

  1.   

    补充一点,这个swf文件,用讯雷就可以下载。我自己做程序为什么就不能下载?请高手指教
      

  2.   

    下面是我做的程序      
      private void button1_Click_1(object sender, EventArgs e)
            {
                string URLAddress = "http://imgc.zol.com.cn/small_flash_channel/shoot/21ssssaq.swf";
                try
                {
                    WebRequest myre = WebRequest.Create(URLAddress);
                }
                catch (WebException exp)
                {                MessageBox.Show(exp.Message, "Error");
                }            WebClient client = new WebClient();
                client.DownloadFile(URLAddress, "c:\a.swf");
                Stream str = client.OpenRead(URLAddress); 
                byte[] mbyte = new byte[100000]; 
                int allmybyte = (int)mbyte.Length; 
                int startmbyte = 0;
                while(allmybyte>0) 
                { 
                 int m = str.Read(mbyte,startmbyte,allmybyte); 
                 if(m==0) 
                  break; 
               
                 startmbyte+=m; 
                 allmybyte-=m; 
                } 
       
                FileStream fstr = new FileStream(@"c:\a.swf",FileMode.OpenOrCreate,FileAccess.Write); 
                fstr.Write(mbyte,0,startmbyte); 
                str.Close(); 
                fstr.Close(); 
            }
      

  3.   

    再次说明。
    我的程序如果这样写的话,下载其它远程的文件是可以。但这个flash就是不可以        private void button1_Click_1(object sender, EventArgs e)
            {
                string URLAddress = "http://imgc.zol.com.cn/small_flash_channel/shoot/21ssssaq.swf";
                WebClient client = new WebClient();
                client.DownloadFile(URLAddress, @"c:\a.swf");        }
      

  4.   

    通过WebRequest.Create("http://www.51flash.com/play_detail_451674.html");下载页面文件,还有可能禁止下载
      

  5.   

    问wuyq11
    但就是奇怪,为什么用讯雷就可以下载呢?