locked
Web transform isn't working RRS feed

  • Question

  • User-1188570427 posted

    I am trying to take the following item and then update it to change the subjectPrefix from [Local] to [DevTest]

    I can't seem to get it to work right.

    I've tried:

      <healthMonitoring enabled="true" xdt:Transform="Replace">
        <eventMappings>
    subjectPrefix="[DevTest] Errors at mydomain.com -- " xdt:Transform="SetAttributes" xdt:Locator="Match(subjectPrefix)" />

    Here is the full update I want to change:

        <healthMonitoring enabled="true">
          <eventMappings>
            <clear />
            <add name="All Errors" type="System.Web.Management.WebBaseErrorEvent"  startEventCode="0" endEventCode="2147483647" />
          </eventMappings>
          <providers>
            <clear />
    
            <add type="System.Web.Management.SimpleMailWebEventProvider"
             name="EmailWebEventProvider"
             buffer="false"
             from="me@mydomain.com"
             to="support@mydomain.com,companyTextPhone@vtext.com"
             subjectPrefix="[Local] Errors at mydomain.com -- " />
    
            <add connectionStringName="HealthMonitoringServices"
                 maxEventDetailsLength="1073741823"
                 buffer="false" name="SqlWebEventProvider"
                 type="System.Web.Management.SqlWebEventProvider" />
    
          </providers>
          <rules>
            <clear />
            <add name="All Errors To E-Mail" eventName="All Errors" provider="EmailWebEventProvider"  profile="Default" minInstances="1" maxLimit="Infinite" minInterval="00:00:00" />
            <add name="All Errors Database" eventName="All Errors" provider="SqlWebEventProvider"  profile="Default" minInstances="1" maxLimit="Infinite" minInterval="00:00:00" />
          </rules>
        </healthMonitoring>

    Any help would be appreciated!

    Thursday, December 6, 2018 3:10 AM

Answers

  • User-1188570427 posted

    I did not have it between the section:

     <system.web>
    
     </system.web>

    AND

    I needed to place this on the subjectPrefix="...":

            <add type="System.Web.Management.SimpleMailWebEventProvider"
             name="EmailWebEventProvider"
             buffer="false"
             from="my@domain.com"
             to="support@mydomain.com"
             subjectPrefix="[Prod] Errors at mydomain.com -- " xdt:Transform="SetAttributes" xdt:Locator="Match(subjectPrefix)"  />
    
    EX:
             subjectPrefix="[Prod] Errors at mydomain.com -- " xdt:Transform="SetAttributes" xdt:Locator="Match(subjectPrefix)" 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, December 7, 2018 2:12 AM