Tjaart
Tjaart

Reputation: 4119

localization: AppLocal Resources throws InvalidOperationException on server with message "The resource class for this page was not found."

I have implemented localisation on my web application using meta:resourcekey and GetLocalResourceObject with App_LocalResources for user controls, pages etc. everything worked perfectly during testing however when copied to our live server I get:

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

I have checked and the files are exactly where they are on my development machine, where I am testing using IIS 7. The server also uses IIS 7. The website is running on .Net 4 .

I have done some research and found some answers:

The live server is clustered. This error showed up in my exception logs. I have not experienced a crash on the application, which indicates that either the system is contuining on despite the exception, or I am simply not being directed to the cluster which has this error. I have checked and it seems that only one cluster is reporting the error, although this could also mean that the load balancing server has not chosen the other cluster for users.

Has anyone experienced anything similar and how did you solve the problem?

Upvotes: 0

Views: 3621

Answers (1)

Tjaart
Tjaart

Reputation: 4119

There was a missing AppLocal resources folder in my project. What threw me off was that the error occured on the page and not the user control. Careful investigation of the stack trace was all that was needed.

Upvotes: 2

Related Questions