企业库配置密钥文件存在问题,如果我对完整路径进行硬编码,它似乎才有效。我无法找到天气,它可以使用相对路径或使用根路径。
<enterpriselibrary.configurationSettings xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" applicationName="Application" xmlns="http://www.microsoft.com/practices/enterpriselibrary/08-31-2004/configuration">
<configurationSections>
<configurationSection xsi:type="ReadOnlyConfigurationSectionData" name="dataConfiguration" encrypt="false">
<storageProvider xsi:type="XmlFileStorageProviderData" name="XML File Storage Provider" path="dataconfiguration.config" />
<dataTransformer xsi:type="XmlSerializerTransformerData" name="Xml Serializer Transformer">
<includeTypes />
</dataTransformer>
</configurationSection>
<configurationSection xsi:type="ReadOnlyConfigurationSectionData" name="exceptionHandlingConfiguration" encrypt="false">
<storageProvider xsi:type="XmlFileStorageProviderData" name="XML File Storage Provider" path="exceptionHandlingConfiguration.config" />
<dataTransformer xsi:type="XmlSerializerTransformerData" name="Xml Serializer Transformer">
<includeTypes />
</dataTransformer>
</configurationSection>
</configurationSections>
<keyAlgorithmStorageProvider xsi:type="FileKeyAlgorithmPairStorageProviderData" name="File Key Algorithm Storage Provider" path="config.key">
<dpapiSettings xsi:nil="true" />
</keyAlgorithmStorageProvider>
<includeTypes />
路径=&#34; config.key&#34;除非我使用完整路径c:\ application \ config.key,但我需要使用相对路径,当我尝试./config.key时,它会失败。