What is the equivalent to writing to the server?

T

Trint Smith

Ok, I know this is for local:
Dim sw As StreamWriter
sw = New StreamWriter("D:\files\text.txt", True)
What can I use to do the same write to the same directory, except on the
server please?
Thanks,
Trint

.Net programmer
(e-mail address removed)
 
J

Jan Tielens

Sure,make sure you've shared a directory on the server and you have
sufficient rights to write on that share/directory:

sw = New StreamWriter("\\ServerName\ShareName\text.txt", True)
 
H

Herfried K. Wagner [MVP]

* Trint Smith said:
Ok, I know this is for local:
Dim sw As StreamWriter
sw = New StreamWriter("D:\files\text.txt", True)
What can I use to do the same write to the same directory, except on the
server please?

How do you have access to the "server"?
 
C

Cor

Hi Trint,

Do you mean with "except on the server" that you want to write it on the
client computer?

Cor
 
T

Trint Smith

Want to write it on the server...currently I'm writing it on my local
computer.

.Net programmer
(e-mail address removed)
 
C

Cor

Hi Trint,

But I asume you are witing with a webpage as usual, so why would this not
work on the server?

Cor
 
T

Trint Smith

I just tested this and it does work on the server:
sw = New StreamWriter("\\ServerName\ShareName\text.txt", True)
This writes to the local computer:
sw = New StreamWriter("d:\files\text.txt", 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

Top