473,651 Members | 2,630 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using Resource Files - not for localization

I would like to use compiled resource files in my web application that are
not related to localization.
The idea is to have a dll with resources that can be accessed by the
website.

I have no problem making the dll.
I am running into problems using it.

I am attempting to use the resource manager to get the values from the dll
and update the controls appropriately.

When I try to use it, I get a MissingManifest ResourceExcepti on error saying
Could not find any resources appropriate for the specified culture (or the
neutral culture) on disk.

How can I avoid this?

Thanks,
Bill Mell
Jul 24 '07 #1
1 1992
Bill,

Not sure of your setup and why you get those errors.
I can tell you the way I use resources - see whether it works for you.
- In your dll set BuildAction for the files to "Embedded Resource"
- inside your dll define a function that would return the resource,
something similar to the following:
using System;
using System.IO;
using System.Reflecti on;
....
public class MyDllClass{
....
private static Assembly _asm = Assembly.GetExe cutingAssembly( );
private static Type _localType = typeof(MyDllCla ss);
....
public static Stream GetResource(str ing location, string name)
{
return _asm.GetManifes tResourceStream (_localType, location + "." + name);
}

if your resource files are grouped in a folder - you would specify the
folder name in location parameter, otherwise pass empty string. Note that
resource name is case-sensitive.

If you program in VB, I believe that you do not specify the location - it
does not create a namespace for folders.

To get a string from your Stream, use
new StreamReader(st ream).ReadToEnd ();

Hope this helps

"Bill Mell" wrote:
I would like to use compiled resource files in my web application that are
not related to localization.
The idea is to have a dll with resources that can be accessed by the
website.

I have no problem making the dll.
I am running into problems using it.

I am attempting to use the resource manager to get the values from the dll
and update the controls appropriately.

When I try to use it, I get a MissingManifest ResourceExcepti on error saying
Could not find any resources appropriate for the specified culture (or the
neutral culture) on disk.

How can I avoid this?

Thanks,
Bill Mell
Jul 25 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
507
by: Bill | last post by:
Hi Everyone, I am having some difficulty in using the Windows Resource Localization Editor (WinRes.exe) on several Visual Basic .NET forms (.resx files) in two different projects. The editor gives an error when loading the .resx files. When attempting to load a .resx file using WinRes under Visual Studio .NET 2003, the following error is displayed in the client area of the editor: "An error occurred while loading the document. Fix...
0
2455
by: gen | last post by:
Hi everybody, We would like to use localization in order to translate our applications. The working environment of the users is very bilingual so they often have to switch from one language to another. So far we have been using the resource files. But using the localization would be easier to design our forms. But the users are use to be able to change the language anytime they want in the application without having to restart the...
0
1089
by: Maileen | last post by:
Hi, I use the localization feature of my VB.net application to create some ApplicationName.resource.dll files, but i would like to know if it does not exist a way to change the name of these DLLs. for example my application is called TEST2. i localized my application into English (EN), Spanish (SP) and French (FR). in my bin folder, i will have 3 sub folders : en, sp and fr in each folder, will be a dll called : TEST2.resource.dll
0
1301
by: vivek | last post by:
localization of lang. using resource files resides in the global resources folder (App_GlobalResources). Currently In my application, I need to have different language resource files in global resources folder, first i select a specific language culture. I need to set static content of controls dynamically using language specific resource file. At the time of execution, I am receiving the error "Could not find any resources...
1
16585
by: chandu | last post by:
hello, i am developing a globalized application.for that i need to create some resource files for localization. i created resource file for english. now i want to convert the english resource file into another language like... french,germal lanuages... how to create resource files of different languages from available language resource file..
2
1286
by: craigkenisston | last post by:
I'm starting to work in an application that will be freely distribuited to the community. This means, people from any country will use it application has been created taking in consideration that will be translated, separating all strings in an XML file to read from. I just started this way and never stopped to take a look at the built-in globalization features on asp.net 2.0. Now, I am. I'm wondering whether I can use the globalizations...
1
1610
by: Claire | last post by:
Im writing a small application to allow some none techy people create localized string resources for our main application. So we can reuse modules each one has its own .resx resource file. So my string resource editor needs to be able to work on a project containing several source files at once. At first I planned to do display something simple, similar to a spreadsheet with a column for each language. Then i started wondering if there'd...
8
2538
by: Tomasz J | last post by:
Hello Developers, It may sound like a stupid question, but how to embed a resource in ASP.Net 2.0 web application? I mean, without using a separate library. There is no "build action" property. Thanks, Tomasz J
3
3392
by: hsmit.home | last post by:
I spent way too much time on this and I must say, I was a little disgruntled with what has been posted on all the various Xalan C mailing lists. Everyone says there's a solution, but give next to no detail on how to achieve this "allusive" solution. Well I spent the better part of a day finally figuring it out the hard way, trial and error. Here's a list of steps to compile the Xalan C version 1.10.0 on Microsofts Visual C++ 2005...
0
8349
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8275
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8795
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8695
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8460
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8576
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6157
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4143
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2696
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.