file.move to unc causes error

Discussion in 'ASP .Net Security' started by Michael McLaughlin, Dec 28, 2004.

  1. 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, Dec 28, 2004
    #1
    1. Advertising

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

    <identity
    impersonate="true"
    />

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


    "Michael McLaughlin" <> wrote in
    message news:...
    > 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\), Dec 28, 2004
    #2
    1. Advertising

  3. 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: http://www.lennybacon.com/
    >
    >
    > "Michael McLaughlin" <> wrote in
    > message news:...
    > > 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, Dec 28, 2004
    #3
  4. Michael,
    Try putting :- <identity impersonate="true/> in your
    web.config..and see..
    If still gives an error POST IT.
    Patrick




    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Patrick Olurotimi Ige, Dec 28, 2004
    #4
  5. 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 http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
    >
     
    Michael McLaughlin, Dec 29, 2004
    #5
  6. Patrick Olurotimi Ige, Dec 29, 2004
    #6
    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. Xavier Osa
    Replies:
    0
    Views:
    663
    Xavier Osa
    Jan 9, 2004
  2. =?Utf-8?B?bXVzb3NkZXY=?=

    Move to vs2005 causes errors in external controls

    =?Utf-8?B?bXVzb3NkZXY=?=, Jan 9, 2006, in forum: ASP .Net
    Replies:
    11
    Views:
    3,162
    Yuan Ren[MSFT]
    Jan 13, 2006
  3. SR
    Replies:
    2
    Views:
    429
  4. Eduardo78
    Replies:
    0
    Views:
    278
    Eduardo78
    Nov 3, 2005
  5. Andrew Tomazos
    Replies:
    2
    Views:
    696
    Nobody
    Dec 12, 2011
Loading...

Share This Page