|
List Info
Thread: Re: Where did I get lost?
|
|
| Re: Where did I get lost? |

|
2005-07-29 09:09:06 |
|
| I think this should give you the path.
HttpContext.Current.Request.ApplicationPath;
On 7/29/05, Stephen Russell < srussell lotmate.com">srussell lotmate.com> wrote:
Thanks for the reply.
This is getting designed for a hosted site, so how do you reference that path to the ROOT of your hosted space? I thought that ~ did that for you, or it has for me for years.
Line 1 i declare the path two folders below where I am working. Line 2 gets that path.
string file = "~/Bulletin/"+FilePath+"/"+FileName;
FileInfo fi=new FileInfo(file);
Is there another method other then FileInfo to use at this point?
I can't seem to get Request.MapPath which is probably my failure.
Stephen Russell S.R. & Associates Memphis, TN 38115
901.246-0159
http://spaces.msn.com/members/srussell/
Hey Chris,
FileInfo would require to give full file path.
that is C:...FileName.ext
hope this hellps.
Regards,
I think it is probably erroring out after the FileInfo constructor if file is not a full path. I don't think it uses the current directory.
Chris
__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
YAHOO! GROUPS LINKS
|
| RE: Where did I get lost? |

|
2005-07-29 14:53:57 |
|
| Perfect!
string tr = HttpContext.Current.Request.ApplicationPath;
string file = Server.MapPath(tr);
file = file +"\Bulletin\"+FilePath+"\"+FileName ;
Took a
litle time with other calls at day gig.
Stephen Russell S.R. & Associates Memphis, TN
38115
901.246-0159
http://spaces.msn.com/members/srussell/
I think this should give you the path.
HttpContext.Current.Request.ApplicationPath;
On 7/29/05, Stephen
Russell <lotmate.com">srussell lotmate.com> wrote:
Thanks for
the reply.
This is
getting designed for a hosted site, so how do you reference that path to the
ROOT of your hosted space? I thought that ~ did that for you, or it has
for me for years.
Line 1 i
declare the path two folders below where I am working. Line 2 gets that
path.
string file = "~/Bulletin/"+FilePath+"/"+FileName;
FileInfo fi=new
FileInfo(file);
Is there another method other
then FileInfo to use at this point?
I can't seem to get
Request.MapPath which is probably my failure.
Stephen Russell S.R. & Associates Memphis, TN
38115
901.246-0159
http://spaces.msn.com/members/srussell/
Hey Chris,
FileInfo would require to give full file path.
that is C:...FileName.ext
hope this hellps.
Regards,
I think it is probably erroring out after the FileInfo constructor if
file is not a full path. I don't think it uses the current
directory.
Chris
__________________________________________________ Do
You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
YAHOO! GROUPS LINKS
|
[1-2]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|