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

Remember.Web: IContainerProviderAccessor exception #550

Closed
AGBrown opened this issue Jul 12, 2014 · 2 comments
Closed

Remember.Web: IContainerProviderAccessor exception #550

AGBrown opened this issue Jul 12, 2014 · 2 comments
Labels

Comments

@AGBrown
Copy link

AGBrown commented Jul 12, 2014

Using:

Steps to reproduce

  1. Clone the repository from github.
  2. Build (Nugets restored on build)
  3. Run tests (all pass other than those expected due to issues 272 & 397)
  4. Run Remember.Web.

Exception seen:

The exception below is shown on browsing to the home page. (It is also seen when browsing to the account pages).


Server Error in '/' Application.

This module requires that the HttpApplication (Global Application Class) implements IContainerProviderAccessor. 
  Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

 Exception Details: System.InvalidOperationException: This module requires that the HttpApplication (Global Application Class) implements IContainerProviderAccessor.

Source Error: 

 An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace: 

[InvalidOperationException: This module requires that the HttpApplication (Global Application Class) implements IContainerProviderAccessor.]
   Autofac.Integration.Web.ContainerDisposalModule.Init(HttpApplication context) +173
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +418
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +336
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296

[HttpException (0x80004005): This module requires that the HttpApplication (Global Application Class) implements IContainerProviderAccessor.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9885060
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34009 
AGBrown added a commit to AGBrown/AutofacABContrib that referenced this issue Jul 13, 2014
 - Remove ContainerDisposal and PropertyInjection modules as specified by autofac docs
 - Remove AttributedInjectionModule

ref: https://github.com/autofac/Autofac/wiki/Mvc-Integration

> Remove ASP.NET Autofac HTTP module configuration. Previously there were some Autofac  ContainerDisposal  and  PropertyInjection  modules required in your  web.config . These should be removed.

ref: autofac#550
@AGBrown
Copy link
Author

AGBrown commented Jul 13, 2014

The fix for this is apparently simple: it just involves an update to web.config. I have pushed a changeset to the fork AutofacABContrib branch dev-550, commit AGBrown@1dc367e.

Please let me know if you want me to create a pull request for this.

@tillig
Copy link
Member

tillig commented Sep 4, 2015

This issue was moved to autofac/Examples#2

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

No branches or pull requests

2 participants