473,803 Members | 4,392 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

accessing a resource (xml) outside of the project directory

i need to load xml from a resource that is ousdie of my prject directory
i this like :
http://www.skystonesoftware.com/temp...8-D99BA936571F

in the part code :
Dim clsResourceStre am As System.IO.Strea m _
=
System.Reflecti on.Assembly.Get ExecutingAssemb ly().GetManifes tResourceStream ("WindowsApplic ation1.temp.txt ")
it load a page that is part of the project and under its directories!
how can i load a file ffrom a diffrent PATH>???
thnaks in advance
PEleg
Sep 9 '07 #1
1 1347
Your sample code is attempting to load an embedded resource from the
assembly. You need to use a FileStream object to load the desired file from
the actual physical location on disk instead.
-- Peter
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com

"pelegk1" wrote:
i need to load xml from a resource that is ousdie of my prject directory
i this like :
http://www.skystonesoftware.com/temp...8-D99BA936571F

in the part code :
Dim clsResourceStre am As System.IO.Strea m _
=
System.Reflecti on.Assembly.Get ExecutingAssemb ly().GetManifes tResourceStream ("WindowsApplic ation1.temp.txt ")
it load a page that is part of the project and under its directories!
how can i load a file ffrom a diffrent PATH>???
thnaks in advance
PEleg
Sep 10 '07 #2

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

Similar topics

2
6970
by: steve bull | last post by:
I created an embedded resource by adding a Swatches.xml file to my Solution and then making it an embedded resource in the VS IDE. When I try to open a stream to the resource using GetManifestResourceStream("Swatches.xml") it fails. Do I need to prefix the resource with a namespace or something? Thanks,
7
5431
by: Wysiwyg | last post by:
Is there any way to add an embedded resource to a project without copying it to the project's directory? I have shared resources and don't want each project using the images, xml files, etc. to need to be updated with the current copy before being built. I also don't want projects being built with the old copy. Thanks! Bill
0
2268
by: Joergen Bech | last post by:
Fairly new to ASP.NET 1.1. Getting the error below when running application on a web server outside of my control, but only the first time I run it: 1. After a long period of inactivity (or updating the code-behind dll) accessing any aspx page in the application causes the application to run for the first time. Some of the initialization involves reading and writing some text and xml files using simple streamreader and streamwriter...
6
2688
by: cql90 | last post by:
Hi All, I have created a folder call Resource within my project, I have added a XML file into the resource folder, and I set the BuildAction property of the XML file to "Embedded Resource". How can I retrieve its content in the runtime? Any help is deeply appreciated. Thanks you very much in advance. Kate
1
2741
by: moondaddy | last post by:
I have a sample vb .net 2.0 winforms app and am using Oneclick deployment to a remote server. All of the files (DLLs, EXEs, manifests, configs, etc.) seem to get deployed to the target folder on the client OK and seem to work OK, Except for some additional files I created for the client application. For example, I have a file called myData.xml and myCustomConfix.xml which the windows app uses. In the old 1.1 days (while working in the...
0
1651
by: C.W.Holeman II | last post by:
For info on the context of my question see the end of this posting. I have used resource files and xnlLanguage to control the language displayed in a Motif application. Simply dropping an appropriately named additional resource file for a new language in the proper directory the application would be able to display the content in that language. Regarding XML I have found info about i18n in several places including here:
12
5279
by: TS | last post by:
i have a need to possibly enable mutli language support. What benefit do i get by using a resource file instead of a custom xml solution? thanks!
1
3551
by: Ryan Liu | last post by:
Hi, I couldn't find help doc for Build Action properties. In the drop down list, there are: None, Compile, Content and Embedded Resource, what are those mean and when to use which one? And how is this property related to property "Copy to output directory"? ------- If I have some files like xslt file, file based database(like access or
1
6596
by: Ryan Liu | last post by:
"j1mb0jay" <j1mb0jay@uni.ac.ukдÈëÏûÏ¢ÐÂÎÅ:s0dmg5x4el.ln2@news.aber.ac.uk... Thanks, j1mbjay. Then what is the difference betweeen "Content" and "Embedded"? What is the difference between put a file in Resource (folder) or just in project? Thanks!
0
10309
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
10289
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
10068
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...
0
9119
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7600
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
6840
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5496
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...
0
5625
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2968
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.