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 9213543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T01:46:24+00:00 2026-06-18T01:46:24+00:00

I’m using Elmah and what I would like to happen is that when one

  • 0

I’m using Elmah and what I would like to happen is that when one of our multiple developers is running their project locally, they only receive any error emails generated from that local instance, if the error is generated on the live server, email a different (group) email. Right now we are just using the (horrible) method of each person having their own web.config that shouldn’t (but sometimes does) get committed to our Repo, and then changing the email string when deploying to live.

We are all using VS 2010 and Cassini, but the developers could be working from their work computer or their home computer where they connect through VPN, but their login name on their home computer doesn’t reflect their work computer username.

Basically all I have so far is this ELMAH email setting:

<errorLog type="Elmah.SqlErrorLog, Elmah" connectionStringName="ElmahDb" />
<errorMail from="no-reply@mydomain.com" to="myemail@mydomain.com" subject="Project Error" smtpPort="0" async="false" />

And an empty method in Application_Start:

protected void Application_Start()
    {
        Config.SetErrorEmailReceiver();
    }

public static void SetErrorEmailReceiver()
    {
        //some logic
    }
  • 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-18T01:46:25+00:00Added an answer on June 18, 2026 at 1:46 am

    The best approach is probably to use an external config file. So, you would change your web.config to say:

    <errorMail configSource="elmah-errorMail.config" /> 
    

    And then each developer would have their own copy of that file which would contain:

    <errorMail from="no-reply@mydomain.com" to="myemail@mydomain.com" subject="Project Error" smtpPort="0" async="false" />
    

    And then of course you also have the production values on your production web server.

    I still don’t understand why you want emails sent out to the developer though. Isn’t a yelllow screen of death enough of an alert 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
I would like to run a str_replace or preg_replace which looks for certain words
We're building an app, our first using Rails 3, and we're having to build
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I would like my Web page http://www.gmarks.org/math_in_e-mail.txt on my Apache 2.2.14 server to display
I'm making a simple page using Google Maps API 3. My first. One marker
Let's say I'm outputting a post title and in our database, it's Hello Y&#8217;all

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.