File I/O on a network drive from asp.net

Discussion in 'ASP .Net' started by Kim Kragh, Feb 2, 2004.

  1. Kim Kragh

    Kim Kragh Guest

    Hi.

    I've tried to save, move files from asp.net (using the FileInfo object). It
    works fine locally, but I can't make it work on network drives. I have
    granted the aspnet user all required permissions, but still with no luck.

    Should I tweak something else (policy or app setting)?
    Can I access a NAS box running Storage Server 2003 as an active directory
    user?

    Thanks in advance!
     
    Kim Kragh, Feb 2, 2004
    #1
    1. Advertising

  2. Kim Kragh

    Curt_C [MVP] Guest

    how are you accessing these network drives... hopefully not with a map/drive
    letter. User UNC

    --
    Curt Christianson
    Owner/Lead Developer, DF-Software
    www.Darkfalz.com


    "Kim Kragh" <> wrote in message
    news:...
    > Hi.
    >
    > I've tried to save, move files from asp.net (using the FileInfo object).

    It
    > works fine locally, but I can't make it work on network drives. I have
    > granted the aspnet user all required permissions, but still with no luck.
    >
    > Should I tweak something else (policy or app setting)?
    > Can I access a NAS box running Storage Server 2003 as an active directory
    > user?
    >
    > Thanks in advance!
    >
    >
     
    Curt_C [MVP], Feb 2, 2004
    #2
    1. Advertising

  3. Kim
    Granting permission to ASPNET user on a network machine will not help you. It only applies to your local machine. You have to get a domain account who has permissions to write to the directory on the network. For testing sake you can always use your account if your account has write permissions on the directory

    HTH
    Suresh

    ----- Kim Kragh wrote: ----

    Hi

    I've tried to save, move files from asp.net (using the FileInfo object). I
    works fine locally, but I can't make it work on network drives. I hav
    granted the aspnet user all required permissions, but still with no luck

    Should I tweak something else (policy or app setting)
    Can I access a NAS box running Storage Server 2003 as an active director
    user

    Thanks in advance
     
    =?Utf-8?B?U3VyZXNo?=, Feb 2, 2004
    #3
  4. Kim Kragh

    Karun Guest

    The ASPNET account is very restricted in terms of resources it can
    access. It cannot, by default, access network drives. See this link
    for more info:

    http://support.microsoft.com/default.aspx?scid=kb;en-us;317012

    "Kim Kragh" <> wrote in message news:<>...
    > Hi.
    >
    > I've tried to save, move files from asp.net (using the FileInfo object). It
    > works fine locally, but I can't make it work on network drives. I have
    > granted the aspnet user all required permissions, but still with no luck.
    >
    > Should I tweak something else (policy or app setting)?
    > Can I access a NAS box running Storage Server 2003 as an active directory
    > user?
    >
    > Thanks in advance!
     
    Karun, Feb 2, 2004
    #4
  5. Hi Kim,

    By default, ASP.NET is running with ASPNET. It is a local account and, by
    default, has no access to network resources. The actual account with which
    your request is processed is determined by the ASP.NET worker process
    settings in machine.config and virtual directory security settings in IIS
    manager console.

    Check the virutal directory security setting in IIS manager console. What
    type of authentication you use? Did you enable impersonation in the
    web.config file of the asp.net web application? You can take a look at the
    following article for more information about ASP.NET impersonation:

    306158 INFO: Implementing Impersonation in an ASP.NET Application
    http://support.microsoft.com/?id=306158

    You can use the Token Dump component from the MSDN magazine article to
    check the token dump information in detail. It can give a clear view of how
    ASP.NET security model works :

    ASP .NET Security Issues (by Keith Brown)
    http://msdn.microsoft.com/msdnmag/issues/01/11/security/default.aspx

    Regards,

    Felix Wu
    =============
    This posting is provided "AS IS" with no warranties, and confers no rights.


    --------------------
    >From: "Kim Kragh" <>
    >Subject: File I/O on a network drive from asp.net
    >Date: Mon, 2 Feb 2004 12:41:15 +0100
    >Lines: 13
    >X-Priority: 3
    >X-MSMail-Priority: Normal
    >X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
    >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
    >Message-ID: <>
    >Newsgroups: microsoft.public.dotnet.framework.aspnet
    >NNTP-Posting-Host: 195.41.222.129
    >Path:

    cpmsftngxa07.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11.
    phx.gbl
    >Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.framework.aspnet:206876
    >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
    >
    >Hi.
    >
    >I've tried to save, move files from asp.net (using the FileInfo object). It
    >works fine locally, but I can't make it work on network drives. I have
    >granted the aspnet user all required permissions, but still with no luck.
    >
    >Should I tweak something else (policy or app setting)?
    >Can I access a NAS box running Storage Server 2003 as an active directory
    >user?
    >
    >Thanks in advance!
    >
    >
    >
     
    Felix Wu [MSFT], Feb 3, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jon
    Replies:
    5
    Views:
    11,188
    Scott M.
    Jan 17, 2010
  2. Michal Valent
    Replies:
    2
    Views:
    1,071
    =?Utf-8?B?cmVpbmhhcmQ=?=
    Nov 27, 2003
  3. Replies:
    1
    Views:
    1,111
    =?Utf-8?B?Q3VydF9DIFtNVlBd?=
    Oct 19, 2005
  4. shailesh
    Replies:
    1
    Views:
    796
    Tim Golden
    Mar 28, 2007
  5. king
    Replies:
    1
    Views:
    286
Loading...

Share This Page