Re: Access denied to file
From: Erik Porter [.NET MVP] (erikporter@mvps.org)
Date: 04/02/03
- Previous message: Dave Uphoff: "Access denied to file"
- In reply to: Dave Uphoff: "Access denied to file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: "Erik Porter [.NET MVP]" <erikporter@mvps.org> Date: Wed, 2 Apr 2003 01:27:07 -0500
giving write access to the folder for the ASPNET account should do it. It
will also need modify permissions if you'll be changing any files. write
access to a folder allows files to be created, so I'm not sure why it won't
work for you.
Erik Porter
Microsoft .NET MVP
http://www.windowsforms.net
"Dave Uphoff" <duphoff@dtron.com> wrote in message
news:000001c2f8d5$a97b2e60$3001280a@phx.gbl...
> I am getting an "access denied" to a file I am trying to
> create in a Web form using C#. The instruction is:
> FileStream fs1 = new FileStream(filename1,
> FileMode.Create, FileAccess.Write, FileShare.Write);
>
> The error instructions are:
> To grant ASP.NET write access to a file, right-click the
> file in Explorer, choose "Properties" and select the
> Security tab. Click "Add" to add the "{machinename}
> \ASPNET" user. Highlight the ASP.NET account, and check
> the Write box in the Allow column.
>
> I have tried to give write permission to the directory
> but how do you give write permission to a file that
> doesn't exist? Does anyone know what the problem is?
> Dave Uphoff
>
>
>
>
- Previous message: Dave Uphoff: "Access denied to file"
- In reply to: Dave Uphoff: "Access denied to file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|