impersonte = true

  • Thread starter Thread starter Steve Drake
  • Start date Start date
S

Steve Drake

All,

I have written a sharepoint webpart and sharepoint requires impersonate =
true in the web.config, but I want to connect to the DB as the id of the
application pool.

If I run RevertToSelf before the .Open, then reimpersonate the user that is
making the http request, this works, but I don't like it.

Is there a better way? I don't want to user sql authentication for other
reasons.

Steve
 
When do you really need impersonation ?

If possible I would do it the other way round i.e. I would impersonate when
needed instead of "reverting to self" when I don't need impersonation...
 
sharepoint has it set, and sharepoint manages to connect to the DB as the
application pool account.

if i turn impersonate off, some other webparts may not work which I have no
control over.

I do normally do it the other way round, the app I am working on,
impersonate when needed, eg when it needs to call a webservice that need to
know the caller, this works fine.

Steve
 
Back
Top