string ServiceIP = "http://117.79.81.82:9999/Design_Time_Addresses/FileServicesBLLContract/Service1/";

            WebResponse result = null;
            //要下载的地址
            WebRequest req = WebRequest.Create("http://www.seentaoedu.com:8080/soms4/web/ufida/scorm/getUserRightById.jsp?username=zhoujj");
            result = req.GetResponse();
            //读取到流
            Stream sr = result.GetResponseStream();
            Encoding encode = System.Text.Encoding.GetEncoding("GB2312");
            StreamReader strAddress = new StreamReader(sr, encode);
            //读取文件内容
            ServiceIP = strAddress.ReadToEnd().Trim();

  

posted on 2012-12-07 11:38  高兴happy  阅读(465)  评论(0编辑  收藏  举报