Re: Access denied to file

From: Erik Porter [.NET MVP] (erikporter@mvps.org)
Date: 04/02/03

  • Next message: Andreas Claudi: "Identity of called assemblies"
    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
    >
    >
    >
    >


  • Next message: Andreas Claudi: "Identity of called assemblies"

    Relevant Pages

    • Re: ASPNET User Problem in Shared Hosting Environment
      ... each user with their own application on the server. ... and give that user RWXD permission to it's web root folder. ... the ASPNET account needs Read permission to ...
      (microsoft.public.dotnet.framework.aspnet.security)
    • Re: creating folders with asp.net
      ... Right-click a folder where you want ASPNET account to have write permission, choose "Properties" and then Security tab, add the account into user account list, and then set proper permissions to the account. ...
      (microsoft.public.dotnet.languages.csharp)
    • Re: Network shares cannot connect
      ... Changed value to 0 just waiting to re-boot the server and test logins. ... Workstation Name: - ... let's focus on the Users Shared Folder first. ... To check this permission, please click the Advanced button, select ...
      (microsoft.public.windows.server.sbs)
    • Re: Network shares cannot connect
      ... Changed value to 0 just waiting to re-boot the server and test logins. ... Workstation Name: - ... let's focus on the Users Shared Folder first. ... To check this permission, please click the Advanced button, select ...
      (microsoft.public.windows.server.sbs)
    • MCSA/MCSE Self-training book from MS PRESS for exam 70-215 incorrect on file permission questions?
      ... includes the AccountingDept folder, which contains documents specific to the ... accounting department. ... The Accounting group includes all members of the ... AccountingDept folder by granting Read permission to the Accounting group ...
      (microsoft.public.win2000.file_system)