Tab disappears #462
Comments
I've seen the same issue being mentioned on stackoverflow.com I'll paste my answer over here as well, so we can continue the discussion and look for possible solutions over here (although I have to say it is kind of strange nobody noticed before, maybe that is because Glimpse is used most of the time in a development environment I guess?) Anyway: The reason seems to be ASP.Net and the way it loads assemblies from your application directory for the first time and after a recycle. On first start, the assemblies are loaded from your application's bin directory and after a recycle (or even an IIS restart) it loads the assemblies from the Temporary ASP.NET Files directory. And depending on the situation more or less assemblies are loaded. You can see this for yourself by adding the following lines to your
If you run that then you will see the following entries in your output.txt file (although numbers may differ) On first initial start:
After recycles
After removing the corresponding directory inside the Temporary ASP.NET Files directory
How does this correlate with Glimpse. Well Glimpse makes a call to So the question is how can we make sure the assembly is loaded after a recycle. I was thinking of using something like Other thoughts? Am I maybe missing something? |
That sounds like exactly what's happening here. Is the way DLLs are selected/ignored from Temporary ASP.NET Files during AppPool Recycles documented? |
As a note, extra details on this issue can be found here - https://groups.google.com/forum/#!topic/getglimpse-dev/V2ec8Pc9AHg. |
Generally, you should avoid relying on Instead, please use |
For those interested, here is a reference from Levi on the topic http://stackoverflow.com/questions/2477787/difference-between-appdomain-getassemblies-and-buildmanager-getreferencedassembl |
@CGijbels Since you have a repo on this one, do you think you could make the change and test it out? |
@avanderhoorn @davidebbo Will that work as well for assemblies that are not referenced like Glimpse.Mvc3 ? I mean there is no reference in the web.config and no compilation dependency |
It'll work as long as it's in bin. |
@avanderhoorn I'll do But I've got some small remarks:
Maybe @nikmd23 has some thoughts on this DiscoveryLocation ? |
To inform you that @avanderhoorn @nikmd23 there is one thing that we could "abuse" and that is the fact that if you call Therefore I would suggest an approach that has less impact and that is to have the This will solve the additional dependency on System.Web that we would have to make from Glimpse.Core and prevents the fact that we need to look for all other uses of It's a one liner to solve this issue. What do you think? |
@rbbrk @leonardlazzari In the meanwhile you could do the same from within your Gobal.asax just call Could you try that to make sure it works? |
Humm that kinda sucks. Might be more than just a quick fix. But I like the idea of calling The problem with @davidebbo all being equal are you able to confirm wither |
I'm not sure if that is related to So if self hosts actually load all assemblies from the run directory into memory, whether they are directly needed or not, then it might work otherwise the same issue might be there. Glimpse.Core and Glimpse.AspNet are loaded because the I'm even not sure if |
Hi everyone ! Thank you for your attention! I made a change and adding BuildManager.GetReferencedAssemblies () in my Global.asax. Leo |
@leonardlazzari Alright, glad to hear the workaround works for you |
I think the workaround of calling And |
@davidebbo thanks for confirming our assumptions @avanderhoorn are you OK then if we go for the hacky approach? //cc: @nikmd23 |
I think the "hacky" approach is fine. |
I am struggling with a very strange problem
On an application in QA testing (ASP.NET MVC3) I installed Glimpse DLLs and made the documentation configurations
Switch On Glimpse and in the suite see all the TAB menu
all works fine.
If I make a recycle AppPool for application, in the Glimpse menu some TAB disappear (Execution, Metadata and Model.Binding)
the rest of suite works normally.
After made an identical copy of the glimpse libraries (this force the app restarting ) all tabs reappear
application is the MVC 3, the dll GLIMPSE were added with NuGet
Glimpse.Core 1.4.2
Glimpse.AspNet 1.3.1
Glimpse.MV3 1.3.2
I also tried to update to version 1.5.0 Glimpse.Core but having same behavior
Any idea?
Thanks for your attention
The text was updated successfully, but these errors were encountered: