Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AutoEventWireup and Injection #10

Open
khorvat opened this issue Feb 1, 2013 · 2 comments
Open

AutoEventWireup and Injection #10

khorvat opened this issue Feb 1, 2013 · 2 comments

Comments

@khorvat
Copy link

khorvat commented Feb 1, 2013

I have a question and maybe a potential bug to report, in case developer turns on the AutoEventWireup on System.Web.UI.Page or System.Web.UI.UserControl and uses let's say Init event e.g. "protected void Page_Init(object sender, EventArgs e)" at this point nothing is injected into properties etc.

The root of this problem is the call to RequestActivation(); in PageBase and UserControlBase which is called after base.OnInit(e); and all events are raised inside the base.OnInit.

Thoughts ?

@remogloor
Copy link
Member

Can't reproduce. I can access dependencies in Page_Init

@khorvat
Copy link
Author

khorvat commented Feb 19, 2013

I think the issue here is that you need to use WebActivator to hookup the NinjectHttpModule via DynamicModuleUtility.RegisterModule(typeof(NinjectHttpModule)); and then this is working, but I have a situation where I can't add WebActivator to a project because it will break project's backward compatibility. So my question is, how can I hookup the NinjectHttpModule without the WebActivator ?

Note: I have tried adding modules to the web.config but had no luck.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants