在主机中编辑web.config文件 [英] editing web.config file in host

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

问题描述

嗨..

我在visual studio上发布了我的网站并将其上传到主机中。

现在如果我想在主机上编辑我的web.config应该只编辑主机中的web.config文件

或者我再次发布网站并将其上传到主机?(对不起,我的英文不好)

hi..
I published my site in visual studio and uploaded it in host.
now if I want to edit my web.config in host should only edit web.config file in host
or again I publish site and upload it in host?(excuse me my english not good)

推荐答案

您可以使用任何一种方法。这取决于您希望如何执行此操作,因为方法仅用于编辑和更新web.config文件。



您可以下载网站的源代码,编辑,测试然后再上传。这种方法很好,如果你有一个IDE并且你想为网站添加更多功能,你可以下载源代码,测试它,检查任何错误等等,可能需要花费很多时间。您可以使用此选项来执行此类编程。



您可以使用托管服务提供商提供的在线编辑器(如果有的话)并在线更新其内容。保存,然后继续。这种方法可用于从网站上删除任何小错误或更改任何单个功能等。这取决于提供商是否允许此功能。大多数情况下,他们这样做!
You can use either method for this. It depends on how you would like to do it, because methods are just used to edit and update the web.config file.

You can download the web site's source code, edit it, test it and then again upload it. This method is good, if you have an IDE and you want to add more functionality to the websites, you can download the source code, test it, check for any bugs and so on, might take a lot of time. You can use this option to do this type of programming.

You can use the online editor provided by the hosting service provider (if any provided) and update the contents of it online. Save it, and continue. This type of methodology can be used to remove any small bugs from the website or alter any single function etc. This depends whether the provider allows this functionality or not. Mostly, they do!


这是一个棘手的问题 - 我甚至不会尝试从我的网站应用程序中编辑web.config文件 - 因为你需要的最后一件事是多个用户尝试同时编辑它,但这可能不是你的意思。



就个人而言,我编辑一个离线副本,然后发布更改的文件回到实时服务器 - 但这就是我对任何实时网站文件所做的事情 - 部分原因是因为它更安全,因为你可以在编辑文件之后及之前验证文件,部分是因为像大多数人一样,我不喜欢可以直接访问运行我网站的物理计算机。我必须通过FTP访问它,所以无论如何有效的编辑都在远程拷贝上。还有一个安全元素,如果我将文件复制到服务器,我会在服务器上有一个副本,以防出现任何问题 - 否则服务器端的任何问题可能会或可能不会反映在最后一个备份和因此可能难以复制!



我会复制,编辑,保存,发回。
That's a tricky one - I wouldn't even try to edit the web.config file from within my website application - because the last thing you need is multiple users trying to edit it at the same time, but that's probably not what you meant anyway.

Personally, I'd edit an off-line copy and then post the changed file back to the "live" server - but that's what I'd do with any live website files - partly because it's safer in that you can validate the file after it's edited and before it goes live, and partly because like most people I don't have direct access to the physical computer running my website. I have to access it via FTP, so effectively any editing is on a remote copy anyway. There is also the safety element in that if I copy a file to the server, I have a copy of it off the server in case anything goes wrong - otherwise any problems at the server end may or may not be reflected in the last backup and so may prove difficult to duplicate!

I'd copy it, edit it, save it, post it back.


这篇关于在主机中编辑web.config文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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