I have the following content in the app.config file, on which I am trying to update the ‘name’ attribute value in the “section” XML Element (structured XML under configuration/configSections)
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="MailAccounts" type="MailboxWatcher.MailAccounts, MailboxWatcher" />
</configSections>
<appSettings>
<add key="FROMADDRESS" value="Receipts@help.com"/>
<add key="SUCCESSSUBJECT" value="SUCCESS: Expense Receipts Received"/>
<add key="REJECTEDSUBJECT" value="ERROR: Expense Report Has Not Been Submitted"/>
<add key="REJECTEDSUBJECTNOMATCH" value="ERROR: Expense Report Number Invalid"/>
<add key="REJECTEDSUBJECTBADFILE" value="ERROR: Upload failed"/>
</appSettings>
<MailAccounts>
<mailbox name="ExpenseReceipts" SiteUrl="https://sharepointdev.help.com/sites/Expense" Library="ExpenseReceipts" SmtpAddress="email.help.com" Port="995" UseSSL="true" User="ImageNowCrt" Password="E5th5t??">
<IndexFields>
<Field name="ReportID" type="SLT" dbcolumn="SHEET_ID" />
<Field name="AssociateID" type="SLT" dbcolumn="EMPLID" />
<Field name="AssociateName" type="SLT" dbcolumn="NAME" />
<Field name="AssociateEmail" type="SLT" dbcolumn="EMAIL_ADDRESS" />
<Field name="SubmissionDate" type="DT" dbcolumn="SUBMISSION_DATE" />
<Field name="ReSubmissionDate" type="DT" dbcolumn="RESUBMISSION_DT" />
<Field name="Pages" type="NUM" />
<Field name="Title" type="SLT" />
<Field name="IndexUser" type="SLT" />
<Field name="IndexDate" type="DT" />
<Field name="ScanUser" type="SLT" />
<Field name="ScanDate" type="DT" />
<Field name="NotificationSent" type="NUM" />
<Field name="SubmitterEmail" type="SLT" />
</IndexFields>
</mailbox>
</MailAccounts>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
</startup>
</configuration>
My variable is defined as:
/*:configuration/*:configSections/*:section/@name
with a value of my name, NANDINI . If I plug this XPath and XML into an XPath tester, it works fine, but the value is never updated when I deploy my project.
I’ve fought with this for about 3 hours now, trying every single dumb XPath trick I can think of and absolutely nothing is working for me.