轉載自 : http://www.cs-open.com/sort/13.html
日誌資訊輸出到各種不同目標的.net類庫。它可以容易的載入到開發專案中,實現程式調試和運行的時候的日誌資訊輸出,提供了比.net自己提供的debug類和trace類的功能更多。log4net是從java下有卓越表現的log4j移植過來的。它是apache基金資助的專案的一部分。
NLog 更新時間(2006-8-2)
NLog是C#編寫的開源日誌類庫 ,它的設計思想是使其簡單而靈活。NLog讓你處理診斷的日誌消息,用相關資訊擴充消息,依照你的選擇格式化日誌消息和把日誌消息輸出到一個或多個目的地。
LogThis 更新時間(2006-8-2)
LogThis是為.NET應用程式提供的一款C#開源日誌框架,它可以嵌入到應用程式之中。
AppLog 更新時間(2006-6-15)
AppLog是一個簡單的應用日誌工具。它使用C#開發,且使用ByteFX MySQL 資料訪問庫.。
C# .NET LOGGER 更新時間(2006-6-15)
C#開發的可擴展日誌工具,有高級消息佇列支援,可以非同步使用。
CSharp Logger 更新時間(2006-6-15)
CSharp Logger是apache繼log4net專案後設計的又一個日誌工具。它用來向Windows的事件日誌寫入debug、info、warn和error四個等級的資訊。
2007年12月9日 星期日
c#搜尋關鍵詞 與 xml (temp=====)
1. DirectorySecurity c# 群組
2. c# 檔案權限
3.
4.
5.
xml 新雲網路 → 網路學院 → .NET專區 → XML 相關 → 文章列表
1. http://www.newasp.net/tech/net/techlist_322_2.html
2.C#對XML操作:寫入一筆XML記錄(1)
3.C#對XML操作:寫入一筆XML記錄(2)
2. c# 檔案權限
3.
4.
5.
xml 新雲網路 → 網路學院 → .NET專區 → XML 相關 → 文章列表
1. http://www.newasp.net/tech/net/techlist_322_2.html
2.C#對XML操作:寫入一筆XML記錄(1)
3.C#對XML操作:寫入一筆XML記錄(2)
Visual C#»目錄&子目錄權限
參考網址 :
http://forums.microsoft.com/MSDN-CHT/ShowPost.aspx?PostID=524250&SiteID=14
您可以透過以下的程式碼設定目錄的存取權限:
FileSecurity fSecurity = File.GetAccessControl("C:/Temp");
fSecurity.AddAccessRule(new FileSystemAccessRule(@"Domain\帳號", FileSystemRights.Read, AccessControlType.Allow));
File.SetAccessControl("C:/Temp", fSecurity);
要套用到子目錄和檔案, 必須使用DirectorySecurityAccessRule類別:
DirectoryInfo di = new DirectoryInfo(Path);
DirectorySecurity ds = di.GetAccessControl();
FileSystemAccessRule ar1 = new FileSystemAccessRule(Account, FileSystemRights.Read, AccessControlType.Allow);
FileSystemAccessRule ar2 = new FileSystemAccessRule(Account, FileSystemRights.Read, InheritanceFlags.ContainerInherit InheritanceFlags.ObjectInherit, PropagationFlags.InheritOnly, AccessControlType.Allow);
ds.AddAccessRule(ar1);
ds.AddAccessRule(ar2);
di.SetAccessControl(ds);
http://forums.microsoft.com/MSDN-CHT/ShowPost.aspx?PostID=524250&SiteID=14
您可以透過以下的程式碼設定目錄的存取權限:
FileSecurity fSecurity = File.GetAccessControl("C:/Temp");
fSecurity.AddAccessRule(new FileSystemAccessRule(@"Domain\帳號", FileSystemRights.Read, AccessControlType.Allow));
File.SetAccessControl("C:/Temp", fSecurity);
要套用到子目錄和檔案, 必須使用DirectorySecurityAccessRule類別:
DirectoryInfo di = new DirectoryInfo(Path);
DirectorySecurity ds = di.GetAccessControl();
FileSystemAccessRule ar1 = new FileSystemAccessRule(Account, FileSystemRights.Read, AccessControlType.Allow);
FileSystemAccessRule ar2 = new FileSystemAccessRule(Account, FileSystemRights.Read, InheritanceFlags.ContainerInherit InheritanceFlags.ObjectInherit, PropagationFlags.InheritOnly, AccessControlType.Allow);
ds.AddAccessRule(ar1);
ds.AddAccessRule(ar2);
di.SetAccessControl(ds);
如何用C#創建、刪除、並且可以對檔夾的屬性(如:可讀、可寫等)設定?
轉貼自: http://topic.csdn.net/u/20070112/17/da78451a-bcb0-4852-ae3b-5c4e21e190a7.html
===================
//!System.IO.Directory.Exists(p)該方法先判斷是否存在該檔夾,其中P是該檔夾的路徑
//使用之前要聲名並賦值,如:string p=@ "d:\我的文件夾 ";
if (!System.IO.Directory.Exists(p))
//執行以下這條語句,就可以創建該檔夾了
System.IO.Directory.CreateDirectory(p);
==============
using System.IO;
string p=@ "d:\我的文件夾 ";
Directory.CreateDirectory(p);//創建
Directory.Delete(p);//刪除
================
//using System.IO;
if(Directory.GetFiles(tmppath).Length==0)
{
//創建目錄
Directory.CreateDirectory(tmppath);
//刪除臨時目錄
Directory.Delete(tmppath,true);
//刪除暫存檔案
File.Delete(filename);
}
===================
//!System.IO.Directory.Exists(p)該方法先判斷是否存在該檔夾,其中P是該檔夾的路徑
//使用之前要聲名並賦值,如:string p=@ "d:\我的文件夾 ";
if (!System.IO.Directory.Exists(p))
//執行以下這條語句,就可以創建該檔夾了
System.IO.Directory.CreateDirectory(p);
==============
using System.IO;
string p=@ "d:\我的文件夾 ";
Directory.CreateDirectory(p);//創建
Directory.Delete(p);//刪除
================
//using System.IO;
if(Directory.GetFiles(tmppath).Length==0)
{
//創建目錄
Directory.CreateDirectory(tmppath);
//刪除臨時目錄
Directory.Delete(tmppath,true);
//刪除暫存檔案
File.Delete(filename);
}
2007年12月8日 星期六
請問如何透過自己寫的程式去 設定資料夾的共用 包刮他的的使用者權限
參考網址:http://forums.microsoft.com/MSDN-CHT/ShowPost.aspx?PostID=722983&SiteID=14
System.directoryServices這個Namespace是給AD操作用的,並不是指資料庫的權限。
請您參考以下網址,裡面也有提供您簡單的Sample Code可以測試:
http://msdn2.microsoft.com/en-US/library/system.io.directoryinfo.setaccesscontrol.aspx
主要要用到兩個Namespace:
System.IO
System.Security.AccessControl
System.directoryServices這個Namespace是給AD操作用的,並不是指資料庫的權限。
請您參考以下網址,裡面也有提供您簡單的Sample Code可以測試:
http://msdn2.microsoft.com/en-US/library/system.io.directoryinfo.setaccesscontrol.aspx
主要要用到兩個Namespace:
System.IO
System.Security.AccessControl
HOW TO:設定 EventLog 元件執行個體
HOW TO:設定 EventLog 元件執行個體
參考網頁: http://msdn2.microsoft.com/zh-tw/library/w3t54f67(VS.80).aspx
參考網頁: http://msdn2.microsoft.com/zh-tw/library/w3t54f67(VS.80).aspx
如何儲存和藉由使用 Visual C# 中從應用程式組態檔擷取自訂資訊
如何儲存和藉由使用 Visual C# 中從應用程式組態檔擷取自訂資訊
參考網頁: http://support.microsoft.com/kb/815786/zh-tw
參考網頁: http://support.microsoft.com/kb/815786/zh-tw
Visual C# . NET 程式碼來修改登錄機碼
Visual C# . NET 程式碼來修改登錄機碼
http://support.microsoft.com/kb/313723/zh-tw
using Microsoft.Win32;
//...............................
public void IESetupFooter()
{
string strKey = "Software\\Microsoft\\Internet Explorer\\PageSetup";
bool bolWritable = true; string strName = "footer";
object oValue = "Test Footer";
RegistryKey oKey = Registry.CurrentUser.OpenSubKey(strKey,bolWritable);
Console.Write (strKey);
oKey.SetValue(strName,oValue);
oKey.Close();
}
請注意 您的應用程式必須要有: 讀取和寫入權
http://support.microsoft.com/kb/313723/zh-tw
using Microsoft.Win32;
//...............................
public void IESetupFooter()
{
string strKey = "Software\\Microsoft\\Internet Explorer\\PageSetup";
bool bolWritable = true; string strName = "footer";
object oValue = "Test Footer";
RegistryKey oKey = Registry.CurrentUser.OpenSubKey(strKey,bolWritable);
Console.Write (strKey);
oKey.SetValue(strName,oValue);
oKey.Close();
}
請注意 您的應用程式必須要有: 讀取和寫入權
2007年12月7日 星期五
轉載自--傳動網絡,打造專業的繁體站長站、教程網![www.jiaojiang.org]
使用C#開發一個簡單的P2P應用 http://www.jiaojiang.org/html/7/9/9301/1.htm
C#語言由於其對網路功能良好的支持,特別是內置地支持TCPListener和TCPClient這二個類,使得利用它開發P2P應用程序變得非常容易。下面就是一個使用C#開發的P2P應用的例子:......
使用C#開發一個簡單的P2P應用 http://www.jiaojiang.org/html/7/9/9301/1.htm
C#語言由於其對網路功能良好的支持,特別是內置地支持TCPListener和TCPClient這二個類,使得利用它開發P2P應用程序變得非常容易。下面就是一個使用C#開發的P2P應用的例子:......
--C#-簡單的掃Port程式
轉載自--記憶是苦難的開始 ---http://tw.myblog.yahoo.com/jw!v9EKjxOXCkSQzfYe5uE-/article?mid=36
C#-簡單的掃Port程式
一個很簡單的掃Port程式可以掃本機或者遠端主機支援IP或DomainIP和Domain的差別在於如果輸入的是Domain該Domain若含一個以上的ip也會被掃瞄下個版本計畫加入多線程下載位置http://mamba.zapto.org/project/scanport.rar
C#-簡單的掃Port程式
一個很簡單的掃Port程式可以掃本機或者遠端主機支援IP或DomainIP和Domain的差別在於如果輸入的是Domain該Domain若含一個以上的ip也會被掃瞄下個版本計畫加入多線程下載位置http://mamba.zapto.org/project/scanport.rar
藍色小鋪的討論區列表文章>>c#
C#---> 一個 WMI 在 winxp sp2 下會發生的問題:
http://www.blueshop.com.tw/board/show.asp?subcde=BRD20051220004003QQ1&fumcde=FUM20050124192253INM
http://www.blueshop.com.tw/board/show.asp?subcde=BRD20051220004003QQ1&fumcde=FUM20050124192253INM
訂閱:
文章 (Atom)