明天的明天 永远的永远 未知的一切 我与你一起承担 ??

是非成败转头空 青山依旧在 几度夕阳红 。。。
  博客园  :: 首页  :: 管理

随笔分类 -  Xmlhttp Or HttpWebRequest

摘要://调用接口var para = new Dictionary<string, string>(); para.Add("UserId", "33699"); para.Add("pwd", "123456"); string postResult = Post("http://", para); 阅读全文

posted @ 2019-07-16 10:11 且行且思 阅读(4552) 评论(0) 推荐(0) 编辑

摘要:/// /// 文件上传至远程服务器 /// /// 远程服务地址 /// 上传文件 /// POST参数 /// cookie /// 远程服务器响应字符串 public static void HttpPostFile(string url, ... 阅读全文

posted @ 2018-10-18 22:34 且行且思 阅读(1723) 评论(1) 推荐(0) 编辑

摘要:在WebBrowser下对网页进行操作其实是一件挺轻松的事情,他可以很方便实现自定义的网站访问习惯。而WebBrowser毕竟是对MS原生 控件的封装,当我们使用C#下的WebBrowser尤其是这样,虽然他可以更方便大家去调用,但是他的方便却是牺牲了灵活性为代价的。 有一天我想使用WebBrows... 阅读全文

posted @ 2015-05-27 17:10 且行且思 阅读(3192) 评论(1) 推荐(0) 编辑

摘要:项目分成两个 web(ASP.Net)用户处理请求,客户端(wpf/winform)发送请求1.web项目有两个页面SendPost.aspx(单纯发送数据给客户端)代码:public partial class SendPost : System.Web.UI.Page{protected void Page_Load(object sender, EventArgs e){if (Request.RequestType == "POST"){ //声明一个XMLDoc文档对象,LOAD()xml字符串 XmlDocument doc = new XmlDocument( 阅读全文

posted @ 2014-01-22 10:39 且行且思 阅读(14625) 评论(0) 推荐(1) 编辑

摘要:JsonView是查看和分析json的利器,目录下的Newtonsoft.Json.dll ,我们可以当第三方引用之。>>> //想服务器端发送请求,获取订单信息 myRequest = System.Net.WebRequest.Create(url) as System.Net.HttpWebRequest; //--------------------- c#中HttpWebRequest使用Proxy实现指定IP的域名请求 ------------------------------... 阅读全文

posted @ 2013-11-25 11:30 且行且思 阅读(7826) 评论(0) 推荐(0) 编辑

摘要://配置多个IP命名using System.Net;//*************************************************************************** /// /// 通过设置这个属性,可以在发出连接的时候绑定客户端发出连接所使用的IP地址。 /// /// /// /// /// public static IPEndPoint BindIPEndPointCallback(ServicePoint servicePoint... 阅读全文

posted @ 2013-11-25 11:16 且行且思 阅读(7777) 评论(0) 推荐(1) 编辑

摘要:using System;using System.Data;using System.Configuration;using System.Net;using System.IO;using System.Text;using System.Collections.Generic;using System.Text.RegularExpressions;using System.Threading;using System.Web;using System.Web.UI.MobileControls; /// <summary> /// 网页类 /// </summary& 阅读全文

posted @ 2012-02-28 09:43 且行且思 阅读(3732) 评论(4) 推荐(0) 编辑

摘要:排除浏览器等其他因素,只考虑程序的问题,基本上是因为没在 HttpWebRequest.GetResponse 之前先对 request 的 CookieContainer 实例化简单代码如下:HttpWebRequestmyRequest=(HttpWebRequest)WebRequest.Create(Url);myRequest.CookieContainer=newCookieConta... 阅读全文

posted @ 2010-10-13 15:37 且行且思 阅读(16393) 评论(2) 推荐(2) 编辑

摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--using System.IO;using System.Text;using System.Text.RegularExpressions;using System.Net; 1.先取得网页的原代码Co... 阅读全文

posted @ 2010-10-12 16:25 且行且思 阅读(2460) 评论(1) 推荐(0) 编辑

摘要:开心网辅助工具,可以自动进行操作。准备工具:WSockExpert(用于抓包) 原理:分析出开心网的所有操作连接,通过程序模拟请求进行批量操作!以开心网登陆做例子,并用程序进行模拟登陆。选择好监听页面后从浏览器进行登陆操作。点击登陆按钮后,抓包程序就会有变化了,因为刚才我们进行了与开心网服务器交互动作,需要向外发送数据,所以通过抓包数据得到了如下结果:POST /login/login.php H... 阅读全文

posted @ 2010-10-12 11:21 且行且思 阅读(2034) 评论(2) 推荐(0) 编辑

摘要:代码 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--CookieContainercc=newCookieContainer();stringurl=“http://mailbeta.263.net/xmweb”;HttpWe... 阅读全文

posted @ 2010-10-12 10:47 且行且思 阅读(10471) 评论(0) 推荐(0) 编辑

摘要:/*使用方法:MyHttploHttp=newMyHttp();stringlcHtml="";loHttp.HandleCookies=true;//操作CookiesloHttp.Method="GET";lcHtml=loHttp.GetUrl("http://signin.ebay.com.cn/ws2/eBayISAPI.dll?SignIn&ssPageName=h:h:sou... 阅读全文

posted @ 2009-01-05 17:56 且行且思 阅读(1437) 评论(1) 推荐(0) 编辑

摘要:方法一:1,请求首页面,获得cookie,并保存cookie备用(注:session 也是cookie的一种) 2,请求附加码,并显示在自己的页面,注意,请求附加码的时候,一定要用第一步得到的cookie去请求,请求完毕后如果有新的cookie则继续保存。 3,人工输入附加码,post到最终的页面。 -------------------------------------------------... 阅读全文

posted @ 2009-01-05 16:26 且行且思 阅读(2764) 评论(2) 推荐(0) 编辑

摘要:下载地址: http://files.cnblogs.com/Fooo/HttpAnalyzerFullV3和汉化补丁.rar如上图: 安装httpanalyzerstdv3及汉化补丁后,利用GreenBrowser.exe绿色浏览器打开目标采集网址,接着点击httpanalyzerstdv的执行按钮,下一步在GreenBrowser中进行登陆及其它操作完毕后,便可以在httpanalyzerst... 阅读全文

posted @ 2008-12-23 00:28 且行且思 阅读(2764) 评论(0) 推荐(0) 编辑

摘要:request.BeginGetRequestStream 报错! 无法发送具有此谓词类型的内容正文。注意此方法: //////request.Method = "GET"; //若不为异步,则调用此方法。 request.Method = "POST"; //若为异步,则调用此方法。 try { request = WebRequest... 阅读全文

posted @ 2008-11-07 10:12 且行且思 阅读(10295) 评论(0) 推荐(0) 编辑

摘要:private void ppkie() { int time1, time2; time1 = Environment.TickCount; textBox1.Text = ""; label1.Text = ""; // Create a new HttpW... 阅读全文

posted @ 2008-11-04 14:24 且行且思 阅读(1869) 评论(0) 推荐(0) 编辑

摘要:实现异步请求System.Net 类使用 .NET 框架的标准异步编程模型对 Internet 资源进行异步访问。WebRequest 类的 BeginGetResponse 和 EndGetResponse 方法分别启动和完成对 Internet 资源的异步请求。注意 在异步回调方法中使用同步调用可能会导致严重的性能降低。通过 WebRequest 及其子代实现的 Internet 请求必须使用... 阅读全文

posted @ 2008-11-03 12:43 且行且思 阅读(671) 评论(0) 推荐(0) 编辑

摘要:代码如下: int c,cc=4096; public static ManualResetEvent allDone = new ManualResetEvent(false); FileStream fs = new FileStream( "file to post",.......); asyncResult = request.BeginGetRequestStream(new ... 阅读全文

posted @ 2008-11-03 12:19 且行且思 阅读(4375) 评论(0) 推荐(0) 编辑

摘要:private static void EndGetStreamCallback(IAsyncResult ar){ FtpState state = (FtpState) ar.AsyncState; Stream requestStream = null; // End the asynchronous call to get the request stream. t... 阅读全文

posted @ 2008-11-03 12:15 且行且思 阅读(616) 评论(0) 推荐(0) 编辑

摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Net;using S... 阅读全文

posted @ 2008-10-31 04:03 且行且思 阅读(2188) 评论(2) 推荐(0) 编辑

点击右上角即可分享
微信分享提示