添加绑定时出现异常 [英] Exception when adding the binding

查看:96
本文介绍了添加绑定时出现异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨...



当我正在通信时,使用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[^]


这篇关于添加绑定时出现异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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