相关疑难解决方法(0)

如何在App.Config中编写URI字符串

我正在做一个Windows Service.在Service每晚都要donwload东西,为此我要放置URI在App.config万一我以后需要改变它.

我想在App.Config中编写一个URI.什么使它无效,我应该如何处理?

<appSettings>
    <add key="fooUriString" 
         value="https://foo.bar.baz/download/DownloadStream?id=5486cfb8c50c9f9a2c1bc43daf7ddeed&login=null&password=null"/>
</appSettings>
Run Code Online (Sandbox Code Playgroud)

我的错误:

- Entity 'login' not defined
- Expecting ';'
- Entity 'password' not defined
- Application Configuration file "App.config" is invalid. An error occurred
Run Code Online (Sandbox Code Playgroud)

c# configuration uri windows-services app-config

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

标签 统计

app-config ×1

c# ×1

configuration ×1

uri ×1

windows-services ×1