我遇到了WF4的一个非常奇怪的问题:当我使用Switch活动并以某种方式决定字符串变量的值时,WF将Switch的参数视为字符串,而不是变量的名称.因此我得到了不正确的结果.重现的步骤:
- create new WF - add Sequence - add Switch of String to the Sequence - add a new string variable named, for instance, [testText] and set its default value to "test" - set argument of the switch to testText - create a case in the switch for "test" string and show msgbox on it - create another case, let it be default case which shows another msgbox with "default" text - run突然,我们在这里得到一个带有"默认"文本的消息框,而不是testText案例的消息框
当我尝试用类似于EventLog.WriteEntry("MyEsb", "Msg");表达式的形状执行编排时,我得到异常The source was not found, but some or all event logs could not be searched. To create the source, you need permission to read all event logs to make sure that the new source name is unique. Inaccessible logs: Security.为什么?如果这有任何意义,我正在运行Win 7 64bit.