Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / January 2007

Tip: Looking for answers? Try searching our database.

URI class - real newbie here

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
GeezerButler - 22 Jan 2007 22:24 GMT
The URI class seems to be able to load a file on local machine where
the path is absolute i.e. like D://abc.xml.
The funny part is that if i make a WebRequest to request this uri, i do
get a response? (I wonder how).

Note: I do not have IIS installed.

So i was wondering if it would be able to load a filepath that is
relative to my dll/exe. Something like ../my folder/abc.xml.
But the URI class fails to load this string, saying that it is in
invalid format.
Is it somehow possible to load a filepath relative to my dll/exe.

BTW i need to do this to test my app's behaviour with different xml
files.
Is it possible to setup some kind of a local server on my machine
(without having IIS)?
Michael Nemtsev - 23 Jan 2007 08:16 GMT
Hello GeezerButler,

Use Server.MapPath to resolve your path

---
WBR,
Michael  Nemtsev [C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

G> The URI class seems to be able to load a file on local machine where
G> the path is absolute i.e. like D://abc.xml.
G> The funny part is that if i make a WebRequest to request this uri, i
G> do
G> get a response? (I wonder how).
G> Note: I do not have IIS installed.
G>
G> So i was wondering if it would be able to load a filepath that is
G> relative to my dll/exe. Something like ../my folder/abc.xml.
G> But the URI class fails to load this string, saying that it is in
G> invalid format.
G> Is it somehow possible to load a filepath relative to my dll/exe.
G> BTW i need to do this to test my app's behaviour with different xml
G> files.
G> Is it possible to setup some kind of a local server on my machine
G> (without having IIS)?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.