摘要: DirectoryEntry root = new DirectoryEntry(@"IIS://localhost/W3SVC");string PInfo = ""; foreach (string elmentName in root.Properties.PropertyNames){ PropertyValueCollection valueCollection = root.Properties[elmentName]; for (int i = 0; i < valueCollection.Count; i++) { PInfo += 阅读全文
posted @ 2013-10-24 16:23 yuejin 阅读(699) 评论(0) 推荐(0) 编辑
摘要: DirectoryEntry root = new DirectoryEntry(@"IIS://localhost/W3SVC");string PInfo = ""; foreach (string elmentName in root.Properties.PropertyNames){ PropertyValueCollection valueCollection = root.Properties[elmentName]; for (int i = 0; i < valueCollection.Count; i++) { PInfo += 阅读全文
posted @ 2013-10-24 16:19 yuejin 阅读(1899) 评论(0) 推荐(0) 编辑
摘要: 使用互斥体Mutex类型using System.Threading;//声明互斥体Mutex mutex = new Mutex(false, "ThisShouldOnlyRunOnce");//判断互斥体是否使用中bool Running = !mutex.WaitOne(0, false);if (!Running) Application.Run(new Form1());else MessageBox.Show("应用程序已经启动!"); 阅读全文
posted @ 2013-10-24 15:26 yuejin 阅读(385) 评论(0) 推荐(0) 编辑
摘要: 当打开IIS管理器,或配置网站时提示错误:配置文件的XML格式不正确且是applicationHost.config的问题,那么肯定是applicationHost.config被破坏,IIS就崩溃。解决办法就是恢复applicationHost.config先检查C:\Windows\System32\inetsrv\config目录下的applicationHost.config文件,最好备份一份使用IIS提供的AppCmd.exe的restore功能恢复applicationHost.config运行命令提示符 键入 cd %windir%\system32\inetsrv,然后按 En 阅读全文
posted @ 2013-10-24 10:49 yuejin 阅读(29602) 评论(2) 推荐(3) 编辑