源代码:
MSXML2.XMLHTTP30Class myHttp=new MSXML2.XMLHTTP30Class();
string strUrl="http://192.168.0.219:8080/dsmp/UnSubscribe?spserviceid=-FCSSBY&feeuserid=13888946427&destuserid=13888946427";
myHttp.open("get",strUrl,false,"","");
myHttp.send("");
if(myHttp.status==200)
{
if(myHttp.readyState==4)
{
string strHtml="";
string strHtmlTotal=myHttp.responseText.ToString();
}
}上面的程序语法没问题,调试通过了,可怎么监控中的myHttp报以下错误:- myHttp {MSXML2.XMLHTTP30Class} MSXML2.XMLHTTP30Class
System.Object {MSXML2.XMLHTTP30Class} System.Object
readyState 1 int
responseBody <错误: 发生 {System.Runtime.InteropServices.COMException} 类型的异常> System.Object
responseStream <错误: 发生 {System.Runtime.InteropServices.COMException} 类型的异常> System.Object
responseText <错误: 发生 {System.Runtime.InteropServices.COMException} 类型的异常> string
- responseXML {System.__ComObject} System.Object
- [System.__ComObject] {System.__ComObject} System.__ComObject
- System.MarshalByRefObject {System.__ComObject} System.MarshalByRefObject
System.Object {System.__ComObject} System.Object
__identity <未定义的值> System.Object
m_ObjectToDataMap <未定义的值> System.Collections.Hashtable
m_wrap 2043256 int
status <错误: 发生 {System.Runtime.InteropServices.COMException} 类型的异常> int
statusText <错误: 发生 {System.Runtime.InteropServices.COMException} 类型的异常> string
解决方案 »
- WinForm中实现类似于Session的功能
- VSTS for Database Professionals Sql Server Date-Application”包。
- ASP.net 需要学点啥呢
- 潜心研究搜索引擎5年,现在回头集成一个自主研发的 erp 系统到我的网站里面,大家都开始慌张的说 erp2来了,^_^ --> 看我的 ID
- 问个很菜的问题,webservice发布的时候能跟网站项目放同一个iis目录吗?
- 请想交换程序学习的大侠进来看看!
- 访问指定的文件被禁止!
- zhangyc 我做了一个用户控件 MyHTMLEdit.ascx文件 里面有一个TextBox控件 当把这个用户控件拖到ASPX中 怎么在ASPX中来A验证SCX不能为空
- datalist里的textbox怎么取得用户输入的值? 急急急
- 怎么将name相同的input radio分成多组?急!!!请求各位大神赐教。。。
- 急求一句sql 语句(sql2000下),在线等待。。。。。
- 关于邮件地址的regular expression 问题
你把myHttp.send("");改成myHttp.send();试试不行的话可以考虑换成下面的代码string strUrl="http://192.168.0.219:8080/dsmp/UnSubscribe?spserviceid=-FCSSBY&feeuserid=13888946427&destuserid=13888946427";
WebRequest webr=WebRequest.Create(strUrl);
Stream rc=webr.GetResponse().GetResponseStream();
StreamReader read=new StreamReader(rc,System.Text.Encoding.Default);
string strHtml="";
string strHtmlTotal=read.ReadToEnd();
QueryEng.aspx?querytext=S&TotalResults=true输出的是XML文件, MSXML2.IXMLHTTPRequest xmlRequest = new MSXML2.XMLHTTPClass();
xmlRequest.open("GET","QueryEng.aspx?querytext=S&TotalResults=true",false,null,null);
xmlRequest.send(null);
string xml = xmlRequest.responseText;
未指定的错误
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.Runtime.InteropServices.COMException: 未指定的错误错在那里了呢?