Cannot evaluate more than 1 attribute in a rule setting

Topics: User Forum
Nov 7, 2006 at 4:59 PM
Was not able to figure out how to setup a rule on the authentication tag, then pull out the mode and requireSSL attributes to evaluate if SSL was used with Forms authenticaiton mode set.

Any assistance appreciated. Thx
Nov 8, 2006 at 5:27 PM
I am following up on my own post with an example rule illustrating what I was after:

The rule:
Key1="XmlProp" Key2="configuration/system.web/authentication/@mode"
Query="$." />

When the rule is evaluated, it should fire something like the following:

if @mode="forms" and (not(@requireSSL=true)) then Error

Pretty straight forward, but not able to build an xpath that will let me evaluate this successfully
Nov 28, 2006 at 8:57 PM
Have you looked through the rules file at other rules that take more than one attribute? Here's an example:

<Rule Name="fConfigConnectionStrings" Query="(boolean($sConfigConnectionStrings)) and (not(boolean($sConfigConnectionStringsEncrypted)))" Error="Error" Title="Root Machine.Config: Connection strings are not encrypted" Text="Connection strings are specified but not encrypted in the Machine.config file. Connection strings should be encrypted for highest security." AlwaysEvaluate="True" />

Could you post the second-half of the rule that you are trying to create? (The one you posted was just the substitution rule--I also need to see the rule like the one above...)