开发者

How to save a sftp server connection in web.config?

开发者 https://www.devze.com 2023-01-25 07:49 出处:网络
Whats the best way to store sftp server connection 开发者_如何学Ccredentials in web.config? It consists of 4 things:

Whats the best way to store sftp server connection 开发者_如何学Ccredentials in web.config? It consists of 4 things:

  • IP
  • user
  • password
  • port

Thanks :-)


You can put it in the <appSettings> section.

For example:

<configuration>
    <appSettings>
        <add key="SFTP IP" value="127.0.0.1" />
    </appSettings>
</configuration>

string ip = ConfigurationManager.AppSettings["SFTP IP"];
0

精彩评论

暂无评论...
验证码 换一张
取 消