G
Guest
This problem has become a "show-stopper" for us.
I have defined a custom section for my web application that contains
sensitive data. Because of that, I want to have it encrypted in the same way
I encrypt the "connectionStrings" section using the ASPNET_REGIIS tool.
The problem is that I get an error saying that the ASPNET_REGIIS tool can't
find the assembly file that contains my custom section.
My custom section is coded like that:
public class MyCustomSection : ConfigurationSection
{
}
And declared like that in the web.config:
<configSections>
<section
name="myCustomSection"
type=" MyNamespace.MyCustomSection, MyAssembly"
allowLocation="false"
allowDefinition="MachineToApplication"/>
</configSections>
<myCustomSection>
<-- My elements with sensitive data comes here -->
</myCustomSection>
My questions are:
1) Why ASPNET_REGIIS cannot encrypt my custom section?
2) Why ASPNET_REGIIS is probing for the assembly where MyCustomSection was
declared? Isn't the tool just supposed to encrypt the text inside the custom
section?
3) If it needs the assembly where MyCustomSection was declared, how can I
make it find it? Installing the assembly into the GAC is not an option we
can do in our project.
Thanks for the help,
Marcos
I have defined a custom section for my web application that contains
sensitive data. Because of that, I want to have it encrypted in the same way
I encrypt the "connectionStrings" section using the ASPNET_REGIIS tool.
The problem is that I get an error saying that the ASPNET_REGIIS tool can't
find the assembly file that contains my custom section.
My custom section is coded like that:
public class MyCustomSection : ConfigurationSection
{
}
And declared like that in the web.config:
<configSections>
<section
name="myCustomSection"
type=" MyNamespace.MyCustomSection, MyAssembly"
allowLocation="false"
allowDefinition="MachineToApplication"/>
</configSections>
<myCustomSection>
<-- My elements with sensitive data comes here -->
</myCustomSection>
My questions are:
1) Why ASPNET_REGIIS cannot encrypt my custom section?
2) Why ASPNET_REGIIS is probing for the assembly where MyCustomSection was
declared? Isn't the tool just supposed to encrypt the text inside the custom
section?
3) If it needs the assembly where MyCustomSection was declared, how can I
make it find it? Installing the assembly into the GAC is not an option we
can do in our project.
Thanks for the help,
Marcos