更新asp.net web.config文件 [英] Update web.config file in asp.net

查看:141
本文介绍了更新asp.net web.config文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的工作它位于服务器上,并连接到基于该IPAddress.I各种客户机每次都改ip地址在web.config文件中,以便连接到特定客户机的Web应用程序。

I am working on a web application which sits on a server and connects to various client machines based on the IPAddress.I have to change the IPAddress every time in the web.config file in order to connect to a particular client machine.

我想提出一个文本框,在那里我可以进入ipaddress和它的基础上按一下按钮它将最终连接到相应的客户端机器更新web.config文件。

I want to put a text box where i can enter the ipaddress and it updates web.config file based on the button click which should eventually connect to the respective client machine.

是否有可能做这样或我想到走错路了?

Is it possible to do this way or i am thinking the wrong way ?

任何一个可以指导我在正确的道路?

Can any one guide me in the right path ?

推荐答案

这听起来对我来说,你的思想倒退。

It sounds to me like your thinking is backwards.

如果该应用程序依赖每次你输入一个IP地址,为什么它存储在web.config?为什么不只是构建到应用程序的过程的一部分,连接到本机?

If the application is dependent on you inputting an IP address every time, why store it in the web.config? Why not just build that into the application as part of the process to connect to the machine?

运行应用程序页面,要求输入IP,利用输入连接到目标计算机。

Run application page, request IP input, utilize input to connect to targeted machine.

该配置文件是为很少更改的设置和其他应用程序的配置数据。这是需要在每次使用的基础的值,所以要求它在每次使用的基础。

The config file is meant for rarely changing settings and other application configuration data. This is a value that is needed on a per use basis, so request it on a per use basis.

这篇关于更新asp.net web.config文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆