首页 新闻 会员 周边 捐助

应用Castle Monorail,如何对数据库连接字符串加密?

0
悬赏园豆:20 [待解决问题]

 

应用Castle Monorail做东西,现在遇到了一个问题,现在想给数据库连接字符串加密。但是不知道进行加密?

 

1:首先:

<castle>
    <properties>
      <nhConnectionString>XXXXXXXXXXXx</nhConnectionString>
    </properties>
    <include uri="file://Config/facilities_mysql.config" />    <include uri="file://Config/controllers.config" />
  </castle>


<facility id="rails.facility"
   type="Castle.MonoRail.WindsorExtension.RailsFacility, Castle.MonoRail.WindsorExtension" />

  <facility id="transaction"
   type="Castle.Facilities.AutomaticTransactionManagement.TransactionFacility, Castle.Facilities.AutomaticTransactionManagement" />
    <facility id="loggingfacility" type="Castle.Facilities.Logging.LoggingFacility, Castle.Facilities.Logging" loggingApi="Log4net" configFile="logging.config" />
  <facility id="nhibernatefacility"
   type="Castle.Facilities.NHibernateIntegration.NHibernateFacility, Castle.Facilities.NHibernateIntegration" isWeb="true">
   <factory id="sessionFactory1" >
        <settings>
     <item key="hibernate.connection.connection_string">#{nhConnectionString}</item>
          <item key="hibernate.connection.provider">NHibernate.Connection.DriverConnectionProvider</item>
          <item key="hibernate.connection.driver_class">NHibernate.Driver.MySqlDataDriver</item>
          <item key="hibernate.dialect">NHibernate.Dialect.MySQLDialect</item>
    </settings>

2:接下来在程序中,如何应用加密后的数据库连接字符串我就不会了,请高手指教。

 

荣-的主页 荣- | 初学一级 | 园豆:25
提问于:2010-08-18 13:38
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册