Main problems:
Authorize the network service account to access the Certificate file.
Install Service
Install the WCF Service
1. Import a server certification:
Import Certificate
Start => RUN MMC
Start => RUN MMC
File => Add/Remove snap-in
Certifications =>
File => add or delete a manager
Certifications => Add => Computer Account
Select certificate => Add => Computer Account
Right click on Certification: All task => Import
Select the certification. Example: Create a Test Certification use makecert suppose server name is "dev01"
Start => Programs => Microsoft Visual Studio 2008 => Visual Studio Tools => Visual Studio command prompt (right click Run as Administrator)
Run Makecert.exe-Sr localmachine-SS my-A sha1-N Cn = dev01-sky exchange-PE
(Open MMC to see the certification)
2. Grant read purview to network service use findprivatekey tool to find the private key file store location of the certification imported just now.
For example (findprivatekey.exe in c: \) Open command prompt with Administrator
From the picture above we can see that the private key file is in
F: \ programdata \ Microsoft \ crypto \ RSA \ machinekeys \ Encrypt open this folder:
Right click => properties => Security => edit => Add => advanced => Find now =>
Select network servie => OK => uncheck read & execute => OK
Notice: You can run a command instead of this action:
In Server 2008: icacls F: \ programdata \ Microsoft \ crypto \ RSA \ machinekeys \ 1817c10fb6f21ea57a247b8d incubator/Grant "Network Service" :( R, wdac)
In Server 2003: cacls.exe "C: \ Documents ents and Settings \ All Users \ Application Data \ Microsoft \ crypto \ RSA \ machinekeys \ 1817c10fb6f21ea57a247b8d \ Users"/e/g "Network Service ": R
3: Install
In Server 2003: cacls.exe "C: \ Documents ents and Settings \ All Users \ Application Data \ Microsoft \ crypto \ RSA \ machinekeys \ 1817c10fb6f21ea57a247b8d \ Users"/e/g "Network Service ": R
3: Install service in Windows Service run command prompt with Administrator: Go to the install directory of DOTNET framework for example: the service host application is in C: \ plexuschartservice \ plexuschartservicehost.exe run installutil "C: \ plexuschartservice \ plexuschartservicehost.exe"
Now. it is run in network service account. notice: Do not double click the certification to import the certification, in that case, the private key file will be in the login user (Administrator)'s folder.