现在的位置: 首页 > 综合 > 正文

在IIS7.5上运行Message Security with UserName的WCF Service

2012年10月02日 ⁄ 综合 ⁄ 共 963字 ⁄ 字号 评论关闭
1. Run command prompt as administrator, and run the following command
"%windir%\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\ServiceModelReg.exe" -r -y
This step is used to make IIS can run WCF service.

2. Make certificate for LocalMachine
Use VS2008’s command prompt and run as administrator.
makecert -r -pe -n "CN=FeedServiceServer" -ss My -sr LocalMachine -sky exchange
This step is for creating server certificate.

3. Export server certificate as .pfx or .cer and import it into Trusted Root Certification Authorities's Certificates list
This step is for creating client certificate. You may get this step done easily by MMC.

4. Grant certificate access rights for service.
You could download certificate configuration tool from here. And run the following command.
C:\Program Files\Windows Resource Kits\Tools>winhttpcertcfg -g -c LOCAL_MACHINE\My -s FeedServiceServer -a FeedService
FeedService is the application pool name which contains the FeedService web application.

Note: make sure application pool’s .net framework version is 2.0. (not sure why v4.0 does not work, anyone could tell me?)

抱歉!评论已关闭.