Accessing remote network resources from ASP.NET applications

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default Accessing remote network resources from ASP.NET applications

    Hi All

    Sorry to bring up a beaten-down-to-death topic. But I seem to be
    running into a wall whatever I try here. To cut a long story short, I
    have an ASP.NET application that tries to move a file from box A to
    box B. Box A and B are in the same domain. My security settings are
    like this:

    * The site's virt directory is configured for anonymous access with a
    specified domain user and password (not IUSR_machinename) -- IOW, IIS
    does not control the password.
    * My web.config has authentication mode as "none" and impersonate as
    "true" (non-user-specific).
    <authentication mode="None" />
    <identity impersonate="true" />

    The domain\user specified in the anonymous access settings in IIS has
    the rights to access the remote machine's folder location (full
    access). FWIW, This particular folder on Box B is mapped as a shared
    drive in Box A.

    My call to FileInfo.MoveTo(destination_in_box_b) repeatedly fails with
    DirectoryNotFoundException.

    Can someone _please_ help me out here?

    thanks
    --Dilip
    Dilip Guest

  2. Similar Questions and Discussions

    1. accessing remote resources from ASP.NET app
      Hi all, I know this issue has already been discussed in several threads of the newsgroup and I read several of them However, I would...
    2. Accessing ISAM resources from within a WebService
      Hi there, I have a stub which extracts contacts from Outlook, using the Jet OLEDB provider. It looks like this: public DataSet...
    3. accessing network resources from Flash
      I built a static site with a flash front end and no back end. It allows e-learning students to click a link to their course on-line. The LCMS...
    4. Help with accessing network resources
      Simply, I wish to return System.IO.File.Exists ("\\myserver_1\myshare\myfolder\myfile.doc") within an ASP.NET web application that sits on...
    5. Access network resources from ASP.NET
      Hi! after extensive research of this topic, I'm still not sure what is "official" way to do it. Task: 1. User submits some request to...
  3. #2

    Default Re: Accessing remote network resources from ASP.NET applications

    Hi,

    I don't think this is an impersonation or authentication problem. I think
    the problem is your use of mapped drive letters. A drive letter is mapped
    for the logged on user only. So whatever user account you used to map the
    drive letter to a share on ServerA is the only account that can see that
    mapping. Any other user does not see it.

    Instead of using mapped drive letters, use UNC paths (\\server\share)
    instead, since all users can see that. If you are correct about how you've
    setup your Domain account, and the permissions, everything should work then.

    Cheers
    Ken

    "Dilip" <rdilipk@lycos.com> wrote in message
    news:8bc3089c.0404121437.1e9cb35a@posting.google.c om...
    : Hi All
    :
    : Sorry to bring up a beaten-down-to-death topic. But I seem to be
    : running into a wall whatever I try here. To cut a long story short, I
    : have an ASP.NET application that tries to move a file from box A to
    : box B. Box A and B are in the same domain. My security settings are
    : like this:
    :
    : * The site's virt directory is configured for anonymous access with a
    : specified domain user and password (not IUSR_machinename) -- IOW, IIS
    : does not control the password.
    : * My web.config has authentication mode as "none" and impersonate as
    : "true" (non-user-specific).
    : <authentication mode="None" />
    : <identity impersonate="true" />
    :
    : The domain\user specified in the anonymous access settings in IIS has
    : the rights to access the remote machine's folder location (full
    : access). FWIW, This particular folder on Box B is mapped as a shared
    : drive in Box A.
    :
    : My call to FileInfo.MoveTo(destination_in_box_b) repeatedly fails with
    : DirectoryNotFoundException.
    :
    : Can someone _please_ help me out here?
    :
    : thanks
    : --Dilip


    Ken Schaefer Guest

  4. #3

    Default Re: Accessing remote network resources from ASP.NET applications

    Hi Ken

    "Ken Schaefer" <kenREMOVE@THISadOpenStatic.com> wrote in message
    > I don't think this is an impersonation or authentication problem. I think
    > the problem is your use of mapped drive letters. A drive letter is mapped
    > for the logged on user only. So whatever user account you used to map the
    > drive letter to a share on ServerA is the only account that can see that
    > mapping. Any other user does not see it.
    I knew this -- now my question is does this hold true even if I
    impersonate the same user using which I created my drive mappings?
    Thats what is happening in my case. I created the drive mappings
    using "domain\user1" and that is the same user I am asking IIS to
    authenticate in the anonymous user settings.

    Or maybe I should implement LogonUser and start a new login session
    with a interactive logon type and *then* execute the file move?

    Its pretty easy to switch to UNC names but the thing is this code used
    to work just 2 days ago and all of a sudden stopped working (don't ask
    me why.. I have no idea!)

    thanks
    --Dilip
    Dilip Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139