Unable to access folders across two servers.

Discussion in 'ASP .Net' started by Neeba, Dec 17, 2007.

  1. Neeba

    Neeba Guest

    Scenario :

    1. The Department files to be accessed are present in the File server.
    2. The Code is present in a different server with OS being Windows Server
    2003.
    3. Access to File server happens using ADS Authentication.
    4. Code is developed in ASP.NET using VB.NET. (Web.Config file settings are
    based on ADS Login; Authentication=Windows ; )
    5. Requirement is to display folders and files in a treeview structure.
    [Built in functions like GetDirectories and GetFiles returns nothing and
    functions related to Kernel Programming like (Private Declare Function
    FindFirstFile Lib "kernel32" Alias "FindFirstFileA" (ByVal lpFileName As
    String, ByRef lpFindFileData As WIN32_FIND_DATA) As Integer— Returns -1 )]
    when executed from Windows Server 2003.
    6. The same code works fine without any issues when run locally from an XP
    machine.
     
    Neeba, Dec 17, 2007
    #1
    1. Advertisements

  2. Hello Neeba,

    It happens because on Win2k u are using IIS6, which blocks calls to filesystem
    by default - NETWORK SERVICE account restriction
    when u run this app under WinXP u are running in IIS5, which allows calls
    to filesystem

    Solution:
    1) grad permition to access filesystem for NETWORK SERVICE, or create special
    use (recomended)
    2) use IIS5 isolation mode settings in IIS6

    ---
    WBR,
    Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

    "The greatest danger for most of us is not that our aim is too high and we
    miss it, but that it is too low and we reach it" (c) Michelangelo


    N> Scenario :
    N>
    N> 1. The Department files to be accessed are present in the File
    N> server.
    N> 2. The Code is present in a different server with OS being Windows
    N> Server
    N> 2003.
    N> 3. Access to File server happens using ADS Authentication.
    N> 4. Code is developed in ASP.NET using VB.NET. (Web.Config file
    N> settings are
    N> based on ADS Login; Authentication=Windows ; )
    N> 5. Requirement is to display folders and files in a treeview
    N> structure.
    N> [Built in functions like GetDirectories and GetFiles returns nothing
    N> and
    N> functions related to Kernel Programming like (Private Declare
    N> Function
    N> FindFirstFile Lib "kernel32" Alias "FindFirstFileA" (ByVal lpFileName
    N> As
    N> String, ByRef lpFindFileData As WIN32_FIND_DATA) As Integer—
    N> Returns -1 )]
    N> when executed from Windows Server 2003.
    N> 6. The same code works fine without any issues when run locally from
    N> an XP
    N> machine.
     
    Michael Nemtsev [MVP], Dec 17, 2007
    #2
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.