It’s a pretty straight forward question. I’d like to be able to provide feedback to the user about the result of a postback using TempData (since it’s auto-cleared). On successful execution of an action accepting a postback, I forward to a view dedicated to showing the result of the action, and would like to use TempData but leave SessionState disabled. For now the CookieTempDataProvider included in MVC3 Futures works great, but it doesn’t seem like my implementation of IDependancyResolver is ever called to look for anything that implements ITempDataPovider.
Was this an oversight?
Anyone else tried this yet?
Depenency injection is not used to look up instances of
ITempDataProviderin MVC 3. The DI work done in MVC 3 was meant to expose the most frequently requested DI seems.The only way to customize the instance of
ITempDataProvideris to override theController.CreateTempDataProvidermethod.