未找到 .resx 文件编程错误还是其他什么? ASP.NET

问题描述

各位,我已经为此苦苦挣扎了很长时间。

仅在 PRODUCTION 中,会出现页面编译过程中找不到资源文件的情况。

这种情况时不时地发生,间隔不规则,甚至几个月后也是如此。

当它发生时,只需重新启动 iis 池,一切都会再次运行,谁能告诉我会发生什么?


代码

Private Sub CreaStrumentiSopra()
    Dim lbl2 As New Label
    lbl2.Attributes.Add("class","lblNumeroProdottiTrovati")
    If (conteggioProdotti = 1) Then
        lbl2.Text = " " & GetLocalResourceObject("lblProdotto")
    Else
        lbl2.Text = " " & GetLocalResourceObject("lblProdotti")
    End If
    panStrumenti.Controls.Add(lbl2)
End Sub

Error 500
Message: Exception of type 'System.Web.HttpUnhandledException' was thrown.
Inner Exception: system.invalidOperationException: The resource class for this page was not found.  Please check if the resource file exists and try again.
   at System.Web.Compilation.LocalResXResourceProvider.CreateResourceManager()
   at System.Web.Compilation.BaseResXResourceProvider.EnsureResourceManager()
   at System.Web.Compilation.BaseResXResourceProvider.Getobject(String resourceKey,CultureInfo culture)
   at System.Web.Compilation.ResourceExpressionBuilder.GetResourceObject(IResourceProvider resourceProvider,String resourceKey,CultureInfo culture,Type objType,String propName)
   at System.Web.Compilation.ResourceExpressionBuilder.GetResourceObject(IResourceProvider resourceProvider,CultureInfo culture)
   at pCatalogo.CreaStrumentiSopra()
   at pCatalogo.CreateChildControls()
   at System.Web.UI.Control.EnsureChildControls()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,Boolean includeStagesAfterasyncPoint)

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)