Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Resource Files & globalization

Thread Tools

Resource Files & globalization

John Stemper
Posts: n/a
Getting resource files to work with VS2002 and ASP.Net seems to be a little
flaky. I've added a resource file "strings.resx" to the project. The
properties of the files say Build action = "embedded resource". I've added
the appropriate code to the Global.asax:

protected void Application_Start(Object sender, EventArgs e)
Application["CM"] = new
ResourceManager("strings",Assembly.GetExecutingAss embly());

I've added the following code to my app:

ResourceManager rm = (ResourceManager) Application["CM"];

This builds fine but when I try and run it I get the error:

"Could not find any resources appropriate for the specified culture (or the
neutral culture) in the given assembly. Make sure "strings.resources" was
correctly embedded or linked into assembly "AppName". baseName: strings
locationInfo: <null> resource file name: strings.resources assembly:
AppName, Version=1.0.1431.19005, Culture=neutral, PublicKeyToken=null "

Any suggestions or good articles would be appreciated.



Reply With Quote
Jacob Yang [MSFT]
Posts: n/a
Hi John,

Based on my research and experience, the following information is useful to
you. Please refer to it carefully.

ResourceManager and ASP.NET

Working with Resource Files

How to read satellite assemblies resources in ASP.NET

I hope it helps.

Best regards,

Jacob Yang
Microsoft Online Partner Support
Get Secure! ĘC
This posting is provided "as is" with no warranties and confers no rights.

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Resource expression to access resource located in library Heinrich Moser ASP .Net 1 03-27-2008 04:25 PM
Very annoying error: Access to the path is denied. ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity Jay ASP .Net 2 08-20-2007 07:38 PM
Resource manager problem: naming for embedded resource. Dirc Khan-Evans ASP .Net 1 10-17-2005 12:52 PM
The system cannot locate the resource specified. Error processing resource avishosh XML 2 08-08-2004 06:28 AM
Nasty bug in documentation regarding globalization - wrong Culture Info name for Serbian (Cyrilic) Dejan Vesic ASP .Net 1 07-03-2003 12:32 AM