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

  • Home
  • SEARCH
  • 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 8252923
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T00:41:53+00:00 2026-06-08T00:41:53+00:00

I am running Visual Studio 2010, using an ASP.Net forms application.I am trying to

  • 0

I am running Visual Studio 2010, using an ASP.Net forms application.I am trying to transform XMl on build but it is not working.

In my config section I have the following:

 <elmah>
    <security allowRemoteAccess="yes" />
    <errorLog type="Elmah.SqlErrorLog, Elmah" connectionString="Data Source=TestServer;Initial Catalog=OnlineApplication;Trusted_Connection=True" />
    <errorMail from="emhelp@server.edu" to="person@test.com" subject=" Exception" async="true" smtpserver="smtpgate.server.edu" />

I am trying to get it the ELMAH server name to transform when I publish to production via web.config.production xml transformation. All of my other settings for the app settings and connection strings work fine.
I have the following in my web.production.config:

    <add type="Elmah.SqlErrorLog, Elmah"
         connectionString="Server=ProductionServer;Initial Catalog=OnlineApplication;Integrated Security=True"
         xdt:Transform="SetAttributes" xdt:Locator="Match(type)"/>
</elmah>

It doesn’t complain but it also does’t transform the text. What do I need to change to make the file transform on build/publish.

  • 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-08T00:41:55+00:00Added an answer on June 8, 2026 at 12:41 am

    Since is only one errorLog tag, you can use Replace instead of SetAttributes with a locator. Also note that you have to use the actual tag name, not <add>.

    <errorLog type="Elmah.SqlErrorLog, Elmah"
         connectionString="Server=ProductionServer;Initial Catalog=OnlineApplication;Integrated Security=True"
         xdt:Transform="Replace"/>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a ASP.Net web application running in Visual Studio 2010 that is targeting
(I'm running Windows7 and using Visual Studio 2010.) I'm using ClamAV in a .NET
I'm running Windows 7 Ultimate (64 bit) using Visual Studio 2010 RC. I recently
We have moved to Visual Studio 2010 but our TFS folks are not ready
I have built a small web application in asp.net c# in VS 2010 using
I'm running Visual Studio 2010 and using Team Foundation Server, and this thing is
I'm working in Visual Studio 2010, but using Git from the command line (for
I'm newbie to Visual Studio 2010 .NET 4.0 Dynamic Data. Now I'm trying to
I'm having trouble trying to print a document from a ASP.NET MVC3 application using
I am new to programming but attempting to learn. Im running visual studio 2010

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.