file.move to unc causes error

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

  1. #1

    Default file.move to unc causes error

    Hello I also posted this message under dotnet.security.

    What I have is a web application that shows the user their files in a
    protected location. The user can then select a file and move it to another
    server over unc. The user is logged in via windows basic authentication with
    their domain credentials and the site is ssl encrypted. When the file.move
    command executes it generates an error which I am sure is based on ntfs
    access denied. When I take a look at the request.ServerVariables("AUTH_USER")
    it shows my user. I am sure this is an impersonation issue, can anyone point
    me in the right direction?

    foldername = "c:\path\folder"
    mpf = "\\server\share\path"
    file.Move(foldername & "\" & CStr(DropDownList1.SelectedItem.Text), Mpf &
    "\" & CStr(DropDownList1.SelectedItem.Text))

    Michael McLaughlin Guest

  2. Similar Questions and Discussions

    1. Move a file
      I am writing a script which will poll a directory and then move any files in the directory to a new directory dependant upon its name. The...
    2. Move pages inside the PDF file
      I am tryinn to relocate several pages inside the same PDF file. Some TIPs say I can do it by moving Page Thumbnails. However there is no Page...
    3. Move on open file - not updated
      Folks: I have a file open. I use the File panel to move that file. The open file is not updated to reflect this move, but the closed one is. ...
    4. #25977 [Opn->Bgs]: fopen('file', 'r'); doesn't move to the end of the file
      ID: 25977 Updated by: sniper@php.net Reported By: nightstorm at tlen dot pl -Status: Open +Status: ...
    5. #25977 [NEW]: fopen('file', 'r'); doesn't move to the end of the file
      From: nightstorm at tlen dot pl Operating system: Windows XP PHP version: 5CVS-2003-10-24 (dev) PHP Bug Type: Filesystem...
  3. #2

    Default Re: file.move to unc causes error

    do you have something like this in your web.config ?

    <identity
    impersonate="true"
    />

    --
    Daniel Fisher(lennybacon)
    MCP ASP.NET C#
    Blog: [url]http://www.lennybacon.com/[/url]


    "Michael McLaughlin" <MichaelMcLaughlin@discussions.microsoft.com> wrote in
    message news:226E5AA9-A9EA-4BF1-949A-FFB55C2A5EB7@microsoft.com...
    > Hello I also posted this message under dotnet.security.
    >
    > What I have is a web application that shows the user their files in a
    > protected location. The user can then select a file and move it to another
    > server over unc. The user is logged in via windows basic authentication
    > with
    > their domain credentials and the site is ssl encrypted. When the file.move
    > command executes it generates an error which I am sure is based on ntfs
    > access denied. When I take a look at the
    > request.ServerVariables("AUTH_USER")
    > it shows my user. I am sure this is an impersonation issue, can anyone
    > point
    > me in the right direction?
    >
    > foldername = "c:\path\folder"
    > mpf = "\\server\share\path"
    > file.Move(foldername & "\" & CStr(DropDownList1.SelectedItem.Text), Mpf &
    > "\" & CStr(DropDownList1.SelectedItem.Text))
    >

    Daniel Fisher\(lennybacon\) Guest

  4. #3

    Default Re: file.move to unc causes error

    NO I do not.

    "Daniel Fisher(lennybacon)" wrote:
    > do you have something like this in your web.config ?
    >
    > <identity
    > impersonate="true"
    > />
    >
    > --
    > Daniel Fisher(lennybacon)
    > MCP ASP.NET C#
    > Blog: [url]http://www.lennybacon.com/[/url]
    >
    >
    > "Michael McLaughlin" <MichaelMcLaughlin@discussions.microsoft.com> wrote in
    > message news:226E5AA9-A9EA-4BF1-949A-FFB55C2A5EB7@microsoft.com...
    > > Hello I also posted this message under dotnet.security.
    > >
    > > What I have is a web application that shows the user their files in a
    > > protected location. The user can then select a file and move it to another
    > > server over unc. The user is logged in via windows basic authentication
    > > with
    > > their domain credentials and the site is ssl encrypted. When the file.move
    > > command executes it generates an error which I am sure is based on ntfs
    > > access denied. When I take a look at the
    > > request.ServerVariables("AUTH_USER")
    > > it shows my user. I am sure this is an impersonation issue, can anyone
    > > point
    > > me in the right direction?
    > >
    > > foldername = "c:\path\folder"
    > > mpf = "\\server\share\path"
    > > file.Move(foldername & "\" & CStr(DropDownList1.SelectedItem.Text), Mpf &
    > > "\" & CStr(DropDownList1.SelectedItem.Text))
    > >
    >
    >
    >
    Michael McLaughlin Guest

  5. #4

    Default Re: file.move to unc causes error

    Michael,
    Try putting :- <identity impersonate="true/> in your
    web.config..and see..
    If still gives an error POST IT.
    Patrick




    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Patrick Olurotimi Ige Guest

  6. #5

    Default Re: file.move to unc causes error

    Oh heck it worked. Is there a practical guide on Impersonation that you would
    recommend?

    Michael McLaughlin

    "Patrick Olurotimi Ige" wrote:
    > Michael,
    > Try putting :- <identity impersonate="true/> in your
    > web.config..and see..
    > If still gives an error POST IT.
    > Patrick
    >
    >
    >
    >
    > *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    > Don't just participate in USENET...get rewarded for it!
    >
    Michael McLaughlin Guest

  7. #6

    Default Re: file.move to unc causes error

    Hi Michael..Nice to hear it did the TRICK.
    Try reading through :-
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetse[/url]
    c/html/secnetlpMSDN.asp

    or

    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetse[/url]
    c/html/SecNetAP05.asp

    Hope it helps..
    Patrick


    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Patrick Olurotimi Ige 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