HttpWebRequest 和 HttpWebResponse 错误
我正在尝试运行在此页面。
一切都很好,我在几个网站上尝试了该程序,它工作正常,但有一个网站不是返回其页面中的 html 内容,而是生成一个 srtange 错误:
DotNetNuke Error: - Version 04.05.01 Return to main page
并且返回的 html 是:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-US">
<head>
<title id="Title">Error</title>
<link id="StyleSheet" href="/Install/Install.css" type="text/css" rel="stylesheet"></link>
</head>
<body>
<form name="Form" method="post" action="ErrorPage.aspx?tabid=186&error=Object+reference+not+set+to+an+instance+of+an+object.&content=0&language=ar-SY" id="Form">
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJNTkzNjY2ODU2D2QWBAIDDxYCHgRocmVmBRQvSW5zdGFsbC9JbnN0YWxsLmNzc2QCBQ9kFgICAg8PFgIeBFRleHQFRDxpbWcgc3JjPSIvaW1hZ2VzL2x0LmdpZiIgYm9yZGVyPSIwIiAvPiDYsdis2YjYuSDYp9mE2Ykg2KfZhNmF2YjZgti5ZGRk2aDp+vZbUIDHSd3beGBaLQrJ6yk=" />
<table cellspacing="5" cellpadding="5" border="0" class="Error">
<tr>
<td><img id="Image1" src="logo.gif" alt="DotNetNuke" border="0" /></td>
</tr>
<tr style="height:100%;">
<td valign="top" style="width:650px;">
<h2>DotNetNuke Error: - Version 04.05.01</h2>
<hr />
<p>
<table border="0" cellspacing="0" cellpadding="4">
<tr>
<td valign="top" align="left"><img id="ctl00_imgIcon" src="images/red-error.gif" border="0" /></td>
<td valign="middle" align="left"><span id="ctl00_lblHeading" class="NormalRed">an error has been occurred<br/></span><span id="ctl00_lblMessage" class="Normal">return to the site.</span></td>
</tr>
</table>
<hr noshade size="1"/></p>
</td>
</tr>
<tr>
<td align="right"><a id="hypReturn" class="WizardButton" href="Default.aspx"><img src="/images/lt.gif" border="0" /> return to the site</a></td>
</tr>
<tr><td height="10px"></td></tr>
</table>
</form>
</body>
</html>
那么什么是 DotNetNuke 错误问题是什么...顺便说一句,错误发生在一个阿拉伯网站上,我在另一个阿拉伯网站上尝试过,没有错误。
I am trying to run a simple code for web crawler written in this page .
every thing is fine and I tried the program on several sites and it works fine but there is one site instead of returning the html content in its pages it generates a srtange error :
DotNetNuke Error: - Version 04.05.01 Return to main page
and the html returned is :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-US">
<head>
<title id="Title">Error</title>
<link id="StyleSheet" href="/Install/Install.css" type="text/css" rel="stylesheet"></link>
</head>
<body>
<form name="Form" method="post" action="ErrorPage.aspx?tabid=186&error=Object+reference+not+set+to+an+instance+of+an+object.&content=0&language=ar-SY" id="Form">
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJNTkzNjY2ODU2D2QWBAIDDxYCHgRocmVmBRQvSW5zdGFsbC9JbnN0YWxsLmNzc2QCBQ9kFgICAg8PFgIeBFRleHQFRDxpbWcgc3JjPSIvaW1hZ2VzL2x0LmdpZiIgYm9yZGVyPSIwIiAvPiDYsdis2YjYuSDYp9mE2Ykg2KfZhNmF2YjZgti5ZGRk2aDp+vZbUIDHSd3beGBaLQrJ6yk=" />
<table cellspacing="5" cellpadding="5" border="0" class="Error">
<tr>
<td><img id="Image1" src="logo.gif" alt="DotNetNuke" border="0" /></td>
</tr>
<tr style="height:100%;">
<td valign="top" style="width:650px;">
<h2>DotNetNuke Error: - Version 04.05.01</h2>
<hr />
<p>
<table border="0" cellspacing="0" cellpadding="4">
<tr>
<td valign="top" align="left"><img id="ctl00_imgIcon" src="images/red-error.gif" border="0" /></td>
<td valign="middle" align="left"><span id="ctl00_lblHeading" class="NormalRed">an error has been occurred<br/></span><span id="ctl00_lblMessage" class="Normal">return to the site.</span></td>
</tr>
</table>
<hr noshade size="1"/></p>
</td>
</tr>
<tr>
<td align="right"><a id="hypReturn" class="WizardButton" href="Default.aspx"><img src="/images/lt.gif" border="0" /> return to the site</a></td>
</tr>
<tr><td height="10px"></td></tr>
</table>
</form>
</body>
</html>
so what is DotNetNuke Error and what is the problem...BTW the error occurred in an Arabian site and I tried on another Arabian sites and there were no errors.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您的爬网程序似乎已生成导致 DotNetNuke 崩溃的请求。您可能正在请求一个不存在的页面或传递导致 DotNetNuke 崩溃的请求参数。
只需将此结果视为失败的请求即可。
It seems that your crawler has generated a request that caused DotNetNuke to crash. You probably are requesting a page that does not exist or pass request parameters that cause DotNetNuke to crash.
Just treat this result as a failed request.
我通过添加 UserAgent 属性解决了该问题:
I've solved the problem by adding the UserAgent property :