本文介绍了在IIS中托管后修改web.config文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想以编程方式通过c#更改web.config文件.我可以在本地执行项目时修改web.config.但是我想在IIS中托管后修改web.config文件.我可以检索所有连接字符串和appsetting值.但是在更新web.config时,我无法更新.怎么办?

我收到以下错误
拒绝访问路径文件名""

Hi,

I want to change the web.config file through c# programmatically. I can able modify the web.config when I am executing the project locally. But I want to modify the web.config file after hosting in IIS. I can able to retrieve all connection strings and appsetting value. But while updating the web.config i can not update. How to do?

I am getting the following error
"Access to the path ''File Name'' is denied"

How to solve?

推荐答案



这篇关于在IIS中托管后修改web.config文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-15 09:06