开发者

ASP .net application finds local resource files in Web Development server, but not local IIS

开发者 https://www.devze.com 2023-01-17 07:50 出处:网络
When I run the application using the Visual Studio Web Development Server it works fine. However when I run it using local IIS I get the following error:

When I run the application using the Visual Studio Web Development Server it works fine. However when I run it using local IIS I get the following error:

Any ideas? Thanks!!

The resource class for this page was not found. Please check if the resource file exists and try again. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: The resource class for this page was not found. Please check if the resource file exists and try again.

Source Error:

Line 81: private void PopulateLanguageList() Line 82: { Line 83: DropDownListLanguage.Items[0].Text = (string)HttpContext.GetLocalResourceObject( Line 84: "\Default.aspx", SelectLanguage, Thread.CurrentThread.CurrentCulture); Line 85: }

Stack Trace:

[InvalidOperationException: The resource class for this page was not found. Please check if the resource file exists and try again.] System.Web.Compilation.LocalResXResourceProvider.CreateResourceManager() +4038050 System.Web.Compilation.BaseResXResourceProvider.EnsureResourceManager() +23 System.Web.Compilation.BaseResXResourceProvider.GetObject(String resourceKey, CultureInfo culture) +24 System.Web.Compilation.ResourceExpressionBuilder.GetResourceObject(IResourceProvider resourceProvider, String resourceKey, CultureInfo culture, Type objType, String propName) +32 System.Web.HttpContext.GetLocalResourceObject(String virtualPath, String resourceKey, CultureInfo culture) +56 APPortal.Login.PopulateLanguageList() in c:\inetpub\wwwroot\APPortal\Default.aspx.cs:83 APPortal.Login.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\APPortal\Default.aspx.cs:20 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25 System.Web.Util.CalliEve开发者_开发知识库ntHandlerDelegateProxy.Callback(Object sender, EventArgs e) +42 System.Web.UI.Control.OnLoad(EventArgs e) +132 System.Web.UI.Control.LoadRecursive() +66 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428


i replaced the local resources with global resources and this seemed to solve my problem!

0

精彩评论

暂无评论...
验证码 换一张
取 消