PSI calls inside of events

J

JCV

I need to make PSI calls in side project 2007 event handlers. However, I am
getting authentication errors trying to call the web services. I seems that
the event handler code is running as the "Network Service" user which has no
privledges in project. How am I suppose to make calls to PSI as this user? Is
there a way to impersonate the user that the event is related to (I'm trying
to add tasks in Project.OnCreated)? Or is there a way to give the service
account user rights in project. I tried setting up a NetworkCredential object
with a username and password hard-coded in and it works but obvisouly that is
not a good solution.

What is the recommend way to call PSI methods inside of events?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top