Skip to content

Commit a8e89dd

Browse files
authored
Merge pull request MiniProfiler#555 from Bouke/patch-1
I found the installation instructions confusing, and [this issue](MiniProfiler#350) provided some insights. I think it would be valuable to make these instructions part of the documentation.
2 parents f4c0dc1 + a6e147d commit a8e89dd

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

docs/AspDotNet.md

+21-1
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,28 @@ protected void Application_EndRequest()
9595
}
9696
```
9797

98+
* Edit your `Views\Shared\_Layout.cshtml` to render the MiniProfiler:
99+
```
100+
@using StackExchange.Profiling
101+
...
102+
@(MiniProfiler.Current?.RenderIncludes())
103+
</body>
104+
</html>
105+
```
106+
107+
* Depending on existing config, you may need to edit your `Web.config` to serve the resources, the `path` attribute should match `RouteBasePath`:
108+
```xml
109+
<configuration>
110+
<system.webServer>
111+
<handlers>
112+
<add name="MiniProfiler" path="profiler/*" verb="*" type="System.Web.Routing.UrlRoutingModule" resourceType="Unspecified" preCondition="integratedMode" />
113+
</handlers>
114+
</system.webServer>
115+
</configuration>
116+
```
117+
98118
#### Routes
99119

100120
There are 2 user endpoints for MiniProfiler. The root is determined by `MiniProfilerOptions.RouteBasePath` (defaults to `/mini-profiler-resources`, but can be changed):
101121
- `/<base>/results-index`: A list of recent profilers, authorization required via `.ResultsAuthorize` and `.ResultsListAuthorize`
102-
- `/<base>/results`: Views either the very last profiler for the current user or a specific profiler via `?id={guid}`, authorization required via `.ResultsAuthorize`
122+
- `/<base>/results`: Views either the very last profiler for the current user or a specific profiler via `?id={guid}`, authorization required via `.ResultsAuthorize`

0 commit comments

Comments
 (0)