Windows authentication with impersonation - network resource access fails

Discussion in 'ASP .Net Security' started by Dominick Baier [DevelopMentor], Mar 18, 2005.

  1. this has nothing (at least primarily) to do with impersonation -

    a Response.Redirect sends a "moved" message to the browser - and gives him the new location of the file, in your case the browser tries to open the file "//networkPath/folder1/subFolder1/fileName" - is this reachable from the client??

    in IIS you can map virtual directories to network locations, e.g. the vdir "/share" could point to "//networkPath/folder1/subFolder1" - so a Response.Redirect to "/share/fileName" would work.

    give that a try.



    ---
    Dominick Baier - DevelopMentor
    http://www.leastprivilege.com

    nntp://news.microsoft.com/microsoft.public.dotnet.framework.aspnet.security/<>

    Hi,

    I have a question regd. Windows authentication and network file access.
    My asp.net application doesn't use any of the .NET's authentication schemes
    (Forms, Windows or Passport) yet.
    I have a login page where the users would supply their credentials and the
    business logic compares these

    credentials against SQLServer database and allows/denies access to the
    website.
    So far so good.

    But now, my application needs to access some files located on the Domain
    network.
    The first thing that came in my mind is Impersonation.

    I did change my web.config file to use Windows authentication as follows...

    <authentication mode="Windows" />

    <authorization>
    <allow users="*" />
    </authorization>

    <identity impersonate="true"
    userName="domainName\loginID"
    password="password"
    />

    This "domainName\loginID" account HAS full rights over the network resource.

    Now I have UNCHECKED Allow Anonymous Access in IIS.

    But I still cannot access the file on the network.

    It errors out at the Response.Redirect
    ("//networkPath/folder1/subFolder1/fileName");
    as Page cannot be displayed.

    I have checked the User.Identity.Name and it looks correct (domainName\
    loginID)
    Even the User.Identity.AuthenticationType is good (NTLM)

    I'm surely missing something critical.

    Any help in this regards is greatly appreciated.

    Thanks in advance,
    Srivalli.

    --
    Message posted via http://www.dotnetmonster.com

    [microsoft.public.dotnet.framework.aspnet.security]
     
    Dominick Baier [DevelopMentor], Mar 18, 2005
    #1
    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. =?Utf-8?B?ZGlub28=?=

    Urgent - Windows Service Network Resource Access Issue

    =?Utf-8?B?ZGlub28=?=, Aug 10, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    564
    =?Utf-8?B?ZGlub28=?=
    Aug 10, 2006
  2. quintesv via DotNetMonster.com

    Accessing a network resource/file fails thru asp.net and interop dll

    quintesv via DotNetMonster.com, Oct 24, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    364
    xAvailx
    Oct 24, 2006
  3. Heinrich Moser
    Replies:
    1
    Views:
    480
    Heinrich Moser
    Mar 27, 2008
  4. benny
    Replies:
    1
    Views:
    394
    Jim Cheshire [MSFT]
    Jul 16, 2004
  5. Replies:
    3
    Views:
    188
    Joe Kaplan \(MVP - ADSI\)
    Mar 10, 2006
Loading...

Share This Page