Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/37.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.net 我是否可以使用';s程序集不在GAC中?_.net_Asp.net_Security_Encryption_Web Config - Fatal编程技术网

.net 我是否可以使用';s程序集不在GAC中?

.net 我是否可以使用';s程序集不在GAC中?,.net,asp.net,security,encryption,web-config,.net,Asp.net,Security,Encryption,Web Config,我已经为我的web.config编写了一个自定义的受保护配置提供程序 <configProtectedData> <providers> <add name="CustomProvider" type="MyCustomProviderNamespace.MyCustomProviderClass, MyCustomProviderNamespace" /> </providers> </c

我已经为我的web.config编写了一个自定义的受保护配置提供程序

<configProtectedData>
  <providers>
    <add name="CustomProvider"
         type="MyCustomProviderNamespace.MyCustomProviderClass,
         MyCustomProviderNamespace" />
  </providers>
</configProtectedData>
当我试图用它加密我的web.config时,我从aspnet_iisreg得到以下错误

aspnet_regiis.exe-pef appSettings-prov CustomProvider(这在我的MSBuild中运行)

无法加载文件或程序集“MyCustomProviderNamespace”或其依赖项之一。系统找不到指定的文件

在检查Fusion日志后,我确认它正在检查GAC和“C:/WINNT/Microsoft.NET/Framework/v2.0.50727/”(aspnet_iisreg的位置)。但它找不到提供程序

我不想将我的组件移动到GAC中,我想将自定义程序集留在ApplicationBase中,以便在不必从GAC拉/推的情况下复制到各个服务器

这是我在web.config中的提供程序配置

<configProtectedData>
  <providers>
    <add name="CustomProvider"
         type="MyCustomProviderNamespace.MyCustomProviderClass,
         MyCustomProviderNamespace" />
  </providers>
</configProtectedData>


我希望aspnet_iisreg检查此程序集的ApplicationBase Bin文件夹。有人有什么想法吗?

有点脏,我最后做的是将加密的DLL添加到构建机器的GAC中。这对配置文件进行了加密

在部署解决方案时,我将Dll复制到ApplicationBase中,应用程序能够成功地对其进行解密