Quantcast

Web Application Localization: MissingManifestResourceException

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Web Application Localization: MissingManifestResourceException

Bálint Kardos
Hi,

i'm porting another Web application to Mono/Linux, which has the
following structure:

/default.aspx
/design.master
/App_Data/FooUserControl.ascx
/App_GlobalResources/FooLocalization.en-US.resx
/App_GlobalResources/FooLocalization.resx


I have a class, which handles the resources:

namespace Foo
{
    public class ResourceItem : System.Web.UI.Page
    {
        private ResourceManager rm;
        private CultureInfo ci;

        public ResourceItem()
        {
            rm = new ResourceManager("FooLocalization",
System.Reflection.Assembly.Load("App_GlobalResources"));
            ci = Thread.CurrentThread.CurrentCulture;
        }

        public string GetValue(string item)
        {
            return rm.GetString(item, ci);
        }
    }
}

The user contol is in the MasterPage.

Under Visual Studio 2005 and IIS the above works fine (switches
between the default language and en-US as expected),
under Mono it say:

System.Resources.MissingManifestResourceException: A resource object
was not found at the specified virtualPath.

  at System.Web.HttpContext.GetLocalResourceObject (System.String
virtualPath, System.String resourceKey,
System.Globalization.CultureInfo culture) [0x00000]

  at System.Web.HttpContext.GetLocalResourceObject (System.String
virtualPath, System.String resourceKey) [0x00000]



Questions:

1) is the name of the resource files wrong?
2) should I place the resource files elsewhere?
3) how can I query "virtualPath" parameter's value?


--

üdvözlettel
with regards

Kardos Bálint
_______________________________________________
Mono-list maillist  -  [hidden email]
http://lists.ximian.com/mailman/listinfo/mono-list
Loading...