本文介绍了添加绑定时出现异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨...
当我正在通信时,使用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
推荐答案
这篇关于添加绑定时出现异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!