I have written a custom protected configuration provider for my web.config.
When I try to encrypt my web.config with it I get the following error from aspnet_iisreg
aspnet_regiis.exe -pef appSettings . -prov CustomProvider (This is running in my MSBuild)
Could not load file or assembly 'MyCustomProviderNamespace' or one of its dependencies. The system cannot find the file specified.
After checking with the Fusion log, I confirm it is checking both the GAC, and 'C:/WINNT/Microsoft.NET/Framework/v2.0.50727/' (the location of aspnet_iisreg). But it cannot find the provider.
I do not want to move my component into the GAC, I want to leave the custom assembly in my ApplicationBase to copy around to various servers without having to pull/push from the GAC.
Here is my provider configuration in the web.config.
<configProtectedData>
<providers>
<add name="CustomProvider"
type="MyCustomProviderNamespace.MyCustomProviderClass,
MyCustomProviderNamespace" />
</providers>
</configProtectedData>
I want aspnet_iisreg to check my ApplicationBase Bin folder for this assembly. Has anyone got any ideas?