I have a page with the below property:

```
    public partial class CustomPage : Page
{
    [Dependency]
    public ILogger Logger { get; set; }

    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Write((this.Logger == null) ? "Not initialized" : "Initialized");
    }
}

```

As can be seen, the ILogger is a dependency which should be injected to this class.

The Unity config file has been configured like this:

```
<unity>
  <alias alias="ILogger" type="Logging.ILogger, AssemblyName" />
  <alias alias="Logger" type="Logging.Logger, AssemblyName" /> 
  <container>
    <register type="ILogger" mapTo="Logger">
      <lifetime type="singleton"/>
    </register>   
  </container>
</unity>

```

In my Global.ascx file, Application\_Start event I have the below code:

```
var container = new UnityContainer();
container.LoadConfiguration();
container.Resolve<CustomPage>();

```

What I expect is that when the CustomPage runs, the ILogger get injected but the actual behaviour is that it's always null.

How to configure it properly?

Thanks