Note that there are some explanatory texts on larger screens.

plurals
  1. POSecuring Elmah in ASP.NET website
    primarykey
    data
    text
    <p>I am having trouble trying to secure ELMAH. I have followed Phil Haacked's <a href="http://haacked.com/archive/2007/07/24/securely-implement-elmah-for-plug-and-play-error-logging.aspx" rel="noreferrer">tutorial</a>, with the only difference being the demo project is a web application and my project is a website.</p> <pre><code> &lt;add verb="POST,GET,HEAD" path="/admin/elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah" /&gt; &lt;location path="admin"&gt; &lt;system.web&gt; &lt;authorization&gt; &lt;deny users="?"/&gt; &lt;/authorization&gt; &lt;/system.web&gt; &lt;/location&gt; </code></pre> <p>With the leading "/" I receive the response that "The resource cannot be found.", if I remove the leading "/" everything works fine except authentication can be bypassed by appending a directory name in front of /admin/elmah.axd.</p> <p>For example without the leading "/"</p> <p>www.mysite.com/admin/elmah.axd - triggers the authentication<br> www.mysite.com/asdasdasd/admin/elmah.axd - does not trigger the authentication and displays ELMAH</p> <p>How can I ensure that ELMAH is secure while maintaining the ability to remotely view the log?</p> <p>Thanks.</p> <p>Note to others:<br> Following Alan's answer below results in the following. </p> <p>www.mysite.com/admin/elmah.axd - triggers the authentication<br> www.mysite.com/admin/asdasdasd/elmah.axd - triggers the authentication<br> www.mysite.com/asdasdasd/admin/elmah.axd - The resource cannot be found. (exactly what we wanted) </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload