Re: Cannot encrypt custom section in web.config



in which assembly is your custom section?

app_code?
/bin
or GAC ?


-----
Dominick Baier (http://www.leastprivilege.com)

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


.



Relevant Pages

  • Re: Cannot encrypt custom section in web.config
    ... The custom section class is defined in an assembly that is in the /bin ... Putting our libraries in the GAC is not an allowed option for this ... I encrypt the "connectionStrings" section using the ASPNET_REGIIS ... public class MyCustomSection: ConfigurationSection ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: WSE 3.0 Policy and Encrypting Custom Headers (XML Encryption S
    ... We made a custom assertion, which encrypts custom headers using X509 ... >>> easier to encrypt custom soap headers to conform to the Xml Encryption ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • Re: Force user to use outlook and custom organizational form
    ... Encrypted messages using custom forms are ... not compatible with mail clients other than Outlook. ... IPM.Note messages before you sign or encrypt them. ...
    (microsoft.public.exchange.development)
  • Re: WSE 3.0 Policy and Encrypting Custom Headers (XML Encryption S
    ... >> easier to encrypt custom soap headers to conform to the Xml Encryption ... >> localization header, etc). ... WSE 2.0 does allow the body and username ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • Re: Please Help me- Creating Custom tokens
    ... But i guess that deals with the client sending a custom token obtained ... from a token issuer and using that to encrypt and sign the requests.. ... >> encrypted token from the server to the client. ...
    (microsoft.public.dotnet.framework.webservices.enhancements)