473,545 Members | 2,005 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

App_Data or App_GlobalResou rces

This drives me nuts,I have put a textfile in App_GlobalResou rces.

How do I read it in runtime? I have googled for two days now.

GetExecutingAss embly.GetManife stResourceStrea m("XYZ.xml") returns nothing.

Should I put it in App_Data instead?

How do I read it from there?

/k
Jul 18 '06 #1
1 2642
re:
This drives me nuts,I have put a textfile in App_GlobalResou rces.
App_GlobalResou rces is hard-wired for .resx files.

The files in App_GlobalResou rces are compiled into a namespace called Resources.

For each resource (string, image) in any resource file in App_GlobalResou rces,
ASP.NET will dynamically generate the static property for each.

re:
Should I put it in App_Data instead?
Yes.

re:
How do I read it from there?
Dim rdr As StreamReader = File.OpenText ("App_Data/a.txt")
or
Dim rdr As StreamReader = New StreamReader( File.Open("App_ Data/a.txt", FileMode.Open))

Then you can loop through the rows to get all the text.

Frankly, I'd write an xml file and place it in App_Data, instead of using a plain-text file.
It's far easier to get specific bits of info from an xml file than from a text file.

Good luck!

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"kurt sune" <ap*@apa.comwro te in message news:%2******** ********@TK2MSF TNGP05.phx.gbl. ..
This drives me nuts,I have put a textfile in App_GlobalResou rces.

How do I read it in runtime? I have googled for two days now.

GetExecutingAss embly.GetManife stResourceStrea m("XYZ.xml") returns nothing.

Should I put it in App_Data instead?

How do I read it from there?

/k


Jul 18 '06 #2

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

Similar topics

13
1005
by: Adam | last post by:
Trying to get an asp.net 2.0 app running and am receiving this error. I see a bunch of people with this error on the net, but no solution: Works fine on my local machine, deployed to a server it yields this message. Failed to map the path '/App_GlobalResources/' Stack trace: at...
0
5667
by: Jody Gelowitz | last post by:
VS2005 Standard Edition WinXP Pro SP2 I have setup a Web project under: http://localhost/myproject/ and have received a "Failed to map the path '/MyProject/App_GlobalResources'." error (details at the bottom of this message). On Friday, I have run through the steps as outlined at:...
6
23850
by: CuriousGeorge | last post by:
I've upgraded a .Net 1.1 web app to 2.0 and am having a heck of a time getting resources to work again. From what I understand if I move my strings.resx file into the App_GlobalResources folder I should magically be able to reference my strings using the syntax Resources.strings.string1. This isn't working for me. Is there something I'm...
2
1922
by: Victor Paraschiv | last post by:
In a webservice I need to store the credentials in a xml file.Of course the password string is hashed. The XML is stored in App_Data. Now I need to open this file for read/write. I've tryed a lot of paths but none worked. Cassini tries to open a file from "'C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\App_Data\Users.xml' and IIS is...
5
14354
by: CharlesA | last post by:
hi folks I'm working on reverse engineering TheBeerHouse by Marco Bellinaso which appears to have 100% unanimous approval on Amazon. I got the book and downloaded the code and I opened the solution. in his readme.txt he recommends that you move the database files he gives you in the App_data folder (called oddly aspnet.mdf and aspnet_log.mdf)...
0
1467
by: C. Moya | last post by:
When sites are published, App_GlobalResources seems to be compiled and is not updateable (even though you set "Allow this precompiled site to be updateable"). Is there any way to update global resources without recompiling the whole site??? This seems to negate a whole chunk of the benefits of using the Web Site Project model. I have tried...
2
1881
by: itfetish | last post by:
I've just upgraded our WIndows 2003 (with SBS server) web server to .Net framework 2.0 (it had 1.1 before) As I have been working on a web parts page on my laptop, hosting it there, working perfectly. I want to transfer it now, so I upgraded it. Created a new application pool for .net2.0 stuff, then used Visual Studio 2005 from my laptop...
4
24299
by: Joey | last post by:
asp.net 2/C#/VS2005 I have a web app where I use a stream writer to create a CSV (text) file. I then use my code to save the file in the site's 'App_Data' folder, in a subfolder called 'Temp'. Finally, I redirect the page to that file in order to serve it out (push the download) to the user. This all worked great in .net v1.1. Now, in my...
6
29455
by: Andy Fish | last post by:
Hi, From what I can gather, under Asp.Net 2.0, it is safe to put data and config files underneath the app_data in the web root and they will not be served directly to the browser from a URL. Can anyone explain just how this feature works. is app_data a reserved name for IIS and ASP.Net, or is there some jiggery pokery going on behind the...
0
7479
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...
0
7411
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...
1
7439
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...
0
7773
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...
0
5987
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
4962
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3450
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1028
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
722
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.