Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8519737
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T06:20:00+00:00 2026-06-11T06:20:00+00:00

How can requests to /elmah.axd be limited to an Umbraco admin user . It

  • 0

How can requests to /elmah.axd be limited to an Umbraco admin user.

It is my understanding that the Umbraco membership and role providers apply to Umbraco Members but not Users — Umbraco user accounts do not appear to have a user name or role (e.g. “Admins”) that could be used in the web.config like this:

<location path="elmah.axd">
  <system.web>
    <authorization>
        <allow roles="Admins" />
        <deny users="*" />
    </authorization>
  </system.web>
</location>

This is a recommended way of securing ELMAH in other ASP.Net applications.

Anyone done this in Umbraco?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T06:20:01+00:00Added an answer on June 11, 2026 at 6:20 am

    I solved the problem by creating an HTTP module to intercept requests to elmah.axd, and authorize only Umbraco administrators to view it. Heres the module code:

    namespace MyNamespace
    {
        using System;
        using System.Configuration;
        using System.Web;
        using System.Web.Configuration;
    
        using umbraco.BusinessLogic;
    
        public class ElmahSecurityModule : IHttpModule
        {
            private HttpApplication _context;
    
            public void Dispose()
            {
            }
    
            public void Init(HttpApplication context)
            {
                this._context = context;
                this._context.BeginRequest += this.BeginRequest;
            }
    
            private void BeginRequest(object sender, EventArgs e)
            {
                var handlerPath = string.Empty;
    
                var systemWebServerSection = (HttpHandlersSection)ConfigurationManager.GetSection("system.web/httpHandlers");
    
                foreach (HttpHandlerAction handler in systemWebServerSection.Handlers)
                {
                    if (handler.Type.Trim() == "Elmah.ErrorLogPageFactory, Elmah")
                    {
                        handlerPath = handler.Path.ToLower();
                        break;
                    }
                }
    
                if (string.IsNullOrWhiteSpace(handlerPath) || !this._context.Request.Path.ToLower().Contains(handlerPath))
                {
                    return;
                }
    
                var user = User.GetCurrent();
    
                if (user != null)
                {
                    if (user.UserType.Name == "Administrators")
                    {
                        return;
                    }
                }
    
                var customErrorsSection = (CustomErrorsSection)ConfigurationManager.GetSection("system.web/customErrors");
    
                var defaultRedirect = customErrorsSection.DefaultRedirect ?? "/";
    
                this._context.Context.RewritePath(defaultRedirect);
            }
        }
    }
    

    …and the web.config:

    <configuration>
        <system.web>
            <httpModules>
                <add name="ElmahSecurityModule" type="MyNamespace.ElmahSecurityModule" />
            </httpModules>
        </system.web>
        <system.webServer>
            <modules runAllManagedModulesForAllRequests="true">
              <add name="ElmahSecurityModule" type="MyNamespace.ElmahSecurityModule" />
            </modules>
        </system.webServer>
    </configuration>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know that in Rails (3.2.2), I can route requests to / with the
Is there a project that can log errors in requests to Django on Google
I have a game server than can take requests from a user. A user
TCPServer.new(port) creates a server that can service requests from localhost or remote machines. But
I've added Elmah to my ASP.NET MVC (1.0) web application. Requests to /elmah.axd are
I use a request dialog in my app where the user can send requests
I'm having trouble finding documentation that makes me think that you can make requests
We know that Ajax requests can only be made to resources on the same
I tried to find a list of errors and exceptions that ELMAH can catch
I can send requests to friends using Multi Friend Request Selector inside my Page

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.