none
Windows Service - Signing the assembly RRS feed

  • Question

  • I am trying to get a fairly simple Windows Service (just acts as a Data layer between the client and the database) logo certified for Windows Server 2008 R2. I am running the "Works with Tool" to run the certification test and I am able to pass everything except for the "Were all executables installed by the application signed?" test. The one file it is not recognizing as correctly signed in the executable for the Windows Service itself.

    Within the project itself I have set to "sign the assembly" within the Signing tab of the project properties. I am using a valid unexpired Verisign certificate, and the application builds. In fact if I navigate to the Release directory of the project after building it, from within the executables file properties I can see that the digital signature has been correctly added. However after building the Installation Project and installing it that file does not seem to have a digital signature while all the other dlls do. I have set the installation project to add the primary output of the Windows Service project. I am stumpted. What have i dont wrong???

    Friday, October 16, 2009 3:14 PM

All replies

  • Well this is what i found out... it looks like (at least the way my setup project is setup) that it takes the output from the obj directory as the primary output for a setup project. But it looks like it signes the executable in the bin directory. A work around I have found is to manually sign the executable in the obj directory with the following command.

    "$(FrameworkSDKDir)bin\signtool" Sign /f "c:\PrivateKey.pfx" /t http://timestamp.verisign.com/scripts/timstamp.dll "$(ProjectDir)obj\$(PlatformName)\$(ConfigurationName)\$(TargetName)$(TargetExt)"

    If anyone knows of a less hacky way please tell me!!!!
    Friday, October 16, 2009 4:28 PM