Пример #1
0
        private void UnregisterUrl(UrlAcl urlAcl)
        {
            _logger.Trace("Removing URL ACL {0}", urlAcl.Url);

            var arguments = string.Format("http delete urlacl {0}", urlAcl.Url);

            _netshProvider.Run(arguments);
        }
Пример #2
0
        private void RemoveSimilar(UrlAcl urlAcl)
        {
            var similar = RegisteredUrls.Where(c => c.Scheme == urlAcl.Scheme &&
                                               InternalUrls.None(x => x.Address == c.Address) &&
                                               c.Port == urlAcl.Port &&
                                               c.UrlBase == urlAcl.UrlBase);

            foreach (var s in similar)
            {
                UnregisterUrl(s);
            }
        }
Пример #3
0
        private void RegisterUrl(UrlAcl urlAcl)
        {
            var arguments = string.Format("http add urlacl {0} sddl=D:(A;;GX;;;S-1-1-0)", urlAcl.Url);

            _netshProvider.Run(arguments);
        }