How to allow my Web Application access a network resource?

Discussion in 'ASP .Net Security' started by Q. John Chen, Aug 2, 2004.

  1. Q. John Chen

    Q. John Chen Guest

    All,

    I have an ASP.NET application (with FormAuthentication but it
    shouldn't matter because I may allow unauthenticated user also).

    I want to read a file on a network drive so user can download the
    file.

    What is the best way to achieve this?

    Thanks

    John
     
    Q. John Chen, Aug 2, 2004
    #1
    1. Advertising

  2. Q. John Chen

    Raterus Guest

    well the "best" way could be debated about here....here are most of your options

    add this to web.config (look up asp.net impersonation for more details)

    <identity impersonate="true" userName="DOMAIN\userwithpermissionstoaccessfile" password="blahblah" />

    or you can impersonate via code from this article (look at second option)
    http://support.microsoft.com/default.aspx?scid=kb;en-us;306158

    or, if IIS runs under a domain account that has permissions you can just do this, and avoid the cleartext password issue

    <identity impersonate="true" />

    Good luck!
    --Michael

    "Q. John Chen" <> wrote in message news:...
    > All,
    >
    > I have an ASP.NET application (with FormAuthentication but it
    > shouldn't matter because I may allow unauthenticated user also).
    >
    > I want to read a file on a network drive so user can download the
    > file.
    >
    > What is the best way to achieve this?
    >
    > Thanks
    >
    > John
     
    Raterus, Aug 2, 2004
    #2
    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. Rea Peleg
    Replies:
    1
    Views:
    455
    Scott Allen
    Aug 7, 2004
  2. Jeff
    Replies:
    2
    Views:
    971
    clintonG
    Sep 19, 2006
  3. Heinrich Moser
    Replies:
    1
    Views:
    467
    Heinrich Moser
    Mar 27, 2008
  4. Rea Peleg
    Replies:
    0
    Views:
    116
    Rea Peleg
    Aug 7, 2004
  5. Ryan Taylor
    Replies:
    1
    Views:
    702
    Ryan Taylor
    Sep 9, 2004
Loading...

Share This Page