Encrypt custom web.config section / cannot load custom handler?



Good morning.

I am attempting to encrypt a custom section of my web.config. The error
I am getting is that aspnet_regiis can't find/load my custom assembly
which contains my custom handler.

The custom section and handler was created using this example:
http://msdn2.microsoft.com/en-us/library/zhhddkxy.aspx

The custom section is very simple:

<myCustomSection myattrib1="value" myattrib2="value" />

The handler declaration in my web.config looks as such:
<configSections>
<section name="myCustomSection"
type="MyCustomHandler.MyCustomSectionHandler,MyCustomHandler" />
</configSections>

I've confirmed that the custom handler works in a web application.

The problem I am running into is when I am attempting to encrypt the
web.config custom section. I use the command: aspnet_regiis -pe
"myCustomSection" -app "/MyWebApp".

I get the following error:
Encrypting configuration section...
An error occurred creating the configuration section handler for
myCustomSection: Could not load file or assembly 'MyCustomHandler' or
one of its dependencies. The system cannot find the file specified.
(C:\PATHTOSITE\web.config line 5)

Could not load file or assembly 'MyCustomHandler' or one of its
dependencies. The system cannot find the file specified.
Failed!
------------
Installing the Custom Handler into the GAC is not an option.
Suggestions or pointers to what I am doing wrong would be most
appreciated.

MS

.



Relevant Pages

  • Re: ASF custom file type
    ... This source filter is loaded when playing the AVI. ... stock AVI/WAV handler or custom handler ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: extending printf
    ... SetNewPrintfFormat(char format, ... expected to be hard-coded within the spec of the custom function? ... Custom handler could take FILE* as parameter and print directly. ... Problem is that all of this would be compiler specific so one can't use ...
    (comp.lang.c)
  • Re: multiple same section in app.config
    ... Droopy wrote in ... The parsing seems a bit too complicated. ... I am going to try my own custom handler. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: multiple same section in app.config
    ... Well, it will, but you have to have one root element that is not ... Droopy wrote in ... I am going to try my own custom handler. ...
    (microsoft.public.dotnet.languages.csharp)
  • 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)