accessing remote resources from ASP.NET app

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

  1. #1

    Default 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 appreciate very much to have suggestions specific to
    my particular scenario.

    I have an ASP.NET application MYAPP running on machine MYMACH

    Such application needs to access a remote database MYDB and a remote
    Web Service MYSVC using the credentials of a specific Windows User
    MYMACH\MYUSER (i.e. a user local to MYMACH)

    The use of <identity impersonate="true"> in the Web.config file seems
    to fail for the reasons explained in other threads, i.e. impersonation
    only works for accessing resources local to MYMACH

    I would like to avoid using delegation and serviced components, since
    they seem quite complicated to set up.

    Similarly, I would like to avoid calling LogonUser() because it is a
    non-managed API and moreover other threads report that many users had
    problems using it.

    My question is then: how is it possible to get what I want (which
    seems very simple) in a simple way?
    And, if there is no such "simple way", what is the best way among
    delegation, serviced components, LogonUser() etc. etc.?

    Many thanks in advance!
    -Gianluca
    Gianluca Torta Guest

  2. Similar Questions and Discussions

    1. 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...
    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 remote MS Access DB thru IIS App
      Hi I have a VB 6 IIS Application running as a compiled DLL under IIS 5.0 on Win2K. It uses the ADO 2.5 library to give users OLEDB and ODBC...
    4. 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...
    5. 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...
  3. #2

    Default Re: accessing remote resources from ASP.NET app

    You could also disable impersonation and set up your process account to use
    an account that access the remote resource. Lots of people do that. The
    steps are different between IIS5 and 6, but the basic idea is the same.

    If you need impersonation at the same time, you can do some trickery by
    p/invoking RevertToSelf and then restoring the impersonated token when you
    are done with your remote call.

    Otherwise, I think COM+ is good if you don't mind writing a serviced
    component and dealing with all the COM stuff. LogonUser is easy on XP and
    2003, but has security restrictions on 2000 that make it much less
    attractive.

    HTH,

    Joe K.

    "Gianluca Torta" <giatorta@hotmail.com> wrote in message
    news:a2d601fc.0501121608.6983da75@posting.google.c om...
    > 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 appreciate very much to have suggestions specific to
    > my particular scenario.
    >
    > I have an ASP.NET application MYAPP running on machine MYMACH
    >
    > Such application needs to access a remote database MYDB and a remote
    > Web Service MYSVC using the credentials of a specific Windows User
    > MYMACH\MYUSER (i.e. a user local to MYMACH)
    >
    > The use of <identity impersonate="true"> in the Web.config file seems
    > to fail for the reasons explained in other threads, i.e. impersonation
    > only works for accessing resources local to MYMACH
    >
    > I would like to avoid using delegation and serviced components, since
    > they seem quite complicated to set up.
    >
    > Similarly, I would like to avoid calling LogonUser() because it is a
    > non-managed API and moreover other threads report that many users had
    > problems using it.
    >
    > My question is then: how is it possible to get what I want (which
    > seems very simple) in a simple way?
    > And, if there is no such "simple way", what is the best way among
    > delegation, serviced components, LogonUser() etc. etc.?
    >
    > Many thanks in advance!
    > -Gianluca

    Joe Kaplan \(MVP - ADSI\) Guest

  4. #3

    Default Re: accessing remote resources from ASP.NET app

    Joe, thank you very much for your reply
    > You could also disable impersonation and set up your process account to use
    > an account that access the remote resource. Lots of people do that. The
    > steps are different between IIS5 and 6, but the basic idea is the same.
    this solution (i.e. AVOID impersonation) would be very attractive PROVIDED I
    can run just one specific ASP.NET application as the specified account, and
    not ALL the ASP.NET applications on my machine (something that seems to
    happen, according to other threads, if you modify Machine.config)

    if it is possible to specify the account just for one specific ASP.NET
    application, could someone please point me to an article where the details on
    how to do it are discussed for both IIS5 and IIS6?

    thanks in advance,
    -Gianluca


    "Joe Kaplan (MVP - ADSI)" wrote:
    > You could also disable impersonation and set up your process account to use
    > an account that access the remote resource. Lots of people do that. The
    > steps are different between IIS5 and 6, but the basic idea is the same.
    >
    > If you need impersonation at the same time, you can do some trickery by
    > p/invoking RevertToSelf and then restoring the impersonated token when you
    > are done with your remote call.
    >
    > Otherwise, I think COM+ is good if you don't mind writing a serviced
    > component and dealing with all the COM stuff. LogonUser is easy on XP and
    > 2003, but has security restrictions on 2000 that make it much less
    > attractive.
    >
    > HTH,
    >
    > Joe K.
    >
    > "Gianluca Torta" <giatorta@hotmail.com> wrote in message
    > news:a2d601fc.0501121608.6983da75@posting.google.c om...
    > > 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 appreciate very much to have suggestions specific to
    > > my particular scenario.
    > >
    > > I have an ASP.NET application MYAPP running on machine MYMACH
    > >
    > > Such application needs to access a remote database MYDB and a remote
    > > Web Service MYSVC using the credentials of a specific Windows User
    > > MYMACH\MYUSER (i.e. a user local to MYMACH)
    > >
    > > The use of <identity impersonate="true"> in the Web.config file seems
    > > to fail for the reasons explained in other threads, i.e. impersonation
    > > only works for accessing resources local to MYMACH
    > >
    > > I would like to avoid using delegation and serviced components, since
    > > they seem quite complicated to set up.
    > >
    > > Similarly, I would like to avoid calling LogonUser() because it is a
    > > non-managed API and moreover other threads report that many users had
    > > problems using it.
    > >
    > > My question is then: how is it possible to get what I want (which
    > > seems very simple) in a simple way?
    > > And, if there is no such "simple way", what is the best way among
    > > delegation, serviced components, LogonUser() etc. etc.?
    > >
    > > Many thanks in advance!
    > > -Gianluca
    >
    >
    >
    Gianluca Torta Guest

  5. #4

    Default Re: accessing remote resources from ASP.NET app

    With IIS6, you set up an AppPool with a specific account and then make sure
    that only your application runs in that pool. Unfortunately, with IIS5, all
    the ASP.NET web apps run in one process (for the most part).

    I think a better solution for you in the case would be to create a COM+
    serviced component so that you can set it up to run under a specific
    identity. That could be installed on IIS5 or IIS6 and do what you want.

    Joe K.

    "Gianluca Torta" <Gianluca [email]Torta@discussions.microsoft.com[/email]> wrote in message
    news:8928F5FD-FE92-4E66-A533-4B55F2B828B8@microsoft.com...
    > Joe, thank you very much for your reply
    >
    >> You could also disable impersonation and set up your process account to
    >> use
    >> an account that access the remote resource. Lots of people do that. The
    >> steps are different between IIS5 and 6, but the basic idea is the same.
    >
    > this solution (i.e. AVOID impersonation) would be very attractive PROVIDED
    > I
    > can run just one specific ASP.NET application as the specified account,
    > and
    > not ALL the ASP.NET applications on my machine (something that seems to
    > happen, according to other threads, if you modify Machine.config)
    >
    > if it is possible to specify the account just for one specific ASP.NET
    > application, could someone please point me to an article where the details
    > on
    > how to do it are discussed for both IIS5 and IIS6?
    >
    > thanks in advance,
    > -Gianluca
    >
    >
    > "Joe Kaplan (MVP - ADSI)" wrote:
    >
    >> You could also disable impersonation and set up your process account to
    >> use
    >> an account that access the remote resource. Lots of people do that. The
    >> steps are different between IIS5 and 6, but the basic idea is the same.
    >>
    >> If you need impersonation at the same time, you can do some trickery by
    >> p/invoking RevertToSelf and then restoring the impersonated token when
    >> you
    >> are done with your remote call.
    >>
    >> Otherwise, I think COM+ is good if you don't mind writing a serviced
    >> component and dealing with all the COM stuff. LogonUser is easy on XP
    >> and
    >> 2003, but has security restrictions on 2000 that make it much less
    >> attractive.
    >>
    >> HTH,
    >>
    >> Joe K.
    >>
    >> "Gianluca Torta" <giatorta@hotmail.com> wrote in message
    >> news:a2d601fc.0501121608.6983da75@posting.google.c om...
    >> > 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 appreciate very much to have suggestions specific to
    >> > my particular scenario.
    >> >
    >> > I have an ASP.NET application MYAPP running on machine MYMACH
    >> >
    >> > Such application needs to access a remote database MYDB and a remote
    >> > Web Service MYSVC using the credentials of a specific Windows User
    >> > MYMACH\MYUSER (i.e. a user local to MYMACH)
    >> >
    >> > The use of <identity impersonate="true"> in the Web.config file seems
    >> > to fail for the reasons explained in other threads, i.e. impersonation
    >> > only works for accessing resources local to MYMACH
    >> >
    >> > I would like to avoid using delegation and serviced components, since
    >> > they seem quite complicated to set up.
    >> >
    >> > Similarly, I would like to avoid calling LogonUser() because it is a
    >> > non-managed API and moreover other threads report that many users had
    >> > problems using it.
    >> >
    >> > My question is then: how is it possible to get what I want (which
    >> > seems very simple) in a simple way?
    >> > And, if there is no such "simple way", what is the best way among
    >> > delegation, serviced components, LogonUser() etc. etc.?
    >> >
    >> > Many thanks in advance!
    >> > -Gianluca
    >>
    >>
    >>

    Joe Kaplan \(MVP - ADSI\) 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