Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > it always return path C:\winnt\system32 ..why ?

Reply
Thread Tools

it always return path C:\winnt\system32 ..why ?

 
 
raagz
Guest
Posts: n/a
 
      07-16-2004
Hi,

can anybody tell me why
the following piece of code in my ASP.NET page always returns the path
as C:\winnt\system32 ?

FileInfo objf = new FileInfo("test.xml");
string strFile = objf.DirectoryName;


Thanks
Raagz
 
Reply With Quote
 
 
 
 
John Saunders
Guest
Posts: n/a
 
      07-16-2004
"raagz" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> Hi,
>
> can anybody tell me why
> the following piece of code in my ASP.NET page always returns the path
> as C:\winnt\system32 ?
>
> FileInfo objf = new FileInfo("test.xml");
> string strFile = objf.DirectoryName;


Because that's the default directory of the aspnet_wp process.
--
John Saunders
johnwsaundersiii at hotmail


 
Reply With Quote
 
 
 
 
Ben
Guest
Posts: n/a
 
      07-16-2004
Look at Server.MapPath() maybe that will help??
"raagz" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> Hi,
>
> can anybody tell me why
> the following piece of code in my ASP.NET page always returns the path
> as C:\winnt\system32 ?
>
> FileInfo objf = new FileInfo("test.xml");
> string strFile = objf.DirectoryName;
>
>
> Thanks
> Raagz




 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
it always return path C:\winnt\system32 ..why ? raagz ASP .Net 0 07-16-2004 01:47 PM
it always return path C:\winnt\system32 ..why ? raagz ASP .Net 0 07-16-2004 01:47 PM
it always return path C:\winnt\system32 ..why ? raagz ASP .Net 0 07-16-2004 01:47 PM



Advertisments