久久国产亚洲日韩一本,欧美日韩专区国产精品,久久精品成人欧美大片,久久久久久久岛国免费AV,亚洲欧洲精品一区二区

新聞建站cms系統、政府cms系統定制開發

廣州網站建設公司-閱速公司

asp.net新聞發布系統、報紙數字報系統方案
/
http://www.ainiby.com/
廣州網站建設公司
您當前位置:首頁>網站技術

網站技術

WebRequest:System.Net.WebException: 遠程服務器返回錯誤: (404) 未找到

發布時間:2015/1/27 16:35:28  作者:Admin  閱讀:3246  

廣告:

HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);

此包運行出現如下錯誤:

“/”應用程序中的服務器錯誤。

遠程服務器返回錯誤: (404) 未找到。

說明: 執行當前 Web 請求期間,出現未處理的異常。請檢查堆棧跟蹤信息,以了解有關該錯誤以及代碼中導致錯誤的出處的詳細信息。

異常詳細信息: System.Net.WebException: 遠程服務器返回錯誤: (404) 未找到。

源錯誤:

行 79: //ie10 User-Agent Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)

行 80: //req.Headers.Add("User-Agent", "ie9");

行 81: res = (HttpWebResponse)req.GetResponse();

行 82: Stream resStream = res.GetResponseStream();

行 83: StreamReader reader = new StreamReader(resStream, Encoding.GetEncoding(encodingStr));

源文件: E:\aspnet2.0\53BK公司網站-net-家里\Mvccom\GetHtml.cs 行: 81

堆棧跟蹤:

[WebException: 遠程服務器返回錯誤: (404) 未找到。]

System.Net.HttpWebRequest.GetResponse() +5411389

Mvccom.GetHtml.GetPageSource_Mobile(String url, String encodingStr) in E:\aspnet2.0\53BK公司網站-net-家里\Mvccom\GetHtml.cs:81

Mvcb2b.Controllers.ToolsController.Mobileshow() in E:\aspnet2.0\53BK公司網站-net-家里\Mvcb2b\Controllers\ToolsController.cs:57

lambda_method(ExecutionScope , ControllerBase , Object[] ) +75

System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +17

System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +178

System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +24

System.Web.Mvc.<>c__DisplayClassd.<InvokeActionMethodWithFilters>b__a() +52

System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +254

System.Web.Mvc.<>c__DisplayClassf.<InvokeActionMethodWithFilters>b__c() +19

System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +192

System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +314

System.Web.Mvc.Controller.ExecuteCore() +105

System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +39

System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +7

System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__4() +34

System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +21

System.Web.Mvc.Async.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) +12

System.Web.Mvc.Async.WrappedAsyncResult`1.End() +59

System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +44

System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +7

System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8769966

System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155

版本信息: Microsoft .NET Framework 版本:2.0.50727.5485; ASP.NET 版本:2.0.50727.5483

原因:formurl = Request.Form["http_txt"].ToString().Trim().ToLower();

解決方法:去掉 ToLower()就正常了。

廣告:

相關文章
WebRequest
404
cms新聞系統購買咨詢
掃描關注 廣州閱速軟件科技有限公司
掃描關注 廣州閱速科技
主站蜘蛛池模板: 镇江市| 凤冈县| 孝感市| 古蔺县| 望奎县| 道孚县| 石棉县| 蓝山县| 五河县| 夏邑县| 筠连县| 东乡族自治县| 江达县| 临高县| 满城县| 正宁县| 盐源县| 嵊州市| 泰来县| 安塞县| 奇台县| 修文县| 保定市| 桦甸市| 泾川县| 桓台县| 阿巴嘎旗| 枣强县| 合阳县| 晋宁县| 项城市| 工布江达县| 兰溪市| 凌海市| 灵武市| 四子王旗| 清镇市| 马边| 台南市| 邳州市| 喀喇|