zoukankan      html  css  js  c++  java
  • [WebService]请求因 HTTP 状态 404 失败: Not Found。

                  解决方法

                    System.IO.Stream fs;
                    localhost.Upload1 Upload = new localhost.Upload1();//调用webservices
                    Upload.Url = "http://192.168.0.195/WebService/Upload.asmx";
                    Upload.PreAuthenticate = true;

                    Upload.Credentials = System.Net.CredentialCache.DefaultCredentials;//这两句在NET 1.1或2.0下同样有效

                    Upload.UseDefaultCredentials = true;//NET 2.0使用
                   


                    //fs = (System.IO.Stream)oFiles[0].InputStream;
                    //fs.Read(b, 0, oFiles[0].ContentLength);//将输入流读入二进制数组中
                    Response.Write(Upload.UploadFile(getByte(FileUpload1), fileName,FileUpload1.PostedFile.ContentLength));

  • 相关阅读:
    触发器
    自定义变量
    系统变量
    Interval 计时器
    Ajax 之 DWR
    cssTest
    Ajax之XMLHttpRequst对象
    添加页面元素
    jquery 基础
    jQuery 自定义动画效果
  • 原文地址:https://www.cnblogs.com/feihong84/p/1619240.html
Copyright © 2011-2022 走看看