Help with share path on server...

T

Trint Smith

If my local path for doing 'streamwrite' is
'd:\inetput\wwwroot\webproject1', when I upload it to the host server
and my webprojects root is 'e:\web\tribidzcom0\htdocs' how would I put
that in this so that it writes temp files to the servers drive?:
Dim sw As StreamWriter
sw = New StreamWriter("e:\web\tribidzcom0\htdocs\temp", True).

Any help is appreciated.
Thanks,
Trint



..Net programmer
(e-mail address removed)
 
K

Kevin Spencer

Assuming that the folder is somewhere in your web site, use the
Server.MapPath() method, which takes a relative URL and returns an absolute
file path. However, be advised that your hosting service isn't likely to
allow your app to write files to their system.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
T

Trint Smith

I've already asked them because I have to create results.html files and
that is when they gave me the "e:\web\tribidzcom0\htdocs" as the root
for my website.
Can you give me an example of what this should look like with
Server.MapPath() ?
sw = New StreamWriter("e:\web\tribidzcom0\htdocs\tempfiles", True)
Thanks,
Trint
..Net programmer
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top