Closed mchubby closed 7 years ago
Quick fix
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_METHOD}" matchType="Pattern" pattern="DEBUG" ignoreCase="true" negate="true" />
</conditions>
Do you want a PR?
Interesting. I guess I haven't run with IIS Express in a long time :-(
Debugging works using Kestrel debugging directly, and the site works if the published app is mapped to full IIS, but as you found (nice sleuthing!) the problem is the DEBUG verb sent to the server as a special request to attach the debugger.
As suggested the fix is to fix the root web extensionless URL rewrite for the the DEBUG verb. The full section is:
<rule name="empty-root-index" stopProcessing="true">
<match url="^$" />
<action type="Rewrite" url="wwwroot/index.html" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_METHOD}" matchType="Pattern" pattern="DEBUG" ignoreCase="true" negate="true" />
</conditions>
</rule>
Thanks and nice catch!
Symptoms
Starting the project with debugging (F5) in Visual Studio 2017 yields the following error messagebox:
The html report does not hold a lot of extended info, however
%temp%\iisexpress\(random-number).log
says:As you can see, a DEBUG verb is used to query the / URI.
Diagnosis
The web.config "blank" rule https://github.com/RickStrahl/AlbumViewerVNext/blob/2807706094163f69380f4caab91172d220046d95/src/AlbumViewerNetCore/web.config#L6 prevents debugging to start correctly.
Misc
Starting the project without debugging (Ctrl+F5) works normally.