List Info

Thread: Re: Impersonated User needs to stay logged on to server for code to work




Re: Impersonated User needs to stay logged on to server for code to work
country flaguser name
United States
2007-07-11 22:50:59
Ok, there could be other issues that need to be address like
login as
a services, create a token process etc.

Have you tried manual impersonation?? I have an article on
how to how
to do this.  Add the code to your app and calll the
impersonate method
when the application startd and login with approriate
credentials..
http://nexperts.org/codesamples/WindowsIdentity
Impersonation.aspx

I would also suggest impersonating an administrative account
for
testing purpose and recreating the issue while logged in as
an
administrator on the target host

Web Delopers: Promote your services for free
http://directory.Kr3at.com




On Jul 10, 4:38 am, Simon_J <simon_jeffr...tiscali.co.uk> wrote:
> Thanks for your comments reid.  Sorry, I've only just
logged in and
> read this as I've been on leave.  I will check the user
account rights
> and see if this helps.
>
> Regards
>
> Simon
>
> On Jul 5, 2:01 pm, reid <reidabar...hotmail.com> wrote:
>
>
>
> > I'm not sure off-hand exactly what the setting is
(you can run a
> > search on Google), but I believe I've hit the same
issue before.  It
> > depends on what the web service is doing, but you
may need to grant
> > your test account rights to Interact with Desktop.
 By default,
> > service acounts cannot interact with the desktop,
nor (if I remember
> > correctly) the file system without this right. 
(the filesystem
> > restriction may be partial).
>
> > Check the service account rights, and check the
box to Allow
> > Interactive Logon (again, sorry, but I don't
remember exactly where
> > you set this), and that might do it.
>
> > Hope that helps
> > R
>
> > On Jul 3, 5:43 am, Simon_J <simon_jeffr...tiscali.co.uk> wrote:
>
> > > Hello all
>
> > > I have a very irritating problem that has
baffled me for weeks now.
>
> > > I have a web service written in VB.NET 2005
which makes calls to a VC+
> > > + 6 dll that has been written by a 3rd party
supplier.
>
> > > The dll is a part of our CRM package.  We use
this dll as it exposes
> > > the applications API.
>
> > > I have setup the web service to use
impersonation using the following
> > > lines of code:
>
> > > <authentication mode="None"
/>
> > >       <identity
userName="DBCTestAccount"
password="TestAccount"
> > > impersonate="true" />
>
> > > Obviously I haved changed the
username/password here for security
> > > reasons.
>
> > > The account has minimal permissions on our
domain.
>
> > > This account allowing with the ASPNET
account, the NETWORK SERVICE
> > > account and the IUSR IIS account have the
following permissions on the
> > > folder where the dll resides that I want to
call.
>
> > > Read, Read & Execute and List Folder
Contents.
>
> > > When the DBCTestAccount user is logged onto
the server the code runs
> > > fine but as soon as you log another user onto
the server the code
> > > fails with the following error:
>
> > > Exception from HRESULT 0xC000C3EO
>
> > > The server where the web service and 3rd
party dll is located is
> > > running Windows 2000 Server with Service Pack
4.
>
> > > I have contacted the supplier of the CRM
product and they cannot
> > > explain why this is happening other than to
say that it isn't a
> > > problem with their product but the way we
have setup the security in
> > > our project.
>
> > > My understanding is that as I am specifying
the user in the web.config
> > > file and using impersonation that this user
will be used to call the
> > > dll.  I have made sure that the user has
permissions to the folder
> > > where the dll resides but I would exect this
to work regardless of who
> > > is logged on to the server.
>
> > > If anyone has experienced a similar problem
to this and has any advice
> > > on how to fix it then I would be bery
grateful if you would reply to
> > > this post.
>
> > > Regards
>
> > > Simon Jeffreys- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "ASP.Net Community" group.
To post to this group, send email to aspnetgooglegroups.com
To unsubscribe from this group, send email to
aspnet-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/aspnet?hl=en
-~----------~----~----~----~------~----~------~--~---


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )