andrewdavey / postal

Email sending for asp.net mvc using the view engine system to render emails.
http://aboutcode.net/postal
MIT License
536 stars 168 forks source link

MVC4 throws exception when using autofac and MVC async controller actions #180

Closed TorreyGarland closed 9 months ago

TorreyGarland commented 4 years ago

Seems to have a problem with autofac lifetime scopes.

winstonmark710 commented 4 months ago

Awesome work thanks for sharing this Fix info with us.

billwatsons721 commented 4 months ago

Check your Autofac configuration for async support. Ensure you register async dependencies correctly. Also, verify if you're using the latest version of Autofac compatible with MVC4 and async actions.

jamesboston816 commented 4 months ago

MVC4 throws exceptions when using Autofac with MVC async controller actions due to improper configuration. Ensure that the async controllers and their dependencies are correctly registered in Problems Autofac. Updating to the latest Autofac and MVC packages might also resolve compatibility issues. Properly configuring dependency injection can prevent these exceptions.