asp.net - Glimpse MVC3 DLL being 'forgotten' as part of Application Pool recycle -


we're trying glimpse , running in our environment coming across strange problem.

we've installed glimpse.core, glimpse.aspnet, , glimpse.mvc3.dll , when configure web.config enable glimpse works fine until application pool recycles. once apppool recycles, it's if site 'forgets' glimpse.mvc3.dll , mvc3 tabs (execution, model, metadata) disappear.

here steps (for us) reproduce:

  1. modify web.config include glimpse configuration
  2. all tabs show including execution, metadata, , model binding
  3. perform application pool recycle
  4. the mvc3 glimpse tabs no longer show (but others will)

prior apppool recycle, glimpse.axd shows following registered tabs:

  • glimpse.aspnet (1.3.1)
    • configuration - glimpse.aspnet.tab.configuration
    • environment - glimpse.aspnet.tab.environment
    • request - glimpse.aspnet.tab.request
    • routes - glimpse.aspnet.tab.routes
    • server - glimpse.aspnet.tab.server
    • session - glimpse.aspnet.tab.session
  • glimpse (1.5.0)
    • timeline - glimpse.core.tab.timeline
    • trace - glimpse.core.tab.trace
  • glimpse.mvc3 (1.3.2)
    • execution - glimpse.mvc.tab.execution
    • metadata - glimpse.mvc.tab.metadata
    • model binding - glimpse.mvc.tab.modelbinding
    • views - glimpse.mvc.tab.views

and post apppool recycle, glimpse.axd shows following registered tabs:

  • glimpse.aspnet (1.3.1)
    • configuration - glimpse.aspnet.tab.configuration
    • environment - glimpse.aspnet.tab.environment
    • request - glimpse.aspnet.tab.request
    • routes - glimpse.aspnet.tab.routes
    • server - glimpse.aspnet.tab.server
    • session - glimpse.aspnet.tab.session
  • glimpse (1.5.0)
    • timeline - glimpse.core.tab.timeline
    • trace - glimpse.core.tab.trace

it's if site 'forgetting' glimpse.mvc3.dll part of apppool recycle.

any ideas/suggestions appreciated.

the reason seems asp.net , way loads assemblies application directory first time , after recycle. on first start, assemblies loaded application's bin directory , after recycle (or iis restart) loads assemblies temporary asp.net files directory. , depending on situation more or less assemblies loaded.

you can see adding following lines application_start method in global.asax

protected void application_start() {     assembly[] loadedassemblies = appdomain.currentdomain.getassemblies();     bool glimpsemvc3assemblyloaded = loadedassemblies.any(a => a.fullname.contains("glimpse.mvc3"));     file.appendalltext(         "c:\\temp\\output.txt",         string.format(             "{0}{1} assemblies loaded , glimpse.mvc3 is{2} 1 of them",             environment.newline,             loadedassemblies.length,             glimpsemvc3assemblyloaded ? string.empty : " not")); } 

if run see following entries in output.txt file (although numbers may differ)

on first initial start:

60 assemblies loaded , glimpse.mvc3 1 of them

after recycles

30 assemblies loaded , glimpse.mvc3 not 1 of them

30 assemblies loaded , glimpse.mvc3 not 1 of them

after removing corresponding directory inside temporary asp.net files directory

70 assemblies loaded , glimpse.mvc3 1 of them

how correlate glimpse. glimpse makes call appdomain.current.getassemblies() after types implement itab, if glimpse.mvc3 assembly isn't returned tabs defined inside of won't discovered , hence not shown.

does solve issue? i'm afraid not, think better continue discussion on glimpse issue tracker, matter of fact found similar issue on there, i'm not sure if yours.

update there fix in 1 of upcoming releases of glimpse, in meanwhile there solution/workaround, mentioned in one of comments on glimpse issue.

simply add following statement global.asax application_start method

buildmanager.getreferencedassemblies()

and you're go


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -