电竞比分网-中国电竞赛事及体育赛事平台

分享

Could not load file or assembly ‘App_Web_xxxx’ or one of its dependencies. 系統(tǒng)找不到指定文件.

 實(shí)力決定地位 2017-10-10
ASP.usercontrol_defaultpage_righttopsearch_ascx.__BuildControlTree(usercontrol_defaultpage_righttopsearch_ascx __ctrl) +0
System.Web.UI.UserControl.InitializeAsUserControl(Page page) +53
ASP.default_aspx.__BuildControlRighttopsearch1() +73
ASP.default_aspx.__BuildControlTree(default_aspx __ctrl) +1079
ASP.default_aspx.FrameworkInitialize() +51
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +55
System.Web.UI.Page.ProcessRequest() +105
System.Web.UI.Page.ProcessRequest(HttpContext context) +292
ASP.default_aspx.ProcessRequest(HttpContext context) +16
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +499
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +177

出現(xiàn)場(chǎng)景:頁(yè)面可以正常訪問(wèn)沒(méi)有更新任何地方,突然就出現(xiàn)了這個(gè)錯(cuò)誤。
解決方案:解決的方法很奇怪,將發(fā)生錯(cuò)誤的頁(yè)面上加上debug="true"的指令,然后訪問(wèn)出錯(cuò)的頁(yè)面,這時(shí)候頁(yè)面就可以正常訪問(wèn)了;然后再把debug="true"去掉也可以正常訪問(wèn)。
這應(yīng)該是microsoft的一個(gè)bug。

在ASP.NET 2.0 開(kāi)發(fā)過(guò)程中,有時(shí)候開(kāi)發(fā)人員可能會(huì)遇到這樣的頁(yè)面異常:

Could not load file or assembly 'App_Web_****, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

異常信息中的****是一個(gè)隨機(jī)字符串,我們知道App_Web_****是一個(gè)ASP.NET即時(shí)編譯的臨時(shí)程序集。

我是今天在用Orcas beta 1開(kāi)發(fā)一個(gè)基于WCF服務(wù)的瀏覽器應(yīng)用時(shí)遇到該問(wèn)題的,通常地講,這是一個(gè)ASP.NET 2.0處理臨時(shí)程序集的已知問(wèn)題,ASP.NET論壇上的billr578說(shuō)微軟建議:

(they suggested) setting batch compilation to false. Basically put batch="false" in the compiliation tag in your web.config. Apparently this is an issue they're working on.

也就是說(shuō)在web.config里配置成這樣子:

<compilation debug="true" batch="false">

    本站是提供個(gè)人知識(shí)管理的網(wǎng)絡(luò)存儲(chǔ)空間,所有內(nèi)容均由用戶(hù)發(fā)布,不代表本站觀點(diǎn)。請(qǐng)注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購(gòu)買(mǎi)等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊一鍵舉報(bào)。
    轉(zhuǎn)藏 分享 獻(xiàn)花(0

    0條評(píng)論

    發(fā)表

    請(qǐng)遵守用戶(hù) 評(píng)論公約

    類(lèi)似文章 更多