Skip to content

MVC4 Areas support? #240

hubert-associates opened this Issue Jan 17, 2013 · 3 comments

2 participants


Hi, when I NuGet Glimpse into an MVC4 site, it works fine at the top level, but not for any of the MVC /Areas under this site... even if I instrument the Areas/AreaName/Views/web.config.

Any tips?


Glimpse member
nikmd23 commented Jan 18, 2013

Thanks for the bug report!

Can you confirm that you are using the 1.0 release candidate?


Thanks, well, here is the scoop: I had the .87 installed -- which I got yesterday via NuGet (command line). So I went back to NuGet manager and updated to the 1.0 RC, The update in turn stripped most of the glimpse configuration from the top-level web.config, leaving only the ipAddresses section and thus a broken web.config. So I removed that by hand. Now it says that the glimpse package is installed, but /glimpse.axd does not work (nothing in the web.config). So I de-installed and re-installed the NuGet packages, but this time, it made no changes to the web.config. The glimpse.dll is there, but glimpse does not work, anywhere. So, I've gone from the .87 situation where it worked on the top site but not in Areas, to a 1.0 RC where it won't install :-) The uninstall did not remove the .dll. I restarted VS2012 and repeated the unistall/install procedure. Same results. Note that if you just do an PM>install-package glimpse, you still get the .87 release.

PM> get-package glimpse

Id Version Description/Release Notes

Glimpse 1.0.0-rc1 Glimpse is a web debugging and diagnostics tool used to gain a better understa...

Let me know what you propose.


Glimpse member
nikmd23 commented Jan 18, 2013

Thanks for the info @richard-hubert.

Unfortunately, NuGet's mechanism for updating web.config files is pretty flaky - there are plans from their side to improve this - but for now we are stuck resorting to manually editing the file once NuGet gets confused. (Which is clearly has.)

Here's the steps:

  1. Use NuGet package manage to remove all Glimpse related packages you have.
  2. Look inside your web.config and delete any of the following entries that may be left over:
    • <section name="glimpse" ... /> that would exist inside the <configSections> node.
    • The <glimpse> node along with any of its children.
    • All <httpModules> that mention Glimpse in the name or type attributes in both the <system.web> and <system.webServer> sections.
    • All <httpHandlers> that mention Glimpse in the name, path or type attributes in both the <system.web> and <system.webServer> sections.
  3. Reinstall Glimpse.Mvc3 ensuring that you have selected "Include Prerelease".

If you follow these steps to sanitize and reinstall, what you should see is references to Glimpse.Core, Glimpse.AspNet and Glimpse.Mvc3 added to your project.

In addition, your web.config will have one Glimpse http module and one Glimpse http handler in both the <system.web> and <system.webServer> sections, a <glimpse> node with one or more attributes and a <section> named "glimpse".

For what it's worth, I've installed Glimpse RC1 on a local project with an area in it - and it does work for me. Hopefully just upgrading cleanly will solve your issue.

Let me know how things go.

@nikmd23 nikmd23 closed this Feb 4, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.