Enable Helicon Ape on newly created site (via Command line)

Helicon Ape provides support for Apache .htacces and .htpasswd configuration files for Microsoft IIS.
User avatar
Posts: 3
Joined: 04 Apr 2016, 16:25

Enable Helicon Ape on newly created site (via Command line)

04 Apr 2016, 16:28

Hello experts! Question for you. We have a powershell script that'll create our site, set our bindings, etc. all of it. The only thing we don't know how to do is how to Enable Helicon Ape on the newly created site via command line. Any suggestions would be GREATLY appreciated.

User avatar
Posts: 402
Joined: 06 Mar 2012, 11:59

Re: Enable Helicon Ape on newly created site (via Command li

05 Apr 2016, 07:35

Hello.

From your question I suppose Ape is not enabled globally on the server as by default, otherwise you wouldn't need to enable it on a site level. Ape is a managed IIS Module and Handler (both in one dll in fact). You can launch Helicon Ape Manager, right click on any website and select Enable Ape. This will create appropriate entries in web.config file in the root of this website. Entries depend on the version you have installed and should look like:

Code: Select all
        <handlers>
            <add name="Helicon.Ape Handler" path="*.apehandler" verb="*" type="Helicon.Ape.Handler, Helicon.Ape, Version=3.1.0.253, Culture=neutral, PublicKeyToken=95bfbfd1a38437eb" resourceType="Unspecified" preCondition="integratedMode" />
        </handlers>
        <modules>
            <add name="Helicon.Ape" type="Helicon.Ape.ApeModule, Helicon.Ape, Version=3.1.0.253, Culture=neutral, PublicKeyToken=95bfbfd1a38437eb" />
        </modules>


The verison and PublicKeyToken are hardcoded, unfortunately this is the only way how IIS can enable managed module installed in GAC, so goodbye easy upgrades. BTW Ape installation program scan your websites for these entries and update information upon upgrade.

So, what you need is to use appcmd tol to add Handler ( https://technet.microsoft.com/en-us/lib ... 47(v=ws.10).aspx ) and Module ( https://technet.microsoft.com/en-us/lib ... 39(v=ws.10).aspx ), providing appropriate data to it.

User avatar
Posts: 3
Joined: 04 Apr 2016, 16:25

Re: Enable Helicon Ape on newly created site (via Command li

05 Apr 2016, 11:07

How do we enable Ape globally on IIS 8.5 by default?

User avatar
Posts: 402
Joined: 06 Mar 2012, 11:59

Re: Enable Helicon Ape on newly created site (via Command li

05 Apr 2016, 11:27

If you run Ape installation and didn't uncheck 'Enable Ape globally' checkbox, then it is enabled. You can run Helicon Ape Manager, right click on root 'IIS ...' node and select 'Enable Helicon Ape' to enable it globally if it is not already is. After that any newly created IIS website will have Ape enabled, unless you explicitely reset modules and handlers for it.

User avatar
Posts: 3
Joined: 04 Apr 2016, 16:25

Re: Enable Helicon Ape on newly created site (via Command li

05 Apr 2016, 15:22

Yaroslav wrote:right click on root 'IIS ...' node and select 'Enable Helicon Ape' to enable it globally if it is not already is. After that any newly created IIS website will have Ape enabled, unless you explicitely reset modules and handlers for it.


Awesome Yaroslav! This wasn't enabled. Will monitor going forward. Much appreciated!

Return to Helicon Ape

Who is online

Users browsing this forum: No registered users and 10 guests