我的网站需要这样一个功能,用户在注册后自动下载一个数字证书,证书中包括用户的公司、地址、email等数字证书常用属性。我查阅过相关代码,很多资料都给出这个网址中的函数:http://blog.csdn.net/onlyzhangqin/archive/2008/03/21/2203118.aspx哪位大侠能帮忙解释一下这个函数中的每个参数的含义以及这个函数的用法,或者有更好的方法解决自动申请数字证书的问题,小弟在这里先谢过了。
另外我的证书服务器是按照这个网址的方案配置的 http://www.cnblogs.com/chnking/archive/2008/08/18/1270063.html 我的服务器应该怎么配置。
另外我的证书服务器是按照这个网址的方案配置的 http://www.cnblogs.com/chnking/archive/2008/08/18/1270063.html 我的服务器应该怎么配置。
解决方案 »
- .net 中动态生成的表格,当鼠标经过tr时改变tr当前颜色,当鼠标移开恢复原来的颜色
- 将TreeView1.SelectedNode.Value 转换为int,出错:输入字符串的格式不正确
- asp.net中怎样做到Opendialog的效果
- 关于在asp.net mvc中使用Application变量的问题
- 求ajax.net的完整教程
- 日期时区显示问题---System.Globalization.DateTimeFormatInfo.CurrentInfo.ShortDatePattern
- 求助:为何不能插入数据?
- 一个优秀的RIA/RichClient解决方案
- 那里有比较完整的用asp.net写的比较简单例字下载?
- 怎样拿掉crystal report导入.net后由使用formula而跑出来的链接
- 重试或取消对话框的问题
- div+css和table布局的讨论,欢迎拍砖!
下面是我的一个项目中创建测试certificate的command.echo off
setlocal
echo ************
echo cert setup starting
echo ************cd Toolcall :setscriptvariables %1
IF NOT DEFINED SUPPORTED_MODE call :displayusage
IF DEFINED SUPPORTED_MODE call :cleancerts
IF DEFINED SETUP_SERVICE call :setupservice
GOTO end:cleancerts
REM cleans up certs from previous runs.
echo ****************
echo Cleanup starting
echo ****************echo -------------------------
echo del client certs
echo -------------------------
certmgr.exe -del -r CurrentUser -s TrustedPeople -c -n %SERVER_NAME%echo -------------------------
echo del service certs
echo -------------------------
certmgr.exe -put -r LocalMachine -s My -c -n %SERVER_NAME% ..\monitor.cer
IF %ERRORLEVEL% EQU 0 (
DEL computer.cer
echo ****************
echo "You have a certificate with a Subject name matching your Machine name: %SERVER_NAME%"
echo "If this certificate is from a cross machine run of WCF samples press any key to delete it."
echo "Otherwise press Ctrl + C to abort this script."
pause
certmgr.exe -del -r LocalMachine -s My -c -n %SERVER_NAME%
):cleanupcompleted
echo *****************
echo Cleanup completed
echo *****************GOTO :EOF:setupserviceecho ************
echo Server cert setup starting
echo %SERVER_NAME%
echo ************
echo making server cert
echo ************makecert.exe -sr LocalMachine -ss MY -a sha1 -n CN=%SERVER_NAME% -sky exchange -peIF DEFINED EXPORT_SERVICE (
echo ************
echo exporting service cert to monitor.cer
echo ************
certmgr.exe -put -r LocalMachine -s My -c -n %SERVER_NAME% ..\monitor.cer
) ELSE (
echo ************
echo copying server cert to client's CurrentUser store
echo ************
certmgr.exe -add -r LocalMachine -s My -c -n %SERVER_NAME% -r CurrentUser -s TrustedPeople
)
GOTO :EOF:setscriptvariables
REM Parses the input to determine if we are setting this up for a single machine, client, or server
REM sets the appropriate name variables
SET SUPPORTED_MODE=1
SET SETUP_SERVICE=1
SET EXPORT_SERVICE=1
SET SERVER_NAME=%1
IF [%1]==[] SET SERVER_NAME=MonitorServer
ECHO %SERVER_NAME%GOTO :EOF
:displayusage
ECHO Correct usage:
ECHO Service Machine - Setup.bat MonitorServer
:endpause