Skip to content
/

To deploy our code we create MSI installers using Visual Studio. One problem I encountered is that there is no property available in code to know where the user has chosen to install the application.

To deploy our code we create MSI installers using Visual Studio. One problem I encountered is that there is no property available in code to know where the user has chosen to install the application.
After some searching and testing I now use the following code to get the installation path:

// Installer Application Folder
string installPath = Context.Parameters["assemblypath"];
installPath = installPath.Substring(0, installPath.LastIndexOf("\\"));

if (!installPath.EndsWith("\\"))
{
    installPath += "\\";
}

That's all!

/

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!

When building custom Project Server Event Receivers the result is a DLL file. Using app.config and the will not work.
Well actually it’s possible!

The Microsoft Office Project Server Events Service executable has it’s 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.

/

I had a lot of trouble using impersonation with the PSI web services in Project Server 2007. I found some posts on the web suggesting that you need to add the account to the “Process Accounts with Access to the SSP” textbox, but guess what? That box was nowhere to find!

I had a lot of trouble using impersonation with the PSI web services in Project Server 2007. I found some posts on the web suggesting that you need to add the account to the Process Accounts with Access to the SSP textbox, but guess what? That box was nowhere to find!

I found one post in the Setup/Installation Related FAQ's of the “Project Server 2007 VSTS Connector” on CodePlex. It says:

Sometimes the textbox for “Process Accounts with Access to the SSP” will not exist on the web page. To add the account in this circumstance, go to the command line, navigate to Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN and run:

stsadm.exe -o editssp -title <sspname> -setaccounts <accounts>

So since my SSP is called SharedServices1 to following line did miracles:

stsadm.exe -o editssp -title SharedServices1 -setaccounts domain\user

Reading the documentation of the stsadm application, it mentions that New process accounts should be appended to the existing list. So if you execute the above line any existing configuration of accounts will be gone.

To view a list of current configured account you can use the -enumssp option:

stsadm.exe -o enumssp -title SharedServices1

This will return the details of the SSP (in XML):

<ssps>
  <ssp name="SharedServices1" default="true" ssl="False" status="Online">
    <account username="NT AUTHORITY\NETWORK SERVICE" />
    <site type="Administration" url="http://server:4389/ssp/admin" />
    <database type="ServiceDatabase"
              server="server\OfficeServers"
              name="SharedServices1_DB_2b6d2c6a-2374-4f0f-8d1e-e4577988aa80"
              authentication="Windows">
    <processaccounts>
      <account username="domain\user">
    </processaccounts>
    <associatedwebapplications>
      <webapplication name="SharePoint - 4389" url="http://server:4389/" />
      <webapplication name="SharePoint - 80" url="http://server/" />
    </associatedwebapplications>
  </ssp>
</ssps>

You can use this to prevent loss of your current configured accounts.