小编Chr*_*ris的帖子

使用appcmd添加ssl绑定时出错

我想使用appcmd为网站添加绑定.但是当我尝试以下命令时,我收到一个错误:

appcmd set site /site.name:"My site name" /+bindings.[protocol='https',bindingInformation='*:443:sub.mydomain.com'] 
Run Code Online (Sandbox Code Playgroud)

错误:

ERROR ( message:Cannot find SITE object with identifier "bindingInformation='*:443:sub.mydomain.com']". )
Run Code Online (Sandbox Code Playgroud)

我检查了网站是否存在,确实存在.我究竟做错了什么?

iis https iis-7 appcmd

12
推荐指数
2
解决办法
1万
查看次数

具有多个字段的XML Schema Key

我有一个包含问题结构的XML文件格式:

<question id="q101">
  <text>Do you like the color red?</text>
  <answer>yes</answer>
  <answer>no</answer>
</question>
<question id="q102">
  <text>What is your favorite color?</text>
  <answer>red</answer>
  <answer>blue</answer>
  <answer>white</answer>
  <answer>yellow</answer>
</question>
Run Code Online (Sandbox Code Playgroud)

我也有来自多个用户的相同文件响应.

<user id="bob">
  <response questionIdRef="q101">yes</response>
  <response questionIdRef="q102">white</response>
</user>
<user id="jane">
  <response questionIdRef="q101">no</response>
  <response questionIdRef="q102">blue</response>
</user>
Run Code Online (Sandbox Code Playgroud)

我已经在xml中为questionId定义了一个键和一个keyref元素:

<xsd:key name="questionId">
  <xsd:selector xpath=".//question" />
  <xsd:field xpath="@id" />
</xsd:key>
<xsd:keyref name="responseQuestionIdKeyRef" refer="questionId">
  <xsd:selector xpath=".//response" />
  <xsd:field xpath="@questionIdRef" />
</xsd:keyref>
Run Code Online (Sandbox Code Playgroud)

我现在想要做的是现在让模式验证用户对某个问题的响应的值实际上是引用问题中提供的答案.我尝试使用以下密钥和keyref执行此操作,但它只能识别第一个答案,所有其他答案都未被识别为有效:

<xsd:key name="answerValue">
  <xsd:selector xpath=".//question" />
  <xsd:field xpath="@id" />
  <xsd:field xpath=".//answer/value" />
</xsd:key>
<xsd:keyref name="validAnswer" refer="answerValue">
  <xsd:selector xpath=".//response" />
  <xsd:field xpath="@questionIdRef" …
Run Code Online (Sandbox Code Playgroud)

xml schema xsd

2
推荐指数
1
解决办法
1万
查看次数

标签 统计

appcmd ×1

https ×1

iis ×1

iis-7 ×1

schema ×1

xml ×1

xsd ×1