If you do this in code, then you will need to use FileStream and BinaryWriter objects.
Something like that;
FileStream filestream = new FileStream("myfile.txt", FileMode.Open); BinaryReader br = new BinaryReader(filestream); String msg = br.ReadString(); br.Close(); filestream.Close(); FileStream networkStream = new FileStream(@"\\server\share\file.txt", FileMode.Create); BinaryWriter bw = new BinaryWriter(filestream); bw.Write(msg); bw.Close(); networkStream.Close();
If you pass it through Javascript, perhaps using the HTML view button, then you will need to do the same, but you will get a stream of files from the message form request.
You may have trouble writing to a network location, if you are using IIS, then you can configure the virtual directory and set the credentials in IIS. An alternative is that you will need to do an impersonation in order to write the file to a network server.
Mike
source share