asp.net - dependency injection using unity on custom session store provider -


i made custom sessionstatestore provider, dependencies not resolving. used unity di.

i googled lot problem , got useful hints, still can't right.

  1. the providers constructed , managed framework, , there no opportunity intercept construction provide additional dependency injection
  2. override initialize() method in custom provider, , dependency injection there

there's similar problem , decent solution here , here(structuremap, not unity), can't right.

please help. thanks.

providers painful things. there's no nice way address problem, practical way handle provider composition root - in other words, if entry point of application. within provider can compose of services.

if use di container (like unity) can store container instance in httpcontext , there compose object graph within provider.


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -