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));

  • 相关阅读:
    ActionBar认知
    CSS动画-多列
    CSS3动画效果
    GreenDao数据库框架
    Handler介绍
    AsyncTask介绍
    Android中IntentService的原理及使用
    English interview!
    第六章 结构
    结构体中定义函数指针
  • 原文地址:https://www.cnblogs.com/feihong84/p/1619240.html
Copyright © 2011-2022 走看看