"Mark Rae [MVP]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> "tshad" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>
>> I am trying to write from the server to a shared drive which we have set
>> as an H: drive.
>>
>> When I run my web page from my local machine (VS) it writes correctly to
>> the H: drive.
>>
>> But when I run it off the Server (which also has access to the H: drive
>> it says it can't find it.
>
> I've already explained this...
>
But I had already sent this before I saw your explanation.
> It works on your local machine because your local machine has the shared
> folder in question mapped as a network drive. To get this to work on the
> webserver, you will either have to create the same mapped network share,
> or reference the folder explicitly via its UNC path...
Also, as mentioned, my server has the same mapping:
H:/
Which as a folder Share which has a folder Reports.
And I access the drive like:
fs = new FileStream(fileName, FileMode.Create,
FileAccess.ReadWrite);
csvFileWriter = new StreamWriter(fs);
Where fileName is:
fileNameOut = @"H:\SHARE\Reports\file.csv;
So you are saying my server code should be able to write to this share as
long as the Server has access?
I just went on the Server, accessed the folder from Windows Explorer and put
a folder and a file in it and it worked fine - so the permissions are there.
H:\SHARE\Reports
Thanks,
Tom
>
>
> --
> Mark Rae
> ASP.NET MVP
> http://www.markrae.net