我有一个具有以下属性的架构:
<xs:schema id="FooFile"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://Foostandards.com"
elementFormDefault="qualified"
xmlns="http://Foostandards.com">
Run Code Online (Sandbox Code Playgroud)
我有一个XDocument构造函数,在根标记(FooFile)上具有以下属性.
XDocument Foo2Xml = new XDocument(
new XDeclaration("1.0", "utf-8", "yes"),
new XComment("Foo2 file specifications implemented in xml"),
new XElement("FooFile",
new XAttribute(XNamespace.Xmlns + "xsi", "http://Foostandards.com"),
new XAttribute(xsi + "schemaLocation", "http://Foostandards.com FooFile.xsd"), etc
Run Code Online (Sandbox Code Playgroud)
我运行XDocument Validate方法时记录以下错误:
"targetNamespace参数''应与模式的targetNamespace'http://Foostandards.com ' 相同."
我在Schema中有targetNamespace参数,我找不到告诉我它甚至属于XML文档属性(或如何编码)的信息.
我试图线了Azure Key Vault,我ASP.NET (.Net Framework) MVC使用Web App的Visual Studio 2017 Community 15.7.5 Connected Service目标.Net 4.7.2。
它会添加一个configBuilder名称AzureKeyVault为的属性,该属性vaultName会引发"The 'vaultName' attribute is not allowed."警告。
当我运行应用程序时,我得到一个错误,表明标签configBuilders attribute上的appsetting不好,如下所示:
我正在使用以下所有最新的软件包版本:
<package id="Microsoft.Azure.KeyVault" version="3.0.0" targetFramework="net472" />
<package id="Microsoft.Azure.KeyVault.WebKey" version="3.0.0" targetFramework="net472" />
<package id="Microsoft.Azure.Services.AppAuthentication" version="1.0.3" targetFramework="net472" />
Run Code Online (Sandbox Code Playgroud)
有一个更新,Microsoft.Azure.Services.AppAuthentication但只是预览,它引起了其他软件包的依赖关系问题。