Serviced Component runs under ASPNET, not specified account

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

  1. #1

    Default Serviced Component runs under ASPNET, not specified account

    Cross posting since I had no reply yet from
    microsoft.public.dotnet.framework.component_servic es

    Hi all,

    I have an ASP.NET app and a Serviced Component that runs within a COM+
    app

    the Serviced Component is intended to access a remote database with an
    identity that is NOT <MACHINE>\ASPNET but an account MYDOMAIN\MYUSER
    that actually can access the remote database

    the COM+ app has been configured to RUN AS SERVER and I have specified
    in the identity tab that the app should run as MYDOMAIN\MYUSER

    however, when I open my ASP.NET app and click on the button which
    makes the call to the Serviced Component, I can see from SQL Server
    Profiler that the user which tried to access the remote DB is
    <MACHINE>\ASPNET

    for some reason, the COM+ app is not running as the account that I
    specify in the Identity tab but as the caller (which in this case is
    <MACHINE>\ASPNET)

    I guess I have some configuration problem, but I really couldn't
    figure out what it is:
    - I correctly wrote my Serviced Component
    - I strongly named the assembly .DLL produced by compiling the
    component
    - I registered the component with regsvcs.exe
    - my ASP.NET application references the DLL that has been strongly
    named

    Any suggestions would be welcome!

    Thanks in advance,
    -Gianluca Torta
    Gianluca Torta Guest

  2. Similar Questions and Discussions

    1. Using LogonUser API in ASP.net with an account other than ASPNet account
      I am trying to use the LogonUser API function from ASP.Net. This works fine on my machine which is Windows XP but fails with error code 1314 on...
    2. ASPNET Account
      I needed to go to my user accounts when I discovered this aspnet machine account.I didn't know where it came from so I deleted the account. Now I...
    3. ASPNET Account not created
      I am running Windows XP Pro, I have IIS installed and I am developing an asp.net application (VS2002). I didn't have an ASPNET account (system came...
    4. Serviced Component Calling a Web Service Problem
      I have made a Serviced Component (.Net Component that uses COM+) that calls a Web Services, located in another machine The Serviced Component is...
    5. The password for the ASPNET account
      this set the account aspnet_wp.exe will run under, and thus the default account for all asp.net pages. you have three options 1) use the local...
  3. #2

    Default Re: Serviced Component runs under ASPNET, not specified account

    If you are using Windows Server 2003, you can configure an application pool
    to be run as a user account of your choice. You can then assign your web
    application to the application pool. Then check to see what account is being
    used on your database.

    In ASP.NET you might also try to configure impersonation in web.config:
    <identity impersonate="true" userName="DOMAIN\databaseuser"
    password="123456" />

    This article describes a method for accessing resources on a server using a
    copied ASPNET account:
    [url]http://weblogs.asp.net/mschwarz/archive/2003/03/31/4515.aspx[/url]
    Perhaps you can use it for accessing your database?

    HTH,
    Svein Terje Gaup

    "Gianluca Torta" <giatorta@gmail.com> wrote in message
    news:21efe956.0501241104.21a525c6@posting.google.c om...
    > Cross posting since I had no reply yet from
    > microsoft.public.dotnet.framework.component_servic es
    >
    > Hi all,
    >
    > I have an ASP.NET app and a Serviced Component that runs within a COM+
    > app
    >
    > the Serviced Component is intended to access a remote database with an
    > identity that is NOT <MACHINE>\ASPNET but an account MYDOMAIN\MYUSER
    > that actually can access the remote database
    >
    > the COM+ app has been configured to RUN AS SERVER and I have specified
    > in the identity tab that the app should run as MYDOMAIN\MYUSER
    >
    > however, when I open my ASP.NET app and click on the button which
    > makes the call to the Serviced Component, I can see from SQL Server
    > Profiler that the user which tried to access the remote DB is
    > <MACHINE>\ASPNET
    >
    > for some reason, the COM+ app is not running as the account that I
    > specify in the Identity tab but as the caller (which in this case is
    > <MACHINE>\ASPNET)
    >
    > I guess I have some configuration problem, but I really couldn't
    > figure out what it is:
    > - I correctly wrote my Serviced Component
    > - I strongly named the assembly .DLL produced by compiling the
    > component
    > - I registered the component with regsvcs.exe
    > - my ASP.NET application references the DLL that has been strongly
    > named
    >
    > Any suggestions would be welcome!
    >
    > Thanks in advance,
    > -Gianluca Torta

    Svein Terje Gaup Guest

  4. #3

    Default Re: Serviced Component runs under ASPNET, not specified account

    Dear Svein, thank you for your reply.

    Unfortunately the requirements I have make the Serviced Component the best
    way to obtain my goals (see thread "accessing remote resources from ASP.NET
    app").

    So my problem is now how to make my Serviced Component to run with identity
    "MYDOMAIN\MYUSER"

    -Gianluca

    "Svein Terje Gaup" wrote:
    > If you are using Windows Server 2003, you can configure an application pool
    > to be run as a user account of your choice. You can then assign your web
    > application to the application pool. Then check to see what account is being
    > used on your database.
    >
    > In ASP.NET you might also try to configure impersonation in web.config:
    > <identity impersonate="true" userName="DOMAIN\databaseuser"
    > password="123456" />
    >
    > This article describes a method for accessing resources on a server using a
    > copied ASPNET account:
    > [url]http://weblogs.asp.net/mschwarz/archive/2003/03/31/4515.aspx[/url]
    > Perhaps you can use it for accessing your database?
    >
    > HTH,
    > Svein Terje Gaup
    >
    > "Gianluca Torta" <giatorta@gmail.com> wrote in message
    > news:21efe956.0501241104.21a525c6@posting.google.c om...
    > > Cross posting since I had no reply yet from
    > > microsoft.public.dotnet.framework.component_servic es
    > >
    > > Hi all,
    > >
    > > I have an ASP.NET app and a Serviced Component that runs within a COM+
    > > app
    > >
    > > the Serviced Component is intended to access a remote database with an
    > > identity that is NOT <MACHINE>\ASPNET but an account MYDOMAIN\MYUSER
    > > that actually can access the remote database
    > >
    > > the COM+ app has been configured to RUN AS SERVER and I have specified
    > > in the identity tab that the app should run as MYDOMAIN\MYUSER
    > >
    > > however, when I open my ASP.NET app and click on the button which
    > > makes the call to the Serviced Component, I can see from SQL Server
    > > Profiler that the user which tried to access the remote DB is
    > > <MACHINE>\ASPNET
    > >
    > > for some reason, the COM+ app is not running as the account that I
    > > specify in the Identity tab but as the caller (which in this case is
    > > <MACHINE>\ASPNET)
    > >
    > > I guess I have some configuration problem, but I really couldn't
    > > figure out what it is:
    > > - I correctly wrote my Serviced Component
    > > - I strongly named the assembly .DLL produced by compiling the
    > > component
    > > - I registered the component with regsvcs.exe
    > > - my ASP.NET application references the DLL that has been strongly
    > > named
    > >
    > > Any suggestions would be welcome!
    > >
    > > Thanks in advance,
    > > -Gianluca Torta
    >
    >
    >
    Gianluca Torta Guest

  5. #4

    Default Re: Serviced Component runs under ASPNET, not specified account

    You said in your post that the user being used against the database was the
    ASPNET user, so I figured that changing the user account being used by
    ASP.NET would also change the user being used for accessing the database.
    Have you considered this?

    "Gianluca Torta" <GianlucaTorta@discussions.microsoft.com> wrote in message
    news:97E99CE9-7E59-43E3-8F48-545B581C7CA3@microsoft.com...
    > Dear Svein, thank you for your reply.
    >
    > Unfortunately the requirements I have make the Serviced Component the best
    > way to obtain my goals (see thread "accessing remote resources from
    > ASP.NET
    > app").
    >
    > So my problem is now how to make my Serviced Component to run with
    > identity
    > "MYDOMAIN\MYUSER"
    >
    > -Gianluca
    >
    > "Svein Terje Gaup" wrote:
    >
    >> If you are using Windows Server 2003, you can configure an application
    >> pool
    >> to be run as a user account of your choice. You can then assign your web
    >> application to the application pool. Then check to see what account is
    >> being
    >> used on your database.
    >>
    >> In ASP.NET you might also try to configure impersonation in web.config:
    >> <identity impersonate="true" userName="DOMAIN\databaseuser"
    >> password="123456" />
    >>
    >> This article describes a method for accessing resources on a server using
    >> a
    >> copied ASPNET account:
    >> [url]http://weblogs.asp.net/mschwarz/archive/2003/03/31/4515.aspx[/url]
    >> Perhaps you can use it for accessing your database?
    >>
    >> HTH,
    >> Svein Terje Gaup
    >>
    >> "Gianluca Torta" <giatorta@gmail.com> wrote in message
    >> news:21efe956.0501241104.21a525c6@posting.google.c om...
    >> > Cross posting since I had no reply yet from
    >> > microsoft.public.dotnet.framework.component_servic es
    >> >
    >> > Hi all,
    >> >
    >> > I have an ASP.NET app and a Serviced Component that runs within a COM+
    >> > app
    >> >
    >> > the Serviced Component is intended to access a remote database with an
    >> > identity that is NOT <MACHINE>\ASPNET but an account MYDOMAIN\MYUSER
    >> > that actually can access the remote database
    >> >
    >> > the COM+ app has been configured to RUN AS SERVER and I have specified
    >> > in the identity tab that the app should run as MYDOMAIN\MYUSER
    >> >
    >> > however, when I open my ASP.NET app and click on the button which
    >> > makes the call to the Serviced Component, I can see from SQL Server
    >> > Profiler that the user which tried to access the remote DB is
    >> > <MACHINE>\ASPNET
    >> >
    >> > for some reason, the COM+ app is not running as the account that I
    >> > specify in the Identity tab but as the caller (which in this case is
    >> > <MACHINE>\ASPNET)
    >> >
    >> > I guess I have some configuration problem, but I really couldn't
    >> > figure out what it is:
    >> > - I correctly wrote my Serviced Component
    >> > - I strongly named the assembly .DLL produced by compiling the
    >> > component
    >> > - I registered the component with regsvcs.exe
    >> > - my ASP.NET application references the DLL that has been strongly
    >> > named
    >> >
    >> > Any suggestions would be welcome!
    >> >
    >> > Thanks in advance,
    >> > -Gianluca Torta
    >>
    >>
    >>

    msnews.microsoft.com 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