添加绑定时出现异常
问题描述:
嗨...
当我正在通信时,使用fallowing c#代码将绑定添加到网站
Hi ...
When I am communicating the IIS to add the binding to web site using fallowing c# code
using (Microsoft.Web.Administration.ServerManager serverManager = new Microsoft.Web.Administration.ServerManager())
{
Microsoft.Web.Administration.Site site = serverManager.Sites[0];
site.Bindings.Count();
site.Bindings.Clear();
if (site != null)
{
site.Bindings.Add("*:80:", "http");
}
serverManager.CommitChanges();
}
当我执行它时会抛出以下错误
when I am executing it throws the following error
Filename: redirection.config
Error: Cannot read configuration file due to insufficient permissions
请帮助解决此异常。
谢谢,
purna
Please Help to solve this exception.
thanks,
purna
答
请参阅链接中提到的处理类似问题的步骤
错误:无法读取配置文件由于权限不足 [ ^ ]
Refer the steps mentioned in the link which deals with similar issue
Error: Cannot read configuration file due to insufficient permissions[^]