将 ASP.NET 配置为使用新帐户运行

来源:互联网 发布:php算术运算符 编辑:程序博客网 时间:2024/05/18 02:37
 
此过程编辑 machine.config,以便将 ASP.NET 配置为使用新帐户运行。
将 ASP.NET 配置为使用新帐户运行
1.
在命令提示符处运行 aspnet_setreg.exe,向注册表添加自定义帐户的用户名和密码的加密版本。有关此实用程序的详细信息和下载链接,请参见 Microsoft 知识库文章 329290“HOWTO: Use the ASP.NET Utility to Encrypt Credentials and Session State Connection Strings”HOW TO:使用 ASP.NET 工具加密凭据和会话状态连接字符串):http://support.microsoft.com/default.aspx?scid=329290
aspnet_setreg -k:SOFTWARE/YourSecureApp/processModel 
              -u:"CustomASPNET" -p:"YourStrongPassword"
2.
使用 Visual Studio .NET 或记事本打开 machine.config
Machine.config
位于以下文件夹中:
C:/WINNT/Microsoft.NET/Framework/v1.0.3705/CONFIG
3.
找到 <processModel> 元素,并将用户名密码属性设置为包含以下指向加密的凭据详细信息的字符串。
Default: 
<processModel userName="machine" password="AutoGenerate" . . ./>
Becomes: 
<processModel 
  userName="registry:HKLM/SOFTWARE/YourSecureApp/processModel/
            ASPNET_SETREG,userName" 
  password="registry:HKLM/SOFTWARE/YourSecureApp/processmodel/
            ASPNET_SETREG,password" . . . />
4.
保存对 machine.config 所做的更改。
 
 
原创粉丝点击