Custom event handler needs parameters from web.config of PWA

B

Brian Brain Smith

Hello,

how can a custom event handler read parameters from the 'web.config'
of Project Web Access?

The event handler calls PSI methods and needs the apropriate
credentials for using the web services. The event handler *has to* use
the credentials stored in 'web.config' of PWA. But how to access the
web.config in order to get the credential values?

Tia,
B.B.S.
 
J

Jurgen

In my experience the custom event handlers use the
Microsoft.Office.Project.Server.Eventing.exe.config file stored in the
<program files>\Microsoft Office Servers\12.0\Bin as the use the "Microsoft
Office Project Server Events Service"

The event handlers need to be installed in the
<program files>\Microsoft Office Servers\12.0\Bin\ProjectServerEventHandlers
too.
 
B

Brian Brain Smith

Thanks for your comment.

My event handler DLL is installed in the "ProjectServerEventHandlers"
directory.

The issue now is that this DLL has to read the web.config from the web
application hosting Project Web Access, it can be physically found in
e.g. "c:\Inetpub\wwwroot\wss\VirtualDirectories\80\" - but that
depends on the installation.

I am close to solve this by using this command:
System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration
("/pwa")
But you can guess it: it does not work, to be precise, I get an empty
Configuration object.
Maybe because "/pwa" is a virtual subdirectory and not a physical?!

Please my issue is urgent, does anybody know how to read the
"web.config" of Project Web Access by either code of an Event Handler
or code of any other external 3rd party application?
 

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