When building custom Project Server Event Receivers, the result is a DLL file. Using app.config and the ConfigurationManagement class will not work.
Well actually it’s possible!
The Microsoft Office Project Server Events Service
executable has its own app.config
where you can add entries. If you go to the Project Server bin directory (default: C:\Program Files\Microsoft Office Servers\12.0\Bin
) you will find the config file named Microsoft.Office.Project.Server.Eventing.exe.config
.
Add the appSettings
section like this:
<configuration> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <probing privatePath="ProjectServerEventHandlers"/> </assemblyBinding> </runtime> <appSettings> <add key="SSP Location" value="http://localhost:56737/SharedServices1" /> </appSettings> </configuration>
and your application can happily use the following syntax:
ConfigurationManager.AppSettings["SSP Location"]
This can make your event just a bit easier to deploy in different configurations without the recompiling or use of extra configuration libraries.