I've used resource files for localization in a web application and until this morning everything worked beautifully. This morning I had to move the application from one development machine to another (which as far as I can tell is configured identically),
and now the application can't find any of the resource files for my user controls (.ascx). When you run the app, you get :
[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() +132
System.Web.Compilation.BaseResXResourceProvider.EnsureResourceManager() +17
System.Web.Compilation.BaseResXResourceProvider.GetObject(String resourceKey, CultureInfo culture) +17
System.Web.Compilation.ResourceExpressionBuilder.GetResourceObject(IResourceProvider resourceProvider, String resourceKey, CultureInfo culture, Type objType, String propName) +20
System.Web.UI.TemplateControl.GetLocalResourceObject(String resourceKey) +43
controls_prtLogin.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\steelgate\controls\prtLogin.ascx.vb:18
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061
and in the designer, you get the blue error line under the control declaration, and the error: "ASP.NET runtime error: '.', hexadecimal value 0x00, is an invalid character.
Line 318, position 8."
I've tried everything I can think of including deleting all the resource files and starting new ones, but so far no luck. The thing that confuses me most is that it's only
happening with the user controls...
I encontered the same issue. I have a folder in my solution containing my user controls and a App_LocalResources folder to store their resources. I made modifications to a resource file in this folder and the application was not able anymore to access
to the resources of all the controls.
[InvalidOperationException: The resource class for this page was not found. Please check if the resource file exists and try again.]
It takes me a while but I found a solution to bypass this problem. I simply need to do a modification on a ressource file in the App_LocalResources folder of the root (resources of the web pages).
My co-worker Thilo experienced the same issue. After a simple reboot of the whole server (Windows 2003), the application just runs smooth again, without the error.
Probably the issue came up because we updated an existing and running
application on the server. After a reboot the ASP.NET/.NET "engine" was freshly initialized. (A single "iisreset", without a reboot, did
not help, though).
--
FREE Homepage Generator: http://www.zeta-producer.com
Send large files online for FREE: http://www.zeta-uploader.com
FREE Test Management Software: http://www.zeta-test.com
See me working: http://www.magerquark.de
I have encountered the same problem and I am not sure what causes this. However, a fix that works for me is to copy the name of the control that caused the error from your resx file to your the resourcekey value in your aspx/ascx file will do the trick.
loriann
Member
20 Points
4 Posts
The resource class for this page was not found.
May 02, 2006 01:20 AM|LINK
Hi,
I've used resource files for localization in a web application and until this morning everything worked beautifully. This morning I had to move the application from one development machine to another (which as far as I can tell is configured identically), and now the application can't find any of the resource files for my user controls (.ascx). When you run the app, you get :
and in the designer, you get the blue error line under the control declaration, and the error: "ASP.NET runtime error: '.', hexadecimal value 0x00, is an invalid character. Line 318, position 8."
I've tried everything I can think of including deleting all the resource files and starting new ones, but so far no luck. The thing that confuses me most is that it's only happening with the user controls...
Can anyone help?? Thank you!!!
Lori
crackity_jon...
Member
30 Points
6 Posts
Re: The resource class for this page was not found.
Jun 13, 2006 07:27 PM|LINK
Hi...
I encontered the same issue. I have a folder in my solution containing my user controls and a App_LocalResources folder to store their resources. I made modifications to a resource file in this folder and the application was not able anymore to access to the resources of all the controls.
[InvalidOperationException: The resource class for this page was not found. Please check if the resource file exists and try again.]
It takes me a while but I found a solution to bypass this problem. I simply need to do a modification on a ressource file in the App_LocalResources folder of the root (resources of the web pages).
It worked fine for me but why does this happens?
Hope it will help in some way...
UweKeim
Member
14 Points
4 Posts
Reboot
Feb 06, 2007 03:34 PM|LINK
My co-worker Thilo experienced the same issue. After a simple reboot of the whole server (Windows 2003), the application just runs smooth again, without the error.
Probably the issue came up because we updated an existing and running application on the server. After a reboot the ASP.NET/.NET "engine" was freshly initialized. (A single "iisreset", without a reboot, did not help, though).
FREE Homepage Generator: http://www.zeta-producer.com
Send large files online for FREE: http://www.zeta-uploader.com
FREE Test Management Software: http://www.zeta-test.com
See me working: http://www.magerquark.de
royalrex
Member
2 Points
1 Post
Re: The resource class for this page was not found.
Mar 11, 2007 02:08 PM|LINK
I experienced the same when I was playing around woth the resource files...
I could get it up and running by pressing "Rebuild Solution", that did the trick and I could browse my app again.
nesster13
Member
2 Points
1 Post
Re: The resource class for this page was not found.
Apr 20, 2007 08:43 PM|LINK
iffypop
Member
503 Points
100 Posts
Re: The resource class for this page was not found.
Oct 14, 2009 04:52 PM|LINK
Hi, Another thing to consider:
Always make sure you have the original resx (non language) file.
Ours got removed, so that only
MyPage.aspx.en-gb.resx
MyPage.aspx.fr-fr.resx
MyPage.aspx.it-it.resx
were left, no
MyPage.aspx.resx
And even though my culture was set to Italian, nothing would be available without the original MyPage.aspx.resx being available.
sepid
Member
68 Points
278 Posts
Re: The resource class for this page was not found.
May 09, 2010 05:40 AM|LINK
Hi iffypop,
thanks for your reply, it helps me alot.
i made mistake as same as you but yor reply helps me.