首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏喵叔's 专栏

    C# 操作IIS方法集合

    entry = new DirectoryEntry(”IIS://” + HostName + ”/W3SVC/INFO”); string version = entry.Properties[ apppools = new DirectoryEntry(”IIS://” + HostName + ”/W3SVC/AppPools”); DirectoryEntry ent = new DirectoryEntry(entPath); foreach (DirectoryEntry child in ent.Children) { if newpool; DirectoryEntry apppools = new DirectoryEntry(”IIS://” + HostName + ”/W3SVC/ getdir = new DirectoryEntry(”IIS://localhost/W3SVC”); foreach (DirectoryEntry getentity in getdir.Children

    69210发布于 2020-09-08
  • 来自专栏全栈程序员必看

    c# 操作ad域用户

    : using System.DirectoryServices; using System.DirectoryServices.AccountManagement; 获取组织单位: public DirectoryEntry GetOU(DirectoryEntry parent, string ouname) { DirectorySearcher mySearcher = new parent, string ouname) { DirectoryEntries ous = parent.Children; DirectoryEntry } } 登录验证: public bool login(string name, string password) { DirectoryEntry try { string ADPath = rootPath(); root = new DirectoryEntry

    1.2K20编辑于 2022-08-29
  • 来自专栏hbbliyong

    DirectoryEntry配置IIS7出现ADSI Error:未知错误(0x80005000)

    一、错误情况 环境:win7+iis7.0 DirectoryEntry配置IIS7出现如下错误 或者是 下面一段代码在IIS6.0下运转正常,但IIS7.0下运转会出错: System.DirectoryServices.DirectoryEntry  iisServer; iisServer = new System.DirectoryServices.DirectoryEntry("IIS://localhost/W3SVC/1"); System.DirectoryServices.DirectoryEntry System.Runtime.InteropServices.COMException Unknown error (0x80005000)    at System.DirectoryServices.DirectoryEntry.Bind (Boolean throwIfFail)    at System.DirectoryServices.DirectoryEntry.Bind()    at System.DirectoryServices.DirectoryEntry.get_IsContainer at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)    at System.DirectoryServices.DirectoryEntry.Bind

    2.7K70发布于 2018-03-06
  • 来自专栏全栈程序员必看

    c# AD域 权限管理

    //Console类 调试的时候使用,在输出界面显示 string adgroup = “”; //用户所属的角色组 //DirectoryEntry 可封装 ActiveDirectory域服务层次结构中的节点或对象,使用此类绑定到对象、读取属性和更新特性 DirectoryEntry entry = new DirectoryEntry GetDirectoryObject() { DirectoryEntry entry = null; try entry = new DirectoryEntry(“LDAP://“); DirectorySearcher search = new DirectorySearcher entry = new DirectoryEntry(“LDAP://abc“); DirectorySearcher search = new DirectorySearcher

    1.2K20编辑于 2022-08-29
  • 来自专栏CSharp编程大全

    C#如何在Windows中操作IIS设置FTP服务器

    ("IIS://localhost/MSFTPSVC");//IIS6管理对象 DirectoryEntry rootentry = new DirectoryEntry ("IIS://localhost/W3SVC");//创建IIS管理对象 foreach (DirectoryEntry sitechild in siteEntry.Children */ foreach (DirectoryEntry /* * 删除FTP 子站点 */ var siteEntry = new DirectoryEntry = "") { foreach (DirectoryEntry sitechild in siteEntry.Children)

    8.1K20发布于 2021-04-23
  • 来自专栏Porschev[钟慰]的专栏

    C# AD(Active Directory)域信息同步,组织单位、用户等信息查询

    知识了解   我们要用C#访问Active Directory非常容易,主要用到轻量目录访问协议 (LDAP) System.DirectoryServices命名空间下的两个组件类 DirectoryEntry returns></returns> private bool IsConnected(string domainName, string userName, string userPwd, out DirectoryEntry domain) { domain = new DirectoryEntry(); try { domain.Path = string.Format entry, out DirectoryEntry ou) { ou = new DirectoryEntry(); try { ou Screenshot (36).png   还有一些属性没有列出来,可以循环输出DirectoryEntry.Properties.PropertyNames来找   比如用objectsid这也是个用户比较重要的属性

    4.1K50发布于 2018-01-16
  • 来自专栏桃花源

    使用java登录远程LINUX并对服务实现各种操作

    > v = sft.ls(remotePath); for(int i=0;i<v.size();i++){ SFTPv3DirectoryEntry s = new SFTPv3DirectoryEntry (); s = (SFTPv3DirectoryEntry) v.get(i); //文件名 String filename = s.filename; //文件的大小 Long > v = sft.ls(remotePath); for(int i=0;i<v.size();i++){ SFTPv3DirectoryEntry s = new SFTPv3DirectoryEntry (); s = (SFTPv3DirectoryEntry) v.get(i); //判断列表中文件是否与指定文件名相同 if(s.filename.equals(fileName))

    69920编辑于 2022-11-13
  • 来自专栏程序员的SOD蜜

    常见.NET功能代码汇总

    site = (DirectoryEntry)root.Invoke("Create", "IIsWebServer", siteID); site.Invoke("Put", apppools = new DirectoryEntry("IIS://" + HostName + "/W3SVC/AppPools"); DirectoryEntry ent = new DirectoryEntry(entPath); foreach (DirectoryEntry child in ent.Children newpool; DirectoryEntry apppools = new DirectoryEntry("IIS://" + HostName + "/W3SVC/ getdir = new DirectoryEntry("IIS://localhost/W3SVC"); foreach (DirectoryEntry getentity

    2.5K100发布于 2018-02-27
  • 来自专栏王磊的博客

    c# 操作IIS应用程序池

    直接代码: using System.DirectoryServices; // 添加引用 System.DirectoryServices try { DirectoryEntry appPool = new DirectoryEntry("IIS://localhost/W3SVC/AppPools"); DirectoryEntry findPool = appPool.Children.Find

    1.4K60发布于 2018-04-26
  • 来自专栏NetCore

    .Net中如何操作IIS

    System.DirectoryServices命名空间中包括了些强大的东东--DirectoryEntry,DirectoryEntries,它们为我们提供了访问活动目录的强大功能,在这些类允许我们操作 创建虚拟目录 DirectoryEntry是.Net给我们的一大礼物,他的名字我们就知道他的功能--目录入口。 首先我们获取一个站点的顶层目录(根目录): DirectoryEntry rootfolder = new DirectoryEntry("IIS://localhost/W3SVC/1/ROOT"); 然后再使用DirectoryEntry的Invoke方法,调用ADSI中的"AppCreate"方法将目录真正创建(似乎不走这一步也可以创建目录成功,但是为了保险起见,大家还是用吧),最后便是依次调用新 这些都可通过对DirectoryEntry的Properties属性集合的赋值来实现。

    2.2K90发布于 2018-02-02
  • 来自专栏蜉蝣禅修之道

    sencha touch结合phonegap开发android下的文件浏览器

    = parentPath.substring(parentPath.lastIndexOf('/') + 1); parentEntry = new DirectoryEntry onError); } else { parentEntry = new DirectoryEntry 好,现在首先来看看phonegap的file类,这里我用到的是DirectoryEntry,该对象代表文件系统中的一个目录,以及DirectoryReader,该对象包含目录中所有的文件和子目录的列表对象 ,可通过DirectoryEntry的createReader()创建,从而通过其readEntry方法找出该目录下所有的子文件和目录,该方法参数分别是成功和失败的回调函数。 getFiles为成功的回调函数,参数为一个包含FileEntry和DirectoryEntry的对象数组。

    1.4K50发布于 2018-05-23
  • 来自专栏JAVA相关

    java读取linux服务器下某文档的内容

    java.util.Vector;import ch.ethz.ssh2.Connection;import ch.ethz.ssh2.SFTPv3Client;import ch.ethz.ssh2.SFTPv3DirectoryEntry v = sft.ls(directory); for (int i = 0; i < v.size(); i++) { SFTPv3DirectoryEntry s = new SFTPv3DirectoryEntry(); s = (SFTPv3DirectoryEntry) v.get(i);

    48710编辑于 2024-12-08
  • 来自专栏Porschev[钟慰]的专栏

    【2013年】开发常见问题回顾(一)

    ."); DirectoryEntry virDir_IKeyMgmt = new DirectoryEntry("IIS://localhost/W3SVC/1/ROOT/虚拟目录名 private string GetWebVirtualDirectoryPath(string identifier, string name) { DirectoryEntry de = new DirectoryEntry("IIS://LOCALHOST/W3SVC/" + identifier + "/ROOT/" + name); string returns></returns> private string GetWebSiteIdentifier(string portNumber) { DirectoryEntry root = new DirectoryEntry("IIS://LOCALHOST/W3SVC"); foreach (DirectoryEntry e in root.Children

    2.4K50发布于 2018-01-16
  • 来自专栏HACK学习

    内网渗透 | 域内DNS信息收集工具编写

    QueryDomainIp { class Program { static void Main(string[] args) { DirectoryEntry coon = new DirectoryEntry(); DirectorySearcher search = new DirectorySearcher(coon);

    1.3K10编辑于 2021-12-14
  • 来自专栏远在上海

    C#开发中Windows域认证登录2(扩展吉日嘎拉GPM系统)

    formsAuthentication, out string statusCode, out string statusMessage)
            {
                DirectoryEntry  dirEntry = new DirectoryEntry();
                dirEntry.Path = lDAP;
                dirEntry.Username

    75210发布于 2019-02-26
  • 来自专栏王二麻子IT技术交流园地

    Java POI Word 写文档

    org.apache.poi.hwpf.HWPFDocument; import org.apache.poi.hwpf.usermodel.Range; import org.apache.poi.poifs.filesystem.DirectoryEntry ByteArrayInputStream(fileCon.getBytes()); POIFSFileSystem fs = new POIFSFileSystem(); DirectoryEntry

    2.8K100发布于 2018-01-02
  • 来自专栏远在上海

    C#开发中Windows域认证登录

    yourdomain,DC=com";
            string lDAP = "DC=CORP,DC=yourdomain,DC=com";
            
            DirectoryEntry  dirEntry = new DirectoryEntry();
            dirEntry.Path = string.Format("LDAP://{0}", lDAP);

    2.1K10发布于 2019-02-26
  • 来自专栏全栈程序员必看

    .NET控件名称缩写一览表「建议收藏」

    ofd OpenFileDialog 5 sfd SaveFileDialog 组件 1 bgw BackgroundWorker 2 dre DirectoryEntry

    1K10编辑于 2022-08-09
  • 来自专栏Java架构师必看

    asp是什么缩写[净含量缩写]

    FolderBrowserDialog  fnd FontDialog  ofd OpenFileDialog  sfd SaveFileDialog 组件  bgw BackgroundWorker  dre DirectoryEntry

    3K20编辑于 2022-02-28
  • 来自专栏谢公子学安全

    微软不认的“0day”之域内本地提权-烂番茄(Rotten Tomato)

    ConsoleApp9 { class Program { static void Main(string[] args) { DirectoryEntry ldap_conn = new DirectoryEntry("LDAP://dc=redteam,dc=com"); DirectorySearcher search = new return; } } //设置资源约束委派 System.DirectoryServices.DirectoryEntry myldapConnection = new System.DirectoryServices.DirectoryEntry("redteam.com"); myldapConnection.Path = null) { System.DirectoryServices.DirectoryEntry entryToUpdate = result.GetDirectoryEntry

    1.5K10编辑于 2022-01-20
领券