Mark Rae said:
Forget that completely. It only works on your machine because your machine
has a drive mapping to the server share.
But the server where IIS is located also has the same share set up as H:
(all the machines have it set up this way).
If you absolutely need to use remote resources, then you will need to open
them with the System.IO namespace and then stream them to the client via a
MIME type which the client browser will understand...
How would I do that?
At the moment, my code does:
fs = new FileStream(fileName, FileMode.Create,
FileAccess.ReadWrite);
csvFileWriter = new StreamWriter(fs);
Where fileName is:
fileNameOut = @"H:\SHARE\Reports\" +
Path.GetFileNameWithoutExtension(((Label)GridView1.Rows[1].FindControl("lblFileName")).Text)
+
"_Discrepancies.csv";
You are saying I can't do this, right?
H:\SHARE is acessible to all the company and all have read and write
permission.
So how would I change this to do the MIME business?
What about putting the folder inside the web app?
Would that work?
What about accessing the file from the Share (if I could write to it). I
did that to solve the SaveFileDialog problem where I would click the link
and it would allow me to open it (via excel) or save it to my system using
the following as my link:
<a
href=file:///H:/SHARE/Reports/148_010309_033109_Discrep.csv>148_010309_033109_Discrep.csv</a>
Again this works fin from my machine.
Thanks,
Tom