Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Accessing Certificates in a windows service

Accessing Certificates in a windows service

Scheduled Pinned Locked Moved C#
cryptographyhelpquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    Wolfram Steinke
    wrote on last edited by
    #1

    I need to be able to access a number of certificates in a windows service. The code works fine in a console app, but from a service it can't find the certificate. Is there a special way to install them and open them or both? Any help would be much appreciated.

    Happy programming!!

    L B 2 Replies Last reply
    0
    • W Wolfram Steinke

      I need to be able to access a number of certificates in a windows service. The code works fine in a console app, but from a service it can't find the certificate. Is there a special way to install them and open them or both? Any help would be much appreciated.

      Happy programming!!

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      A service runs before the user logs in, hence it has to run under a different account. It's probably running under the system-account, and that has it's own profile. Open the services, find yours, ask it's properties, go to the second or third tab, and have it run under the users' profile. That should do the trick :)

      Bastard Programmer from Hell :suss: if you can't read my code, try converting it here[^]

      1 Reply Last reply
      0
      • W Wolfram Steinke

        I need to be able to access a number of certificates in a windows service. The code works fine in a console app, but from a service it can't find the certificate. Is there a special way to install them and open them or both? Any help would be much appreciated.

        Happy programming!!

        B Offline
        B Offline
        Bernhard Hiller
        wrote on last edited by
        #3

        I experienced the same problem when I set up Hudson for building our projects: signtool.exe did not find the certificate for signing our programs. I tried with certmgr.msc to make the certificate available for "local system", but failed. Now Hudson runs on my user account on that machine (see also Eddy's answer), and that works.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups