Using ASPNet_Regiis to encrypt custom configuration section - can you do it?

前端 未结 5 2020
南旧
南旧 2020-12-23 17:18

I have a web application with a custom configuration section. That section contains information I\'ld like to encrypt (was hoping to use ASPNet_RegIIS rather than do it mys

5条回答
  •  隐瞒了意图╮
    2020-12-23 17:50

    aspnet_regiis must be able to bind the assembly. The normal .net binding rules apply.

    I get around this by creating directory called aspnet_regiis_bin in the same directory as aspnet_regiis.exe and an aspnet_regiis.exe.config file with aspnet_regiis_bin as a private path like this:

    
       
          
             
          
       
    
    

    I then copy the assemblies that define the custom configuration sections into aspnet_regiis_bin so that aspnet_regiis can find them.

    This procedure doesn't require the assemblies to be strong named or in the GAC but does require messing around in the framework directories.

提交回复
热议问题