Problem with resx files

  • Thread starter Thread starter Petr PALAS
  • Start date Start date
P

Petr PALAS

Hi,

I have an ASP.NET 1.1 application that uses resources stored in .resx files.
The default file strings.resx contains the English version, file
strings.cs-cz.resx contains the Czech version.

On the local machine (Windows XP), everything works fine - the application
displays the specified language version. However, after placing the
application on the web server (Windows 2003), only the default (English)
text is displayed.

There are the same files (including /bin/cs-cz/TestCulture.resources.dll) on
the server as well as on the local machine.

I'm using the following code for reading the resources:

Private Shared _rm As ResourceManager

Public Shared Function GetString(ByVal stringName As String) As String
If _rm Is Nothing Then
Dim thisAssembly As System.Reflection.Assembly =
System.Reflection.Assembly.Load("TestCulture")
Dim resManager As ResourceManager = New
ResourceManager("TestCulture.strings", thisAssembly)
_rm = resManager
End If
Return _rm.GetString(stringName, New Globalization.CultureInfo("cs-cz"))
End Function

Do you have any idea?

Thank you.

Best Regards,

Petr Palas
********************************************************************************
Kentico Software
WWW: www.kentico.com
Blog: www.kentico.com/blog
Kentico CMS - The most affordable CMS for ASP.NET professionals.
********************************************************************************
 
Did you checked whether reference are correct?

You can also browse some FAQ's on WinServer 2003 regarding same,.

HTH

With Best Regards
Naveen K S
 
A couple of things to check: Does your default page contain the English
strings? Is your virtual directory set up to allow the anonymous user to
load assemblies?

In principle your code should work. I couldn't check it out because my
Windows Server 2003 is currently down.
 
Back
Top