久久综合九色综合97飘花,日本 亚洲 欧美,国产农村乱色xxxxhttp://www.bjzhda.cnzh-cn曙海教育集團論壇http://www.bjzhda.cnRss Generator By Dvbbs.Netofficeoffice@126.comimages/logo.gif曙海教育集團論壇用vs.net2003開發,然后發布在使用.netframework1.0的服務器上出現的問題http://www.xinguifushi.cn/bbs/dispbbs.asp?BoardID=78&ID=2649&Page=1wangxinxin2010-12-15 11:33:06問:
我用vs.net2003測試一個小程序,能正常運行。但把它發布到安裝framework1.0的服務器上,出現如下錯誤:
代碼如下:
========================================
    private void Page_Load(object sender, System.EventArgs e)
    {
        try
        {
 string s = this.Request.Params["Folder"]; //如果刪除這句,1.0的服務器上運行就會正常。
        }
        catch{}
    }

上面那句導致的錯誤catch無法捕獲。運行時候瀏覽器中顯示如下錯誤:
=================================
File or assembly name System, or one of its dependencies, was not found.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileNotFoundException: File or assembly name System, or one of its dependencies, was not found.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

Assembly Load Trace: The following information can be helpful to determine why the assembly 'System' could not be loaded.


=== Pre-bind state information ===
LOG: DisplayName = System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
 (Fully-specified)
LOG: Appbase = file:///E:/wwwroot/aspxuser/hahahawk.17163.com
LOG: Initial PrivatePath = bin
Calling assembly : Wrox.WebModules.FileManager.Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.
===

LOG: Publisher policy file is not found.
LOG: No redirect found in host configuration file (C:\WINNT\Microsoft.NET\Framework\v1.0.3705\aspnet.config).
LOG: Using machine configuration file from C:\WINNT\Microsoft.NET\Framework\v1.0.3705\config\machine.config.
LOG: Post-policy reference: System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
LOG: Attempting download of new URL file:///C:/WINNT/Microsoft.NET/Framework/v1.0.3705/Temporary ASP.NET Files/root/646c7f18/82ce05e1/System.DLL.
LOG: Attempting download of new URL file:///C:/WINNT/Microsoft.NET/Framework/v1.0.3705/Temporary ASP.NET Files/root/646c7f18/82ce05e1/System/System.DLL.
LOG: Attempting download of new URL file:///E:/wwwroot/aspxuser/hahahawk.17163.com/bin/System.DLL.
LOG: Attempting download of new URL file:///E:/wwwroot/aspxuser/hahahawk.17163.com/bin/System/System.DLL.
LOG: Attempting download of new URL file:///C:/WINNT/Microsoft.NET/Framework/v1.0.3705/Temporary ASP.NET Files/root/646c7f18/82ce05e1/System.EXE.
LOG: Attempting download of new URL file:///C:/WINNT/Microsoft.NET/Framework/v1.0.3705/Temporary ASP.NET Files/root/646c7f18/82ce05e1/System/System.EXE.
LOG: Attempting download of new URL file:///E:/wwwroot/aspxuser/hahahawk.17163.com/bin/System.EXE.
LOG: Attempting download of new URL file:///E:/wwwroot/aspxuser/hahahawk.17163.com/bin/System/System.EXE.

 

Stack Trace:

]]>
使用 .NET Frameworkhttp://www.xinguifushi.cn/bbs/dispbbs.asp?BoardID=78&ID=2648&Page=1wangxinxin2010-12-15 11:29:42
  C:\(base Windows directory)\Microsoft.NET\Framework\(framework version)

  在我的計算機上,由于安裝的操作系統是 Windows 2000,所以 .NET Framework 1.1 版本安裝在 winnt 目錄下,所以其路徑是:

  C:\winnt\Microsoft.NET\Framework\v1.1.4322

  這個目錄包含無數的 dll,配置文件和可執行文件,等等。在這篇文章中,我將把重點放在可執行文件上。下面是這些程序的一個綱要:

  Al.exe:程序集鏈接器(Assembly Linker),該工具從一個或多個模塊或者資源文件生成一個帶有一個程序集清單的文件。模塊是一個沒有程序集清單的微軟中間語言文件(MSIL)。所有的 Visual Studio 編譯器都生成程序集。然而,如果你有一個或多個模塊(沒有清單的元數據),你可以利用 Al.exe 工具使用一個獨立文件中的清單創建一個程序集。

  Aspnet_regiis.exe:這個工具允許你在 IIS 上安裝 ASP.NET。此外,它還可以簡化同時運行的多個 ASP.NET 版本的使用。它允許你為 ASP.NET 應用程序更新腳本映射以指向與該工具關聯的ASP.NET ISAPI 版本。這個工具還可以用來顯示所有安裝的ASP.NET 版本的狀態,注冊 ASP.NET 版本以及工具,創建客戶端腳本目錄,完成其它配置操作。

  Aspnet_state.exe:這個工具允許會話狀態信息存儲在一臺計算機上。它以一個服?裨誦校綣嶧白刺畔⒋媧⒃諞惶ㄔ凍碳撲慊希霉ぞ咭部梢園滄暗僥翹ㄔ凍碳撲慊稀?

  Caspol.exe:代碼訪問安全策略(Code Access Security Policy)工具,該工具能夠讓用戶和管理員在機器策略級、用戶策略級和企業策略級修改安全策略。你可以使用Caspol.exe 編寫一個批處理腳本來配置安全策略。

  ConfigWizards.exe:這個工具啟動 .NET 向導窗口(Windows Control Panel | Administrative Tools | Microsoft .NET Framework Wizards 1.1)。它提供對以下三個工具的訪問:Adjust .NET Security、Trust An Assembly 和Fix An Application。

  csc.exe:Visual C# 編譯器。/debug 開關進入調試模式。

  cvtres.exe:資源對象轉換器(資源轉換成對象)。這個工具通常用來將一個二進制資源文件轉成一個對象文件。本地資源通常以 .rc 文件開始,然后被 rc.exe 編譯成一個 .res 文件,然后再由 cvtres.exe 工具轉成一個 .obj 文件,最后像其它 .obj 文件一樣被鏈接到你的本地應用程序中。

  dw15.exe:這個工具給出在使用 .NET Framework 時你想看到的錯誤消息。錯誤消息詢問你是否想發送一個錯誤報告給微軟。(很多用戶控告這個小程序是微軟的間諜軟件。)

  Gacutil.exe:全局程序集緩存(Global Assembly Cache)工具,該工具用于管理程序集緩存。它可以用來查看全局緩存的內容,添加或刪除程序集。要想使用該工具列出全局程序集緩存(GAC)的所有程序集,可以使用/l 開關。(/i 開關安裝程序集,/u 開關刪除程序集。)

  IEExec.exe:這個工具簡化使用 URL 啟動的應用程序的測試,包括無觸點開發 Windows Form 之類的應用程序。工具 IEExec.exe 可以代替 IDE 調試這些應用程序。它只接受 URL 參數(例如,IEExec.exe http://Server/TheApplication.Exe。);它不允許指定區域設置和站點設置。如果你試圖指定區域設置和站點設置,就會出現錯誤。

  Ilasm.exe:MSIL匯編程序(Assembler),該工具從 MSIL 程序集生成一個可移植的可執行文件(PE)。你可以運行生成的可執行文件以確定 MSIL 是否生成了你要的東西。

  Installutil.exe:安裝程序(Installer)工具,該工具允許你在一個指定的程序集中執行安裝程序組件來安裝和卸載服務器資源。這個工具與System.Configuration.Install 命名空間中的類聯合工作。例如,在安裝一個 Windows 服務時這個工具會被用到。

  jsc.exe:一個 _JSciprt .NET 編譯器。/debug 開關進入調試模式。

  Migpol.ex:遷移策略(Migration Policy)工具,該工具提供在兩個可兼容的 .NET Framework 版本之間遷移策略的能力。

  Ngen.exe:原生圖像生成器(Native Image Generator),該工具從一個托管程序集創建一個原生圖像,并將其安裝到位于本地計算機的原生圖像緩存上。原生圖像緩存是 GAC 的保留區域。一旦你為一個程序集創建了一個原生圖像,之后程序集每次運行時運行庫(runtime)就會自動使用那個原生圖像。

  Regasm.exe:程序集注冊(Assembly Registration)工具,該工具讀取一個程序集中的元數據,將必要的條目添加到注冊表中;這樣就允許 COM 客戶端透明地創建 .NET Framework 類。在 .NET Framework 類被注冊之后,任何 COM 客戶端就可以使用它,就好像它是一個 COM 類一樣。.NET Framework 類只會被注冊一次,就是在程序集被安裝時注冊。在程序集中的 .NET Framework 類被注冊之前,它們的實例不能從 COM 創建。

  Regsvcs.exe:這個服務安裝工具可以用來裝載和注冊程序集,注冊和安裝類型庫,或者配置添加到一個類的服務。Regsvcs.exe 需要一個由assemblyFile.dll 指定的源程序集文件。這個程序集必須使用強名簽名。.NET Framework SDK 中提供了強名工具(Sn.exe)。

  vbc.exe:Visual Basic .NET 編譯器。/debug 開關進入調試模式。

  vbj.exe:Visual J# .NET 編譯器。/debug 開關進入調試模式。

  這些工具能夠進行全部的 .NET 開發。多數這些工具都支持命令行開關(也就是命令行后接一個斜線)。這些開關允許你指定設置選擇或者使用工具的其它方面(像編譯器的 /debug 選項)。你可以在命令后面輸入 /? 或者 /help 獲得工具命令行開關選項的完整列表。這樣就提供給你使用工具的完整的語法信息。

  我通常喜歡使用友好的 Visual Studio .NET 環境,但是在造訪一位客戶之后,我現在開始欣賞命令行選項了。我到了他們那里安裝了更改了的代碼,但是我還必須現在場做一些額外的更改。這些更改就需要重新編譯代碼,但是我的機器沒有安裝Visual Studio .NET。幸運的是,我能夠使用命令行工具完成這些工作。

  選擇界面

  很多開發人員喜歡 Visual Studio .NET 和其它開發工具的圖形環境,但是另外一個派別的開發人員則非常喜歡由命令行環境提供的控制權。讓人感到欣慰的是,微軟提供了這兩種開發應用程序的方法,具體選用哪種方法就看你的喜好了。 ]]>
ASP控制虛擬主機函數ADSIhttp://www.xinguifushi.cn/bbs/dispbbs.asp?BoardID=78&ID=2647&Page=1wangxinxin2010-12-15 11:27:17 使用ASP設置指定站點CPU最大使用程度
'=================================================
'函數介紹:設置指定站點CPU最大使用程度
'本函數使用ADSI,需要Administrators組用戶權限
'函數名稱:SetCPULimitVar (Computer,SiteNum,LimitVar)
'用法:SetCPULimitVar 計算機名,站點編號,最大限制值(100=1%,1000=10%)
'例:SetCPULimitVar "LocalHost","2","2000"
'=================================================
Function SetCPULimitVar(Computer,SiteNum,LimitVar)
Set MyObj001 = GetObject("IIS://"&Computer&"/W3SVC/"&SiteNum)
'設置啟用CPU限制
MyObj001.CpuLimitsEnabled = True
'設置限制使用額度值
MyObj001.CpuLimitLogEvent=LimitVar
MyObj001.setinfo
Set MyObj001=Nothing
End Function

使用ASP在IIS創建WEB站點的函數
'=============================================================
'函數介紹:創建WebSite
'本函數使用ADSI,需要Administrators組用戶權限
'函數名稱:CreateWebSite(Computer,IPAddr,PortNum,HostName,WebSiteDirectory,LogDirectory,WebSiteInfo,GuestUserName,GuestUserPass,StartOrStop)
'用法:CreateWebSite 計算機名(一搬為LocalHost或127.0.0.1),站點IP地址,端口號,主機名,站點根目錄,,LOG文件的目錄站點說明,網站訪問時所使用的帳號,網站訪問時所用帳號的口令,是否啟動站點
'例:CreateWebSite "LocalHost","127.0.0.123","80","http://www.test.net","E:/UserData/UserNum001","E:/UserData/UserNum001/LogFiles","wwwtest.net","IUSR_Num001_test.net","abc888",True' target=_blank>www.test.net","E:\UserData\UserNum001","E:\UserData\UserNum001\LogFiles","wwwtest.net","IUSR_Num001_test.net","abc888",True
'=============================================================
Function CreateWebSite(Computer,IPAddr,PortNum,HostName,WebSiteDirectory,LogDirectory,WebSiteInfo,GuestUserName,GuestUserPass,StartOrStop)
Dim w3svc, WebServer, NewWebServer, NewDir
Dim Bindings, BindingString, NewBindings, SiteNum, SiteObj, bDone
On Error Resume Next
Err.Clear
'檢測是否能夠加載W3SVC服務(即WEB服務)
Set w3svc = GetObject("IIS://" & Computer & "/w3svc")
If Err.Number <> 0 Then '顯示錯誤提示
  response.write "無法打開: "&"IIS://" & Computer & "/w3svc"
  response.end
End If
'檢測是否有設定相同IP地址、端口及主機名的站點存在
BindingString = IPAddr & ":" & PortNum & ":" & HostName
For Each WebServer in w3svc
  If WebServer.Class = "IIsWebServer" Then
  Bindings = WebServer.ServerBindings
   If BindingString = Bindings(0) Then
    response.write "IP地址沖突:" & IPAddr & ",請檢測IP地址!."
    Exit Function
   End If
  End If
Next


'確定一個不存在的站點編號做為新建站點編號,系統默認WebSite站點編號為1,因此從2開始
SiteNum=2
bDone = False
While (Not bDone)
Err.Clear
Set SiteObj = GetObject("IIS://"&Computer&"/w3svc/"&SiteNum) '加載指定站點
If (Err.Number = 0) Then
  'response.write " Step_1站點"&SiteNum&"存在"
  SiteNum = SiteNum + 1
Else
  'response.write " Step_1站點"&SiteNum&"不存在"
  Err.Clear
  Set NewWebServer = w3svc.Create("IIsWebServer",SiteNum) '創建指定站點
  If (Err.Number <> 0) Then
   'response.write " Step_2站點"&SiteNum&"創建失敗"
   SiteNum = SiteNum + 1
  Else
   'response.write " Step_2站點"&SiteNum&"創建成功"
   bDone = True
  End If
End If
If (SiteNum > 50) Then '服務器最大創建站點數
  response.write "超出服務器最大創建站點數,正在創建的站點的序號為: "&SiteNum&"."
  response.end
End If
Wend


'進行站點基本配置
NewBindings = Array(0)
NewBindings(0) = BindingString
NewWebServer.ServerBindings = NewBindings
NewWebServer.ServerComment= WebSiteInfo
NewWebServer.AnonymousUserName= GuestUserName
NewWebServer.AnonymousUserPass= GuestUserPass
NewWebServer.KeyType = "IIsWebServer"
NewWebServer.FrontPageWeb = True
NewWebServer.EnableDefaultDoc = True
NewWebServer.DefaultDoc = "Default.htm, Default.asp, Index.htm, Index.asp"
NewWebServer.LogFileDirectory= LogDirectory
NewWebServer.SetInfo
Set NewDir = NewWebServer.Create("IIsWebVirtualDir", "ROOT")
NewDir.Path = WebSiteDirectory
NewDir.AccessRead = true
NewDir.AppFriendlyName = "應用程序" & WebSiteInfo
NewDir.AppCreate True
NewDir.AccessScript = True
Err.Clear
NewDir.SetInfo
If (Err.Number <> 0) Then
  response.write "主目錄創建時出錯."
  response.end
End If
If StartOrStop = True Then
  Err.Clear
  Set NewWebServer = GetObject("IIS://" & Computer & "/w3svc/" & SiteNum)
  NewWebServer.Start
  If Err.Number <> 0 Then
   response.write "啟動站點時出錯!"
   response.end
   Err.Clear
  End If
End If
response.write "站點創建成功,站點編號為:"& SiteNum &" ,域名為:"& HostName
End Function

]]>
.Net Framework Client Profile 和 .Net Frameworkhttp://www.xinguifushi.cn/bbs/dispbbs.asp?BoardID=78&ID=2646&Page=1wangxinxin2010-12-15 11:23:49參看:http://msdn.microsoft.com/zh-cn/library/cc656912.aspx

在VS2010 中,你默認建立的 WPF 程序就是.Net Framework 4 Client Profile ,而不是.Net Framework 4。昨天下午到今天早上,我在為 System.Web 無法引用而苦惱的問題,就是它導致的。 

VS2010中,我們在項目的屬性下,可以看到項目有以下多種 Target framework 屬性。

圖片點擊可在新窗口打開查看

我今天碰到的 Sytem.Web 引用問題如下:

在用 VS2010 Beta2 書寫一個WPF應用的時候,要使用 System.Web.HttpUtility.UrlEncode()方法時,發現竟然無法增加對 System.Web 的引用。如下圖:

.NET Reference 中沒有 System.Web 組件。

圖片點擊可在新窗口打開查看 

使用 Browse 方式打開指定目錄的文件 C:\Windows\Microsoft.NET\Framework\v4.0.21006\System.Web.dll  也不行。

如下圖:

圖片點擊可在新窗口打開查看 

GAC 中也沒有 4.0 版本的 System.Web 組件,如下圖:

圖片點擊可在新窗口打開查看

強制添加 C:\Windows\Microsoft.NET\Framework\v4.0.21006\System.Web.dll   到GAC 時會報錯誤:

 

---------------------------
Cannot Add Assembly
---------------------------
Unable to add the selected assembly. The assembly must have a strong name (name, version and
public key).
---------------------------
確定
---------------------------

 

 

這個文件的信息如下:

圖片點擊可在新窗口打開查看

但是VS2010 Beta2 建立的 Web 項目,默認就有 System.Web 的引用,這里沒有任何問題,如下圖:

圖片點擊可在新窗口打開查看

查看這時候的 System.Web 屬性,如下:

圖片點擊可在新窗口打開查看

把 C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Web.dll 放入 GAC也會報錯誤:

 

---------------------------
Cannot Add Assembly
---------------------------
Unable to add the selected assembly. The assembly must have a strong name (name, version and
public key).
---------------------------
確定
---------------------------
]]>
Microsoft.NET PetShop4架構與技術分析http://www.xinguifushi.cn/bbs/dispbbs.asp?BoardID=78&ID=2645&Page=1wangxinxin2010-12-15 11:21:461.項目概述與架構分析
微軟剛推出了基于ASP.NET 2.0下的Pet Shop 4, 該版本有了一個全新的用戶界面。是研究ASP.NET 2.0的好范例啊,大家都知道,一直以來,在.NET和Java之間爭論不休,到底使用哪個平臺開發的企業級應用性能最好、結構最優、生產力最高。為了用事實說話,通過對項目各方面的性能評估進而在比較.NET和Java的高下。用戶做比較的這個項目就是Petshop。正因為Petshop肩負著上面所說的重任,各方面必須是最優的,架構設計應該是經過慎重考慮的。所以其一經推出,便成為了開發者、架構師等人學習、研究的典范。

日前微軟推出了基于.NET Framework 2.0開發的Petshop 4。新的Petshop4實現了與Petshop 3相同甚至更多的特性,由于采用了Master Pages,Membership,以及Profile,SqlCacheDependency,但是代碼量卻減少了四分之一。同時,在事務、數據緩存、安全方面使用了.NET 2.0附帶的特性,構建了一個靈活的最佳實踐的應用程序。


他們利用了Project Conversion Wizard把項目從ASP.NET 1.1移植到了ASP.NET 2.0,然后做了以下改動:

1.用System.Transactions代替了原來的Serviced Components提供的事務功能

代碼實現:PetShop.BLL.OrderSynchronous 的 public void Insert(PetShop.Model.OrderInfo order)。

2.用強類型的范型集合代替了原來的弱類型集合

        public IList<ProductInfo> GetProductsByCategory(string category)

        {

            // Return new if the string is empty

            if (string.IsNullOrEmpty(category))

                return new List<ProductInfo>();

 

            // Run a search against the data store

            return dal.GetProductsByCategory(category);

        }

3.采用ASP.NET 2.0 Membership來做認證和授權

4.創建了針對Oracle 10g的Custom  ASP.NET 2.0 Membership Provider

5.利用ASP.NET 2.0的Custom Oracle 和 SQL Server Profile Providers 做用戶狀態管理,包括購物車等

6.采用了Master Pages,取代了原來的用戶控件,來實現統一的界面效果

7.使用了ASP.NET 2.0 Wizard控件實現check-out

8.使用了SqlCacheDependency來實現數據庫層次的緩存更新(cache invalidation)功能

9.使用了消息隊列來實現異時訂單處理。

 

2.整體架構:


數據庫:(暫略)

項目列表:從整體可以看出,Pet Shop 4的項目體系已經很龐大,考慮的方面也較3.0更全面復雜。


序號

項目名稱

描述

1

BLL

業務邏輯層

2

CacheDependencyFactory

緩存依賴類的工廠類

3

WEB

表示層

4

DALFactory

數據層的抽象工廠

5

DBUtility

數據訪問類組件

6

IBLLStrategy

同步/異步策略接口

7

ICacheDependency

緩存依賴類接口

8

IDAL

數據訪問層接口定義

9

IMessaging

異時處理消息隊列接口定義

10

IProfileDAL

Profile的數據訪問層接口定義

11

Membership

Membership認證和授權管理

12

MessagingFactory

異時處理消息隊列的抽象工廠

13

Model

業務實體

14

MSMQMessaging

異時處理消息隊列的實現

15

OracleDAL

Oracle數據訪問層

16

OracleProfileDAL

Oracle的Profile Providers

做用戶狀態管理,包括購物車等

17

OrderProcessor

后臺處理進程,處理訂單隊列

18

Profile

Profile的數據訪問層

19

ProfileDALFactory

ProfileDAL的工廠類(反射創建ProfileDAL)

20

SQLProfileDAL

SQL Server 的Profile Providers

做用戶狀態管理,包括購物車等

21

SQLServerDAL

SQLServer數據訪問層

22

TableCacheDependency

緩存依賴實現類


項目分解

由于整體已經有22個項目,所以,對于初學者一看就暈了,所以,我做了分解,可以大體上分幾塊去理解。

序號

項目名稱

描述

1

WEB

表示層

2

Model

業務實體

3

BLL

業務邏輯層

4

DALFactory

數據層的抽象工廠

5

IDAL

數據訪問層接口定義

6

SQLServerDAL

SQLServer數據訪問層

7

OracleDAL

Oracle數據訪問層

8

DBUtility

數據庫訪問組件基礎類

9

CacheDependencyFactory

緩存依賴類的工廠類

10

ICacheDependency

緩存依賴類接口

11

TableCacheDependency

緩存依賴實現類

12

IBLLStrategy

同步/異步處理策略接口(實現在bll根據配置反射選擇)

13

MessagingFactory

異時處理消息隊列的抽象工廠

14

IMessaging

異時處理消息隊列接口定義

15

MSMQMessaging

異時處理消息隊列的實現

16

Profile

Profile的數據訪問層

17

ProfileDALFactory

ProfileDAL的工廠類(反射創建ProfileDAL)

18

IProfileDAL

Profile的數據訪問層接口定義

19

OracleProfileDAL

Oracle的Profile Providers

做用戶狀態管理

20

SQLProfileDAL

SQL Server 的Profile Providers

做用戶狀態管理

21

Membership

Membership認證和授權管理

22

OrderProcessor

后臺處理進程,處理訂單隊列

 



3.Petshop 4中的設計模式

工廠模式:

首當其沖的就是工廠模式,很容易就可以看出來,也是應用最多的。

DALFactory:數據訪問層的抽象工廠(決定創建哪種數據庫類型的數據訪問層。可以選擇:SQLServer,Oracle)

CacheDependencyFactory:緩存依賴類的工廠類。(創建具體表的緩存依賴)

MessagingFactory :異時處理消息隊列的抽象工廠(反射創建具體的異時處理類)

ProfileDALFactory:ProfileDAL的工廠類(反射選擇創建Oracle 和SQL Server的 ProfileDAL)

]]>
基于.NET Framework的Web管理系統研究與開發(C#)http://www.xinguifushi.cn/bbs/dispbbs.asp?BoardID=78&ID=2644&Page=1wangxinxin2010-12-15 11:14:49  關鍵詞:C#;控件;數據獲取;數據綁定

  中圖分類號:TP311文獻標識碼:A文章編號:1009-3044(2010)17-4660-04

  Based on .Net Framework's Research and Development about Web Management System (C#)

  CHEN Zhao-yun, DONG Hai-yan, ZHOU Yong-fu

  (Heyuan Vocational Technical College of Electronics and Information Engineering, Heyuan 517000, China)

  Abstract: This composition introduces Users Manager System of Web in details from the system’s environment to the system’s framework and development’s technology.It can helps many programmers to solve the problems about C# programming、using components about .NET framwork、data Acquisition、databinding and so on.

  Key words: C#; components; data Acquisition; databinding

  Microsoft.NET Framework是微軟于2000年推出的用于構建新一代Internet集成服務平臺的最新框架,這種集成服務平臺允許各種系統環境下的應用程序通過互聯網進行通信和共享數據。

]]>
Microsoft .NET vs. J2EE:http://www.xinguifushi.cn/bbs/dispbbs.asp?BoardID=78&ID=2643&Page=1wangxinxin2010-12-15 11:13:20What exactly is the .NET platform [and] how does the .NET architecture measure up against J2EE?

Java runs on any platform with a Java VM. C# only runs in Windows for the foreseeable future.

.NET and J2EE offer pretty much the same laundry list of features, albeit in different ways.

By allowing cross-language component interactions, .NET is enfranchising Perl, Eiffel, Cobol, and other programmers.

.NET is a good thing for those of you committed to Microsoft architectures.

.NET will undoubtedly become the default development environment for Microsoft platforms.

However, several of the goals of the .NET platform are fairly lofty and not at all guaranteed to fly, at least not in the short term.

It would be easy to dismiss .NET as more Microsoft marketing-ware and continue on your merry way. But don't.

[Microsoft is] fighting Java and open source initiatives on their own terms, putting their own spin on "open" and attempting to directly address the needs of developers.

If you consider yourself an evangelist for Java or open source platforms, then the nature of the war is changing. Be prepared.

Microsoft has put a stake in the ground with SOAP, and they're pushing hard to put something understandable and useful in the hands of developers. J2EE proponents need to do the same with their platform.

Even if you don't write code dedicated to Microsoft platforms, you have probably heard by now about Microsoft .NET, Microsoft's latest volley in their campaign against all things non-Windows. If you've read the media spin from Microsoft, or browsed through the scant technical material available on the MSDN site, or even if you attended the Microsoft Professional Developers' Conference (where the .NET platform was officially "launched"), you're probably still left with at least two big questions:

  • What exactly is the .NET platform?
  • How does the .NET architecture measure up against J2EE?

And, if you think more long-term, you might have a third question rattling around your head:

  • What can we learn from the .NET architecture about pushing the envelope of enterprise software development?

The .NET framework is at a very early stage in its lifecycle, and deep details are still being eked out by the Microsoft .NET team. But we can, nevertheless, get fairly decent answers to these questions from the information that's already out there.

What is it?

Current ruminations about .NET in various forums are reminiscent of the fable of the three blind men attempting to identify an elephant: It's perceived as very different things, depending on your perspective. Some see .NET as Microsoft's next-generation Visual Studio development environment. Some see it as yet another new programming language (C#). Some see it as a new data-exchange and messaging framework, based on XML and SOAP. In reality, .NET wants to be all of these things, and a bit more.

First, let's get some concrete details. Here's one cut at an itemized list of the technical components making up the .NET platform:

  • C#, a "new" language for writing classes and components, that integrates elements of C, C++, and Java, and adds additional features, like metadata tags, related to component development.

  • A "common language runtime", which runs bytecodes in an Internal Language (IL) format. Code and objects written in one language can, ostensibly, be compiled into the IL runtime, once an IL compiler is developed for the language.

  • A set of base components, accessible from the common language runtime, that provide various functions (networking, containers, etc.).

  • ASP+, a new version of ASP that supports compilation of ASPs into the common language runtime (and therefore writing ASP scripts using any language with an IL binding).

  • Win Forms and Web Forms, new UI component frameworks accessible from Visual Studio.

  • ADO+, a new generation of ADO data access components that use XML and SOAP for data interchange.

How do .NET and J2EE compare?

As you can see, the .NET platform has an array of technologies under its umbrella. Microsoft is ostensibly presenting these as alternatives to other existing platforms, like J2EE and CORBA, in order to attract developers to the Windows platform. But how do the comparisons play out item-by-item? One way to lay out the alternatives between .NET and J2EE is shown in the following table:

Microsoft.NET J2EE Key differentiators
C# programming language Java programming language C# and Java both derive from C and C++. Most significant features (e.g., garbage collection, hierarchical namespaces) are present in both. C# borrows some of the component concepts from JavaBeans (properties/attributes, events, etc.), adds some of its own (like metadata tags), but incorporates these features into the syntax differently.

Java runs on any platform with a Java VM. C# only runs in Windows for the foreseeable future.

C# is implicitly tied into the IL common language runtime (see below), and is run as just-in-time (JIT) compiled bytecodes or compiled entirely into native code. Java code runs as Java Virtual Machine (VT) bytecodes that are either interpreted in the VM or JIT compiled, or can be compiled entirely into native code.

.NET common components (aka the ".NET Framework SDK") Java core API High-level .NET components will include support for distributed access using XML and SOAP (see ADO+ below).
Active Server Pages+ (ASP+) Java ServerPages (JSP) ASP+ will use Visual Basic, C#, and possibly other languages for code snippets. All get compiled into native code through the common language runtime (as opposed to being interpreted each time, like ASPs). JSPs use Java code (snippets, or JavaBean references), compiled into Java bytecodes (either on-demand or batch-compiled, depending on the JSP implementation).
IL Common Language Runtime Java Virtual Machine and CORBA IDL and ORB .NET common language runtime allows code in multiple languages to use a shared set of components, on Windows. Underlies nearly all of .NET framework (common components, ASP+, etc.).

Java's Virtual Machine spec allows Java bytecodes to run on any platform with a compliant JVM.

CORBA allows code in multiple languages to use a shared set of objects, on any platform with an ORB available. Not nearly as tightly integrated into J2EE framework.

Win Forms and Web Forms Java Swing Similar web components (e.g., based on JSP) not available in Java standard platform, some proprietary components available through Java IDEs, etc.

Win Forms and Web Forms RAD development supported through the MS Visual Studio IDE - no other IDE support announced at this writing. Swing support available in many Java IDEs and tools.

ADO+ and SOAP-based Web Services JDBC, EJB, JMS and Java XML Libraries (XML4J, JAXP) ADO+ is built on the premise of XML data interchange (between remote data objects and layers of multi-tier apps) on top of HTTP (AKA, SOAP). .NET's web services in general assume SOAP messaging models. EJB, JDBC, etc. leave the data interchange protocol at the developer's discretion, and operate on top of either HTTP, RMI/JRMP or IIOP.

The comparisons in this table only scratch the surface. Here's an executive summary of .NET vs. J2EE:

Features: .NET and J2EE offer pretty much the same laundry of list of features, albeit in different ways.

Portability: The .NET core works on Windows only but theoretically supports development in many languages (once sub-/supersets of these languages have been defined and IL compilers have been created for them). Also, Net's SOAP capabilities will allow components on other platforms to exchange data messages with .NET components. While a few of the elements in .NET, such as SOAP and its discovery and lookup protocols, are provided as public specifications, the core components of the framework (IL runtime environment, ASP+ internals, Win Forms and Web Forms component "contracts", etc.) are kept by Microsoft, and Microsoft will be the only provider of complete .NET development and runtime environments. There has already been some pressure by the development community for Microsoft to open up these specifications, but this would be counter to Microsoft's standard practices.

J2EE, on the other hand, works on any platform with a compliant Java VM and a compliant set of required platform services (EJB container, JMS service, etc., etc.). All of the specifications that define the J2EE platform are published and reviewed publicly, and numerous vendors offer compliant products and development environments. But J2EE is a single-language platform. Calls from/to objects in other languages are possible through CORBA, but CORBA support is not a ubiquitous part of the platform.

The Bigger Picture

These last points highlight some of the key differentiators between .NET and J2EE, and point towards Microsoft's real play here. Microsoft is doing two very notable things with .NET: It is opening up a channel to developers in other programming languages, and it is opening up a channel to non-.NET components by integrating XML and SOAP into their messaging scheme.

By allowing cross-language component interactions, .NET is enfranchising Perl, Eiffel, Cobol, and other programmers by allowing them to play in the Microsoft sandbox. Devotees of these languages are particularly amenable to gestures like this, since for the most part they have felt somewhat disenfranchised and marginalized in the Microsoft/Sun/Open Source wars. And by using XML and SOAP in their component messaging layer, Microsoft is bolstering their diplomatic face and adding an element of openness to their platform, providing ammunition against claims of proprietary behavior.

What's the correct response?

For Microsoft developers:

.NET is a good thing for those of you committed to Microsoft architectures. ASP+ is better than ASP, ADO+ is better, but different, than ADO and DCOM, C# is better than C and C++. The initial version of .NET won't be real until sometime in 2001, so you have some time to prepare, but this will undoubtedly become the default development environment for Microsoft platforms. And if you're developing within the Microsoft development framework now, you will undoubtedly benefit from adopting elements of the .NET framework into your architectures.

However, several of the goals of the .NET platform are fairly lofty and not at all guaranteed to fly, at least not in the short term. The IL common language runtime, for example, has some fairly significant hurdles to overcome before it has any real payoff for developers. Each language that wants to integrate with the component runtime has to define a subset/superset of the language that maps cleanly into and out of the IL runtime, and has to define constructs that provide the component metadata that IL requires. Then compilers (x-to-IL and IL-to-x) will have to be developed to both compile language structures (objects, components, etc.) into IL component bytecodes, and also generate language-specific interfaces to

]]>
VS2005離線調試.Net Framework2.0http://www.xinguifushi.cn/bbs/dispbbs.asp?BoardID=78&ID=2642&Page=1wangxinxin2010-12-15 11:12:11VS2008的發布,迫于開源的壓力和幫助推廣VS2008這兩方面的原因,微軟允許VS2008在debugging時,可以查看并調試Net Framework的一些源代碼,前提是您的電腦必須是聯網狀態,而是只支持VS2008,卻不支持已被廣泛使用的VS2005,這兩天看了一些牛人(國外的)的文章,發現國外的人就是牛,有兩個家伙就開發了一個小工具(http://www.codeplex.com/NetMassDownloader),可以把.NET Framework的源碼給下載下來。同時支持在VS2005上進行離線調試。園子里早有朋友已經寫過類似的文章,我就不多說了,我今天在這里主要把安裝的步驟給寫下來,希望對需要的朋友有所幫助。

  第一步:下載.NET Mass Downloader.

  第二步:下載.NET Framework3.5的安裝文件,這是完整的可再發行組件包。有190多MB,下載完成后,安裝它。

  第三步:找到文件下載的目錄。例如,我把文件放在的C盤的跟目錄,文件的解壓后的目錄為C:\NetMassDownloader,然后我們運行cmd.exe,指向我剛才解壓的目錄:

  

圖片點擊可在新窗口打開查看

  第四步:對NetMassDownloader的參數進行設置,我是這樣設置的。

  

圖片點擊可在新窗口打開查看

  這條命令我解釋一下:

  (1)-d C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727是我們安裝.net2.0時,.net類庫存放的文件夾。

  (2)-output E:\NETFramework2.0是我們存放下載的.Net Framework的源代碼的文件夾。這個目錄你可以自定義,不一定非要和我寫的一樣。

  (3)-vsver 8.0表示我們要下載的源代碼的版本是.net2.0

  netmassdownloader.exe還有其他一些參數可以設置,大家輸入netmassdownloader.exe /?就可以查看。在此就不羅嗦了。

  參數配置好后,我們允許它,我們不要關閉它,.net framework的源代碼大概有120多MB,我們耐心等待就行了,在運行的時候,可能會出現一些文件找不到的信息,我們不要管它。

  第五步:源代碼下載完成后,我們開始配置VS2005。

  (1)按照我的截圖配置:

  

圖片點擊可在新窗口打開查看

  

圖片點擊可在新窗口打開查看

  將啟用“僅我的代碼”(僅限托管)和要求源文件與原版本完全匹配的選項給去掉。

  第六步:配置你的解決方案,以后如果你創建了新的解決方案,第六步也是少不了的。

  

圖片點擊可在新窗口打開查看

  在“包含源代碼的目錄”中設定E:\NETFramework2.0,就是我們下載的.net framework2.0的源代碼的目錄。

]]>
Microsoft.NET 的真面目http://www.xinguifushi.cn/bbs/dispbbs.asp?BoardID=78&ID=2641&Page=1wangxinxin2010-12-15 11:06:36
  2000年11月,微軟在Comdex計算機大展上發布了Visual Studio.NET軟件,并展示了其.NET發展戰略的框架體系和開發工具的相關特性,全面加速了微軟以.NET技術進軍市場的步伐。

  隨著.NET步伐的一步步加快,作為中國IT界的一分子,我們無論從那一種角度出發,都需要仔細地審視一下.NET本身的內容及其背后的潛臺詞。

  .NET真面目
  .NET的發生發展離不開IT業界數年來圍繞著Internet的種種發展、起落和沉浮。微軟在這一領域中曾經落后過,它一直在奮起直追,激烈的業界競爭和不斷的官司纏身使其必須提出一個嶄新的戰略和概念來重新樹立自己在軟件業界的信心和地位,這就是.NET。

圖片點擊可在新窗口打開查看

  在.NET體系結構中,XML是各應用之間無縫接合的關鍵

  對于.NET到底是什么這個問題,有著各種各樣的說法。但當時作為首席執行官的鮑爾默應該最能代表微軟公司的觀點,他說:“Microsoft.NET 代表了一個集合、一個環境、一個可以作為平臺支持下一代Internet的可編程結構。”確實,這句話基本上簡單扼要地表述了.NET的外特性。

  .NET首先是一個環境。這是一個理想化的未來互聯網環境,微軟的構想是一個“不再關注單個網站、單個設備與因特網相連的互聯網環境,而是要讓所有的計算機群、相關設備和服務商協同工作”的網絡計算環境。簡而言之,互聯網提供的服務,要能夠完成更高程度的自動化處理。未來的互聯網,應該以一個整體服務的形式展現在最終用戶面前,用戶只需要知道自己想要什么,而不需要一步步地在網上搜索、操作來達到自己的目的。這是一種理想,但的的確確是互聯網的發展趨勢所在。

  .NET謀求的是一種理想的互聯網環境。而要搭建這樣一種互聯網環境,首先需要解決的問題是針對現有因特網的缺陷,來設計和創造一種下一代Internet結構。這種結構不是物理網絡層次上的拓撲結構,而是面向軟件和應用層次的一種有別于瀏覽器只能靜態瀏覽的可編程Internet軟件結構。因此.NET把自己定位為可以作為平臺支持下一代Internet的可編程結構。

  .NET的最終目的就是讓用戶在任何地方、任何時間,以及利用任何設備都能訪問他們所需要的信息、文件和程序。而用戶不需要知道這些東西存在什么地方,甚至連如何獲得等具體細節都不知道。他們只需發出請求,然后只管接收就是了,而所有后臺的復雜性是完全屏蔽起來的。所以對于企業的IT人員來說,他們也不需要管理復雜的平臺以及各種分布應用之間的工作是如何協調的。

圖片點擊可在新窗口打開查看
  .NET Framework包括通用語言運行環境、Framework類庫和Active Server Pages+

  有了理想目標和相應可編程Internet軟件結構,.NET這樣的一個協同計算環境的具體實現還必然需要一系列的軟件產品支撐,因此微軟的.NET還包括一個產品的集合。這個集合包含以下組成部分:

  .NET平臺

  這一平臺建立在XML和因特網標準協議的基礎上,包含了.NET的基礎結構和基礎工具,為開發新型的互動協作軟件提供了一個先進的體系結構模型。

  .NET系列產品和服務

  如MSN.NET、OFFICE.NET、Visual Studio.NET、bCentral.NET等。

  第三方廠商的.NET服務建立在.NET平臺和產品上的面向不同應用領域的具體服務。

  從上面對.NET的簡單分析可以看出,在對新技術和IT產業的推動上,無論如何,微軟還是功不可沒的。但與此同時,也可以推測出,如果.NET一旦成為事實,那么對于其他非應用軟件廠商而言,可能會產生巨大的競爭壓力。

  .NET的技術特征
  .NET包括4個重要特點,一是軟件變服務,二是基于XML的共同語言,三是融合多種設備和平臺,四是新一代的人機界面。這四個特點基本上覆蓋了.NET的技術特征。

  軟件變服務

  史蒂夫·鮑爾默在談到軟件服務時說道,“今天的軟件產品僅僅是一張光盤,用戶購買軟件,親自安裝、管理和維護。但是軟件服務是來自因特網的服務,它替用戶安裝、更新和跟蹤這些軟件,并讓它們和用戶一同在不同的機器間漫游。它為用戶存儲自己的信息和參考資料。這些就是軟件和軟件服務各自不同的風格。”

圖片點擊可在新窗口打開查看
  Orchestration可視化編程工具產生基于XML的XLANG代碼,它和BizTalk服務器、.NET Framework,以及Visual Studio.NET都曾是Windows DNA 2000戰略的重要部分。

  伴隨著ASP產業的興起,軟件正逐漸從產品形式向服務形式轉化,這是整個IT行業的大勢所趨。在.NET中,最終的軟件應用是以Web服務的形式出現并在Internet發布的。Web服務是一種包裝后的可以在Web上發布的組件,.NET通過WSDL協議來描述和發布這種Web服務信息,通過DISCO協議來查找相關的服務,通過SOAP協議進行相關的簡單對象傳遞和調用。

  微軟的.NET戰略意味著:微軟公司以及在微軟平臺上的開發者將會制造服務,而不是制造軟件。在未來幾年之內,微軟將陸續發布有關.NET的平臺和工具,用于在因特網上開發Web服務。那時,工作在.NET上的用戶、開發人員和IT工作人員都不再購買軟件、安裝軟件和維護軟件。取而代之的是,他們將定制服務,軟件會自動安裝,所有的維護和升級也會通過互聯網進行。

  基于XML的共同語言

  XML是從SGML語言演化而來的一種標記語言。作為元語言,它可以定義不同種類應用的數據交換語言。在.NET體系結構中,XML作為一種應用間無縫接合的手段,用于多種應用之間的數據采集與合并,用于不同應用之間的互操作和協同工作。具體而言,.NET通過XML語言定義了簡單對象訪問協議(SOAP)、Web服務描述語言(WSDL)、Web服務發現協議(DISCO)。SOAP協議提供了在無中心分布環境中使用XML交換結構化有類型數據的簡單輕量的機制。WSDL協議定義了服務描述文檔的結構,如類型、消息、端口類型、端口和服務本身。DISCO協議定義了如何從資源或者資源集合中提取服務描述文檔、相關服務發現算法等。

  融合多種設備和平臺

  隨著Internet逐漸成為一個信息和數據的中心,各種設備和服務已經或正在接入和融入Internet,成為其中的一部分。.NET謀求與各種Internet接入設備和平臺的一體化,主要關注在無線設備和家庭網絡設備及相關軟件、平臺方面。

  新一代的人機界面

  新一代人機界面主要體現在“智能與互動”兩個方面。.NET包括通過自然語音、視覺、手寫等多種模式的輸入和表現方法;基于XML的可編輯復合信息架構——通用畫布;個性化的信息代理服務;使機器能夠更好地進行自動處理的智能標記等技術。

  .NET的平臺及框架是基于微軟軟件工業基礎的又一次升級和演化。然而,.NET還是要盡力保證Windows系統及系列產品和.NET能夠融為一體,盡量在微軟公司原有的軟件資產基礎上,使.NET繼續成為Internet的中心。

  .NET有多少創新
  .NET主要組成部分及其作用介紹如下:

  1) Windows.NET
  Windows.NET是融入.NET技術的Windows,它將緊密地整合了.NET的一系列核心構造模塊,為數字媒體及應用間協同工作提供支持,是微軟公司的下一代Windows桌面平臺。

  2) .NET Framework
  .NET Framework的目的是便于開發商更容易地建立網絡應用程序和Web服務,它的關鍵特色是提供了一個多語言組件開發和執行的環境。從層次結構來看,.NET Framework又包括三個主要組成部分:通用語言運行環境(Common Language Runtime)、服務框架(Services Framework)、上層的兩類應用模板——面向Web的網絡應用程序模板(Web Forms或Web Services)和Windows應用程序模板(Win Forms)。

  其中通用語言運行環境在組件運行時,負責管理內存分配、啟動和中止線程和進程、強化安全系數,同時還調整任何該組件涉及到的其他組件的附件配置。

  在通用語言運行環境上是服務框架,它為開發人員提供了一套能夠被任何現代編程語言調用的、統一的面向對象、異步、層次結構的可擴展類庫,包括集合、輸入/輸出、字符串、圖畫、網絡、線程、全球化、安全加密、數據庫訪問、調試相關服務等類庫。在服務框架之上是兩種應用類型的模板,一類是傳統的Windows應用程序模板,另一類是基于ASP+的Web網絡應用程序模板。其中ASP+以一組控件和體系結構的方式提供了一個Web應用模型,由.NET框架提供的類庫構建而成,通過它可以簡化Web應用的實現過程。

  3) .NET企業服務器
  在微軟宣稱的“第三代互聯網”中,.NET企業服務器是企業集成和管理所有基于Web的各種應用的基礎,它提供企業未來開展電子商務的高可靠性、高性能、高可伸縮性以及高可管理性。.NET企業服務器的構成異常龐大而復雜,它共包括8個各司其職的服務器,如表所示。
]]>
DLL "C:\WINNTG\Microsoft.NET\Framework\v2.0.50727\aspnet_perf.dll" 中服務 "ASP.NET" 的打開過程出現故障。 該服務的性能數據將不可使用。返回的狀態碼 是數據 DWORD 0。http://www.xinguifushi.cn/bbs/dispbbs.asp?BoardID=78&ID=2640&Page=1wangxinxin2010-12-15 11:04:06DLL "C:\WINNTG\Microsoft.NET\Framework\v2.0.50727\aspnet_perf.dll" 中服務 "ASP.NET" 的打開過程出現故障。 該服務的性能數據將不可使用。返回的狀態碼 是數據 DWORD 0。

服務器.netframework asp.net2.0每三分鐘報錯|perflib1008。服務器上每三分鐘都會報錯:source Perflib ID:1008,請問這個要如何解決呢?

事件類型: 錯誤
事件來源: Perflib
事件種類: 無
事件 ID: 1008
日期:  2007-9-26
事件:  13:46:46
用戶:  N/A
計算機: REPORTSRV
描述:DLL "C:\WINNT\Microsoft.NET\Framework\v2.0.50727\aspnet_perf.dll" 中服務
"ASP.NET_2.0.50727" 的打開過程出現故障。 該服務的性能數據將不可使用。返回的狀態碼 是數據 DWORD 0。
數據:0000: 05 40 00 80               .@.?


解決辦法:
回答:根據您的描述,我對這個問題的理解是:Windows 2000 Server ,在日志中每隔3分鐘記錄Perflib 1008 的錯誤事件。如果我的理解有誤,請告訴我。

這是由于沒有正確安裝aspnet的性能計數器的dll文件導致,建議您嘗試以下方法修復:
1. 在命令行,輸入以下命令卸載mscoree.dll和aspnet_isapi.dll的注冊信息。
regsvr32 /u %windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll
regsvr32 /u %windir%\System32\mscoree.dll
完成后重啟系統。

2. 如果卸載出錯,在命令行,定位到C:\WINNT\Microsoft.NET\Framework\v2.0.50727目錄,運行以下命令:
aspnet_regiis.exe –ua 卸載ASP.NET
aspnet_regiis.exe –I 重新安裝 

完成后,重啟系統,查看是否還有問題。建議您從添加刪除程序刪除所有.net framework,然后重啟系統,重新安裝,看是否還有問題。我意思是重新安裝.net framework,這個計數器是由Framework 提供的,重新安裝該組件,則可以重新創建計數器。

另外,這是ASP.NET的性能計數器無法使用,但不影響ASP.NET的使用,如果不使用性能計數器,您也可以禁用該計數器,更改以下注冊表鍵值:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ASP.NET_2.0.50727\Performance
"Disable Performance Counters"=dword:00000001

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ASP.NET\Performance
"Disable Performance Counters"=dword:00000001

]]>
Microsoft.Net綜述http://www.xinguifushi.cn/bbs/dispbbs.asp?BoardID=78&ID=2639&Page=1wangxinxin2010-12-15 10:53:16緒論

  未來是網絡為中心的世界。面對這個已經或即將來臨的世界,每個IT巨人都在思考。發布于2000年秋天的Microsoft.NET,表明微軟將以網絡為中心,徹底轉換產品研發、發布的方式,改變產品和服務的范圍。

  Microsoft.NET是一項革命性的技術框架。.NET的核心技術包括分布式計算、XML、組件技術、即時編譯技術等。分布式計算是網絡的本質:XML奠定了新一代電子數據交換的標準,正是數據交換使網絡計算成為可能;組件技術是軟件技術多年來的發展成果,它使程序設計員從大量的API中解放出來,以采用面向對象和面向組件的技術來解決軟件問題;即時編譯技術使應用程序在運行時,還能夠根據主機的硬件和軟件環境進行代碼優化,并簡化代碼發放的過程。

  自從.NET發布以來,一直就是媒體的追逐目標,大量程序員參與到.NET的測試和研究中,出現了很多.NET的技術論壇和技術站點。微軟掌門人比爾.蓋茨更是到中國、印度等國演講宣傳.NET,鼓動程序員使用.NET。據報道很多商業網站已經決定在.NET構架下建立英特網服務平臺,如全球最大的拍賣站點ebay.com。

  微軟新一代軟件開發平臺,稱為Visual Studio.NET,它是微軟.NET戰略產品的重要部分。Visual Studio.NET集成了VB.NET、C#、ASP.NET的開發環境,而微軟第一次統一了VB和VC的底層對象,使VB.NET和C#能夠在同一個運行苦的基礎上訪問相同的組件的屬性和方法。這就是編寫C#和編寫VB.NET程序同樣的簡單和高效,在這以前,大多數人認為,VC++程序員就是比VB程序員更高級些。在.NET時代,這種差別將不復存在。

  MicroSoft .NET平臺包括用于創建和操作新一代服務的.NET基礎結構和工具;可以啟用大量客戶機的.NET User Experience;用于建立新一代高度分布式的數以百萬計的.NET積木式組件服務;以及用于啟用新一代智能互聯網設備的.NET設備軟件。

  MicroSoft .NET產品和服務-包括Windows.NET,連同建立積木式服務的核心集成套件;MSNTM .NET;個人訂購服務;Office.NET;Visual Studio .NET;以及用于.NET的bCentralTM。

]]>
microsoft.NET framework2.0和microsoftNET framework2.3.0都在怎么回事asp.net 工作流http://www.xinguifushi.cn/bbs/dispbbs.asp?BoardID=78&ID=2638&Page=1wangxinxin2010-12-15 10:47:48不懂的題目:在添加刪除程序里有microsoft.NET framework2.0和microsoftNET framework2.3.0兩個


最好答案:ADO.NET2.0的十大新特性
本文簡要先容了.net framework 2.0里的ado.net2.0的最新特性。在以下敘述中將附帶一些簡略的例子來討論這些特性的細節。

【相干文章:Java的中文編程與配置心…】

【擴大閱讀:蔡學鏞:編譯、反編譯、…】

以下便是ado.net新增的特性: 【擴大信息:Web服務器和應用程序服務…】

1. 批量復制操作(bulk copy operation)

將數值從一個數值源批量復制到另一個數值源是ado.net 2.0的一個新特性。批量復制類提供了最快的要領把數值從一個數值源遷徙到另一個數值源。每個ado.net的數值提供者城市提供相應的批量復制類。例如,在sql.net數值提供者里,批量復制操作是由一個叫sqlbulkcopy的類來完成的,它可以讀取一個dataset, datatable, datareader或xml 對象。

2.批量更新(batch update)

要是數值庫服務器支持批量更新特性,batch update代替了幾個短周期提交請求的方式,從而大大改善在一個短周期內向服務器產生多個批量更新時的性能。updatebatchsize屬asp.net 工作流性提供在一批更新里要更新行數。這個屬性值能被限制到小數位。

<!-- Easy AdSense V2.92 --><!-- Post[count: 2] -->
<!-- Easy AdSense V2.92 -->

3.數值分頁

現在command對象具有一個新的執行要領叫做executepagereader。這個要領有三個參數——commandbehavior, startindex, 與 pagesize。要是你意料得到數值行數是101-200,你可以通過挪用這個要領設置startindex為101與pagesize為100而輕易完成這個功能。

4.數值毗連(connection)明細

現在你可以通過設置毗連的statisticsenabled屬性為真來獲取一個毗連更多的信息。connection對象提供了兩個新要領——retrievestatistics 與 resetstatistics。retrievestatistics要領歸回一個hashtable對象來填充毗連信息,如:數值轉移,用戶明細,游標明細,緩存信息與事務處理。

5.dataset.remoringformat屬性

當dataset.remoringformat設置為二進制時, dataset的序列化格式由二進制格式代替了原本的xml標記格式,這種改變能顯著改善序列化與還原序列化操作的性能。

.NET Framework 3.0 中增加了不少新功能,例如 Windows Workflow Foundation (WF)、Windows Communication Foundation (WCF)、Windows Presentation Foundation (WPF) 和 Windows CardSpace,.NET Framework 3.5 在這些新增功能的基礎上增量構建而成。這個之外,.NET Framework 3.5 還包羅若干技術領域中的大量新功能,它們以新程序集的形式添加,以制止重大更改。這asp.net 工作流些新功能包孕:

與語言集成查詢 (LINQ) 和數值感知緊密集成。借助這個新功能,您可以使用相同的語法,在任何支持 LINQ 的語言中編著相干代碼,以篩選和枚舉多種類型的 SQL 數值、調集、XML 和數值集,以及創建它們的投影。
利用 ASP.NET AJAX 可以創建更有效、更具交互性、高度個性化的 Web 體驗,這些體驗在所有最流行的瀏覽器上都能實現。
用于生成 WCF 服務的全新 Web 協議支持,包孕 AJAX、JSON、REST、POX、RSS、ATOM 和若干新的 WS-* 標準。
Visual Studio 2008 中面向 WF、WCF 和 WPF 的完整工具支持,其中包孕支持工作流的服務這一新技術。
.NET Framework 3.5 基類庫 (BCL) 中的新類可滿足許多常見的客戶請求。

重要事項:
要是安裝有 .NET Framework 3.5 的早期預發行版本,則運行此安裝之前,必須使用“添加/刪除程序”卸載那一些預發行版本。


]]>
NET Framework 3.5 SP1正式版http://www.xinguifushi.cn/bbs/dispbbs.asp?BoardID=78&ID=2637&Page=1wangxinxin2010-12-15 10:46:35微軟今天發布了.NET Framework 3.5第一個SP服務包的最終版。這是一個累積更新,包含很多基于.NET Framework 2.0、3.0和3.5不斷生成的新功能,此外還包括.NET Framework 2.0 SP2和.NET Framework 3.0 SP2累積更新,支持x86、x64、IA64三種架構。

.NET Framework 3.5 SP1集成了此前發布的三十個相關Hotfix熱修復補丁,同時還引入了不少新特性和改進:

1、ASP.NET動態數據,它提供了豐富的框架,從而使用戶可以快速進行數據驅動的開發,而無需編寫代碼;ASP.NET AJA 的一項新增功能,對管理瀏覽器歷史記錄提供了支持(支持后退按鈕)。有關更多信息,請參見ASP.NET和Web開發中的新增功能

2、對公共語言運行時的核心改進包括:改進了.NET Framework本機映像的布局、選擇不再對完全受信任的程序集進行強名稱驗證、提高了應用程序啟動性能、改進了生成的代碼以縮短端對端應用程序執行時間、選擇在ASLR(地址空間布局隨機化)模式下運行托管代碼(如果操作系統支持)。此外,從網絡共享打開的托管應用程序在完全受信任環境下運行時與本機應用程序具有相同的行為。

3、提高了Windows Presentation Foundation的性能,包括縮短了啟動時間,提高了與位圖效果有關的性能。WPF的其他新增功能包括:改善了對業務線應用程序、本機初始屏幕、DirectX 像素著色器的支持,并且新增了WebBrowser控件。

4、ClickOnce應用程序發行者可以決定在適當情況下不進行簽名和加密,開發人員可以編程方式安裝ClickOnce應用程序以顯示自定義署名,并且ClickOnce錯誤對話框支持鏈接到Web上應用程序特定的支持網站。

5、實體框架是從現有的一套ADO.NET數據訪問技術發展而來的。利用實體框架,開發人員可以按照應用程序特定的域模型(而不是基礎數據庫模型)來針對關系數據庫進行編程。有關更多信息,請參見實體框架入門。實體框架還引入了一些其他功能,包括支持SQL Server 2008的新類型、默認實體圖形序列化和實體數據源。在此版本中,實體框架支持SQL Server 2008中的新日期和文件流功能。圖形序列化工作可幫助開發人員生成將全部圖形建模為數據協定的Windows Communication Foundation (WCF)服務。實體數據源為希望使用實體框架的ASP.NET應用程序構建者提供了傳統的數據源體驗。

6、LINQ to SQL新增了對SQL Server 2008中的新日期和文件流功能的支持。

7、ADO.NET Data Services Framework由滿足以下條件的模式和庫組合而成:支持將數據公開為一項基于REST(具象狀態傳輸)的靈活數據服務,企業網絡內部或整個互聯網上的Web客戶端都可以使用該服務。ADO.NET Data Services Framework支持基于任何數據源創建數據服務。通過與 ADO.NET Entity Framework 的充分集成,可以輕松公開基礎存儲架構的概念視圖模型。可以輕松地從任一平臺訪問使用ADO.NET Data Services Framework創建的服務以及兼容的Windows Live (dev.live.com)服務。針對運行在微軟平臺上的客戶端應用程序提供了一組客戶端庫,以簡化與數據服務的交互。例如,基于.NET Framework的客戶端可以使用LINQ查詢數據服務,也可以使用簡單的.NET Framework對象層更新此服務中的數據。

8、現在,Windows Communication Foundation改進了對互操作性的支持,增強了部分受信任情況下的調試體驗,并且擴展了整合協議支持以便在Web 2.0應用程序中可以進行更廣泛的應用,從而使DataContract序列化程序變得更易于使用。

9、用于SQL Server(SqlClient) 的.NET Framework數據提供程序新增了對SQL Server 2008中的文件流和稀疏列功能的支持

.NET Framework 3.5 SP1正式版完整安裝包本地下載(231MB):
http://drivers.mydrivers.com/drivers/243-97382-Microsoft-Microsoft.NET-Framework-3.5-SP1/

知識庫文章KB951847:
http://support.microsoft.com/kb/951847/en-us

發行說明:
http://download.microsoft.com/download/A/2/8/A2807F78-C861-4B66-9B31-9205C3F22252/dotNet35SP1Readme.htm

]]>
讓你的.NET程序脫離Framework跑起來http://www.xinguifushi.cn/bbs/dispbbs.asp?BoardID=78&ID=2636&Page=1wangxinxin2010-12-15 10:43:50  files:

  c:\windows\system32\mscoree.dll

  c:\windows\system32\mscorier.dll

  c:\windows\system32\mscories.dll

  c:\windows\system32\dfshim.dll

  c:\windows\system32\netfxperf.dll

  這幾個文件一定要放在system32下面

  C:\windows\system32\mui\0409\mscoreer.dll

  C:\windows\system32\mui\0409\mscorees.dll

  我們猜想mui下面其他們版本的也是必須的

  C:\WINDOWS\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089

  c:\windows\assembly\gac_32\[others]

  需要其他們的組件也要添加,,比如System.Windows.Forms

  C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorjit.dll

  C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll

  C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\[others]

  這個文件夾下面只需要mscorjit.dll mscorwks.dll兩個文件就可以使console運作正常。

  c:\windows\winsxs\Manifests\...

  c:\windows\winsxs\policies\...

  c:\windows\winsxs\...

  winsxs下有很多重要的組件,版本也很繁雜。確保一個都不能少。這些文件支撐著mscorwks.dll,沒有他們,mscorwks也無法加載。

  REG:

  HKEY_CLASSES_ROOT\TypeLib\{BED7F4EA-1A96-11D2-8F08-00A0C9A6186D}

  HKEY_CLASSES_ROOT\TypeLib\{BED7F4EA-1A96-11D2-8F08-00A0C9A6186D}\2.0 = REG_SZ, mscorlib.dll

  HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\InstallRoot = REG_SZ,C:\WINDOWS\Microsoft.NET\Framework\

  只要設置了安裝位置,jit自己能找到相應的framework。有了這些文件,你們就能運行.net 2.0的程序了。圖片點擊可在新窗口打開查看

]]>
安裝.NET Framework SDK 快速入門FAQhttp://www.xinguifushi.cn/bbs/dispbbs.asp?BoardID=78&ID=2635&Page=1wangxinxin2010-12-15 10:42:40在安裝好IIS,SQL Server Express等前提下,安裝失敗,問題如下。
日志描述:
10:49:29 2006年12月15日: [信息] 正在安裝 ASP.NET 腳本映射。命令: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -s W3SVC/1/ROOT/QuickStartv20
10:49:29 2006年12月15日: [失敗] Config_IIS_Install: IIS (Internet 信息服務)虛擬目錄注冊(失敗): [失敗] 未能安裝 ASP.NET 腳本映射。命令: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -s W3SVC/1/ROOT/QuickStartv20
10:49:29 2006年12月15日: [開始示例回滾]
解決方法:
進入CMD,運行 C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i 重安裝下就OK了
]]>
Microsoft.NET Framework 2.0 的安裝錯誤的問題http://www.xinguifushi.cn/bbs/dispbbs.asp?BoardID=78&ID=2634&Page=1wangxinxin2010-12-15 10:40:47

請教高手,我在安裝 Microsoft.NET Framework 2.0 到一半的時候,出現了以下文字,改怎么解決:

“Error 25002.初始化合成時發生錯誤。無法加載mscoree.dll。系統錯誤:內存分配訪問”

關閉后Microsoft需要我發送錯誤報告````

錯誤簽名:
EventType : visualstudio8setup     P1 : 183     P2 : 8.0.50727.42_rtm_x86ret
P3 : msi     P4 : inst     P5 : f     
P6 : ca_installassemblydef.3643236f_fc70_11d3_a536     P7 : -     P8 : 1603
P9 : -     P10 : -   

錯誤報告的內容:

C:\DOCUME~1\GreenTea\LOCALS~1\Temp\WLFA6.tmp
C:\DOCUME~1\GreenTea\LOCALS~1\Temp\SDBA7.tmp
C:\DOCUME~1\GreenTea\LOCALS~1\Temp\VSW0\VSSWMSISummary.txt
C:\DOCUME~1\GreenTea\LOCALS~1\Temp\VSW0\VSSWMSIInstallTime.txt
C:\DOCUME~1\GreenTea\LOCALS~1\Temp\VSW0\VSSWMSIFailInfo.txt
<NoFiles>


]]>
NET Framework 以及 CLR 版本辨析http://www.xinguifushi.cn/bbs/dispbbs.asp?BoardID=78&ID=2633&Page=1wangxinxin2010-12-15 10:28:50

我們來看看以下 ClrInfo.cs 吧:


using System;
using System.Text;

namespace Skyiv
{
  public class ClrInfo
  {
    static void Main()
    {
      Console.WriteLine("      OS Version: {0}", Environment.OSVersion);
      Console.WriteLine("     CLR Version: {0}  ( {1} )", Environment.Version, RuntimeFramework.CurrentFramework);
      Console.WriteLine("Default Encoding: {0}", Encoding.Default);
      Console.WriteLine();
      Console.WriteLine(typeof(string).AssemblyQualifiedName);
#if !NetFx20
      Console.WriteLine(typeof(System.IO.Packaging.Package).AssemblyQualifiedName);
      Console.WriteLine(typeof(System.TimeZoneInfo).AssemblyQualifiedName);
#endif
      Console.WriteLine();
      Console.WriteLine("Available Frameworks:");
      foreach (var frame in RuntimeFramework.AvailableFrameworks) Console.WriteLine("  " + frame);
    }
  }
}

使用以下 makefile 文件來編譯(請參見: 淺談 make 工具):

CLR35 = C:\Windows\Microsoft.NET\Framework\v3.5
CLR40 = C:\Windows\Microsoft.NET\Framework\v4.0.30319
CSC35 = $(CLR35)\csc.exe
CSC40 = $(CLR40)\csc.exe
SRC1 = ClrInfo.cs RuntimeFramework.cs

ClrInfo20.exe: $(SRC1)
	$(CSC35) -out:$@ $(SRC1) -D:NetFx20

ClrInfo35.exe: $(SRC1)
	$(CSC35) -out:$@ $(SRC1) -r:WindowsBase.dll

ClrInfo40.exe: $(SRC1)
	$(CSC40) -out:$@ $(SRC1) -r:$(CLR40)\WPF\WindowsBase.dll

   使用 nmake.exe 進行編譯(所需的 RuntimeFamework.cs 請參見 .NET Framework CLR 版本檢測):

E:\CS\ClrInfo> nmake ClrInfo20.exe
Microsoft (R) 程序維護實用工具 9.00.30729.01 版
版權所有(C) Microsoft Corporation。保留所有權利。

C:\Windows\Microsoft.NET\Framework\v3.5\csc.exe -out:ClrInfo20.exe ClrInfo.cs RuntimeFramework.cs -D:NetFx20
適用于 Microsoft(R) .NET Framework 3.5 版的 Microsoft(R) Visual C# 2008 編譯器 3.5.30729.1 版
版權所有(C) Microsoft Corporation。保留所有權利。

E:\CS\ClrInfo> nmake ClrInfo35.exe
Microsoft (R) 程序維護實用工具 9.00.30729.01 版
版權所有(C) Microsoft Corporation。保留所有權利。

C:\Windows\Microsoft.NET\Framework\v3.5\csc.exe -out:ClrInfo35.exe ClrInfo.cs RuntimeFramework.cs -r:WindowsBase.dll
適用于 Microsoft(R) .NET Framework 3.5 版的 Microsoft(R) Visual C# 2008 編譯器 3.5.30729.1 版
版權所有(C) Microsoft Corporation。保留所有權利。

E:\CS\ClrInfo> nmake ClrInfo40.exe
Microsoft (R) 程序維護實用工具 9.00.30729.01 版
版權所有(C) Microsoft Corporation。保留所有權利。

C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe -out:ClrInfo40.exe ClrInfo.cs RuntimeFramework.cs
 -r:C:\Windows\Microsoft.NET\Framework\v4.0.30319\WPF\WindowsBase.dll
Microsoft (R) Visual C# 2010 Compiler version 4.0.30319.1
Copyright (C) Microsoft Corporation. All rights reserved.

E:\CS\ClrInfo> dir *.exe
2010/04/17  19:59             7,168 ClrInfo20.exe
2010/04/17  19:59             7,168 ClrInfo35.exe
2010/04/17  19:59             7,680 ClrInfo40.exe

  使用 Sun VirtualBox 全新安裝 Microsoft Windows Server 2003 R2 Enterprise Edition Service Pack 2 操作系統:

 

  運行 ClrInfo35.exe,結果如下所示:

 

  運行 ClrInfo40.exe,結果如下所示:

 

 

  好吧,讓我們安裝 Microsoft .NET Framework 2.0 SP2 吧

]]>
Microsoft.Net框架程序設計, Part I: Basics of the Microsoft .NET Framework(中文)http://www.xinguifushi.cn/bbs/dispbbs.asp?BoardID=78&ID=2632&Page=1wangxinxin2010-12-15 10:23:04English Version go here.

By Alva Chien

Part I: Basics of the Microsoft .NET Framework

Chapter 1: The Architecture of the .NET framework Development Platform

1.       .Net中的common language runtime (CLR) 是一個可以被多個不同語言使用的runtime. 不管使用哪種編譯器,所生成的結果都是一個managed module. 一個managed module是一個標準的Windows Portable executable (PE) 文件,這個文件必須由CLR來執行.

一個managed module的組成:

Part

Description

PE Header

標準的 Windows PE header, 類似于Common Object File Format (COFF) header. 這個header包含了文件類型: GUI, CUI, or DLL, 它同樣包含了一個文件創建時的時間戳. 對只包含IL代碼的的modulesPE header中的大部分信息被忽略. 對包含native CPU代碼的module,這個header包含了關于native CPU代碼的信息.

CLR Header

包含了一個managed module所必須的信息(CLR和其工具解析) . 這個header包含了所需的CLR版本和一些狀態標志位, managed module的入口方法(Main方法,一個MethodDef metadata token), metadata的位置/大小, 資源, strong name, 一些標志位和其他信息.

Metadata

每個managed module都包含metadata. 這些表有兩種類型: 定義typesmembers的的表和定義Referencedtypemembers的表.

Intermediate language (IL) code

由編譯器編譯的代碼,真正執行時候CLR會將IL代碼編譯為native CPU instructions.

2.       一個 assembly是一個或多個managed modules/資源文件的邏輯組合, 它是最小的可重用,擁有版本信息和安全信息的單元. PE文件包含一塊叫做manifest的數據塊. 一個manifest是另一個metadata tables的集合. 這些tables定義了組成一個assembly的文件, 由這些文件定義的exported types, 跟這個assembly關聯的資源或數據文件. 一個典型的例子: 把一些較少使用的types或資源定義在assembly的一個獨立文件中,這個文件只會在其中的type或資源被使用的時候才被加載.

3.       可以通過查找MSCorEE.dll 文件來判斷.NET是否被安裝,這個文件位于%windir%\system32 文件夾中. 但是,一臺機器允許同時安裝幾個版本的.Net Framewor.可以通過查看一下注冊表的鍵值來判斷當前.NET的版本: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\policy

4.       如何裝載 CLR:

  • 當創建一個EXE assembly, 編譯器/鏈接器在生成的assembly’s PE file header嵌入一些特別的信息在.text section.
  • 當創建一個DLL assembly, 如果一個unmanaged程序調用LoadLibrary 裝載它, 這個DLL’s 入口函數知道如果裝載CLR來正確處理assembly中的代碼.

5.       當創建一個EXE assembly, 一個的6字節的x86 sub function被嵌入到.text section: JMP _CoreExeMain. 這個_CoreExeMain函數從MSCorEE.dll導入, 這個MSCoreEE.dll (Microsoft Component Object Runtime Execution Engine) assembly file’s .idata section定義了引用. 所以當assembly像正常程序一樣啟動時, MSCoreEE.dll被導入到這個進程的地址空間, 這時_CorExemain 函數的地址被獲取,同時JMP instruction被執行. 這個函數將初始化CLR并且查找這個可執行assembly’s CLR header的可執行入口方法,這個方法的IL代碼將被編譯為native CPU instructions 隨后CLR跳轉這個native code, 這時,程序已經啟動.

6.       當創建一個DLL assembly, 一個類似的6字節長的x86 stub function被嵌入到.text section: JMP _CorDllMain. _CorDllMain 函數同樣從MSCorEE.dll中引入, 這個DLL’s .idata section 中包含MSCorEE.dll的引用定義. 所以, LoadLibrary 執行時_CorDllMain 被調用來初始化CLR并返回給應用程序來繼續執行.

7.       這個6字節的stub function僅僅在非Windows XP系統中被添加. Windows XP以及以后版本中, OS loader檢查嵌入managed code的文件的PE file headerdirectory entry 14. (IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR定義在WinNT.h) 如果這個directory entry存在并且擁有一個非0, OS loader忽略這個文件的導入 (.idata) section并且自動裝載MSCorEE.dll到進程的地址空間并直接跳轉到對應的函數.

8.       最后一個關于managed PE文件的注意點: 他們總是使用32PE文件格式, 而不是64PE文件格式. 64位系統上, OS loader檢查這個managed 32PE文件并知道如何去創建一個64位地址空間.

9.       至于知識產權保護, 對于所有的編譯位IL的代碼并且IL代碼能被很容易被Disassembler程序reverse, 可以使用一個第三方提供的obfuscator工具. 這些工具scramble” managed module’s metadata中所有private symbols的名稱. 另外,可以把一些代碼編譯為unmanaged DLL并在assembly中調用它.

10.   所有的高級語言都只是提供了CLR的一個功能子集. 但是,IL提供了CLR所有的功能.

11.   如果Assembly中的一個方法第一次被調用,它的IL代碼需要被編譯為native CPU代碼, 這部分功能由CLR’s JIT (just-in-time)完成. JIT編譯器在內存中保存了native CPU instructions, 所以當應用程序終止時候,編譯的代碼都將失效. 另外一個值得記住的重點是JIT編譯過程當中有一個專門的優化編譯代碼的過程.

12.   Microsoft .Net framework提供了一個名為NGen.exe的工具; 這個工具編譯一個assembly的全部IL代碼為native CPU代碼并將結果保存到一個硬盤文件.

13.   IL是一個stack-based的語言, 所有的IL instructions會把operands壓棧,并將結果彈出. IL沒有提供操作CPU寄存器的指令.

]]>
WM5-WM6.5NET CF Microsoft.NET Compact Framework3.7安裝/卡版http://www.xinguifushi.cn/bbs/dispbbs.asp?BoardID=78&ID=2631&Page=1wangxinxin2010-12-15 10:17:181、支持WM5-WM6.5NET CF Microsoft.NET Compact Framework3.7安裝版。
提示:在安裝時會提示與當前系統不兼容,不理它,點確定安裝安裝后正常使用。

此工具相當于電腦上的微軟.NET,.NET是微軟提出的一種跨平臺的框架協議,通俗地說,你就把它當作軟件的Direct X吧。就像很多游戲依賴Direct X一樣。.NET Framework是一些軟件運行的必備條件。.NET Compact Framework3.7是PPC上目前最新版本,WM5似乎不支持,得WM6以上操作系統的PPC才行。

圖示說明

圖片點擊可在新窗口打開查看 圖片點擊可在新窗口打開查看
圖片點擊可在新窗口打開查看

圖片點擊可在新窗口打開查看 圖片點擊可在新窗口打開查看

下載:

Net3.7.cab ]]>
Interview with Microsoft's .NET Compact Framework Technical Evangelisthttp://www.xinguifushi.cn/bbs/dispbbs.asp?BoardID=78&ID=2630&Page=1wangxinxin2010-12-15 10:05:46Robert Levy: First off, I'd like to thank you for taking the time to speak with us and participate in this interview. As the ".NET Compact Framework Technical Evangelist" what exactly is your role within Microsoft? What services are you able to provide to software developers?

Kent Sharkey: The Technical Evangelist role is always good for a smile. There aren't too many companies willing to call people that. Basically, our role is to go forth into the community to introduce developers to technologies that aren't shipping yet. We are the advance scouts, if you will, preparing people for changes to come.

RL: In your own words, how would you define the goals and strategy Microsoft is using to merge existing (and future) mobile technology with the larger concept of ".NET"?

KS: Good one. If you think of the overall goal of .NET as helping programs (and people) to communicate better it becomes clearer. Today, and in the past, this has been fairly difficult in the mobile space. People needed to be mobile experts, and used primitive tools to craft apps for Pocket PC or phones. Microsoft is attempting to make this easier for developers, and to enable new forms of applications by doing this.

RL: More specifically, how would you define the .NET Compact Framework and Microsoft's goals in developing it?

KS: The .NET Compact Framework is a lightweight version of the .NET Framework, designed to work well with resource constrained devices. The execution engine and garbage collection has been tightened up, to help with devices where overall memory is still measured in MB. In addition, our support for important standards on the device, such as XML and SOAP support, as well as strong database support with SQL CE are a first in the industry. (well, maybe not the strong database support, but hopefully you're with me) What the .NET Compact Framework is doing is giving developers a set of tools that span devices through servers with a single, consistent programming model.

RL: The .NET Compact Framework and Mobile Internet Toolkit are 2 opposing Microsoft technologies that can be used to develop mobile applications with .NET. Generally speaking, what types of applications do you see as best suited for each of these? What are the key differences between them in terms of development tools, programming techniques, development costs, deployment procedures, and end-user experiences.

KS: I wouldn't say that they were opposing, but complementary. Think of them as the device analogs of Windows Forms (.NET Compact Framework) and Web Forms (MMIT). They both have their place, and optimal usage model. In the case of MMIT, the idea is really reach -- MMIT is great for moving your web applications out to a wide variety of devices, phones, etc. It is a great extension to the ASP.NET model. It's problem is the types of devices it typically targets -- cell phones. They typically have poor data entry capabilities. As such, I would say that MMIT is best for apps that don't require a good deal of data entry, and where the amount of data displayed is relatively small (again, due to phone limitations). Finally, MMIT is best suited for always online applications. .NET Compact Framework, on the other hand, brings a few neat items to the table. First up, through either the larger memory on the device and/or SQL CE, it has data storage capabilities. Therefore, .NET Compact Framework is great for applications that spend part of 'their life' disconnected. SQL CE replication allows you to merge your data back into SQL Server as needed (when connected). Second, .NET Compact Framework gives you the richer capabilities of the device UI. You can use controls such as TreeView, ListView and (soon), DataGrid in your applications without having to struggle with a cross platform DHTML solution. The application could also be faster, as no return time is required to retrieve data. Finally, the development model of .NET Compact Framework is just the same as that of desktop Windows Forms, allowing a developer to move freely and easily between developing for the device and the desktop. MMIT has a somewhat different programming model, possibly confusing some.

RL: As a "Technical Evangelist" you recruit developers to use emerging technology. When doing this, who is your target audience? In other words, what types of organizations do you see as being the best candidates for quickly adopting the .NET Compact Framework? Who do you predict will be (or currently are) the early adopters of this technology?

KS: I look at the target audience as being in two main groups. First, there are those groups doing device development today. .NET Compact Framework gives this group a rich set of tools and consistency with the desktop that will help their move forward. Second, there are those who have never done device development. This is the very exciting group, as .NET Compact Framework means that they can now extend their existing applications to the device easily. They no longer have to learn a new programming environment, with new tools and languages.

RL: Through your interactions with the developer community, what have you found to be the most compelling reasons given for adopting the .NET Compact Framework? Conversely, what reasons have been given for NOT adopting the technology?

KS: The most compelling reason for me is that it uses the same tool and programming model as you develop on the desktop. The consistency between .NET and the .NET Compact Framework means that you already know how to do most things on the device. You build both in Visual Studio .NET. As for reasons for NOT adopting the technology, well, I'm just the wrong person to ask that. There isn't any.

More seriously, some of the companies I've spoken with have decided not to move to .NET Compact Framework because they are already working with (and happy with) Embedded Visual C++ or Embedded Visual Basic. Particularly for small developer shops, that have already scaled the learning curve to get their code on the device 'the hard way', the added training time does not make economic sense.

RL: What advice can offer for developers who have already created and deployed applications for the Windows CE platform using Embedded Visual Basic and/or Embedded Visual C++? What factors should be considered when deciding between maintaining existing code or rewriting applications with the .NET Compact Framework?

KS: The answer is easier for the Embedded Visual Basic people, so I'll start there.

Many of the eVB customers that I've spoken to have been happy with the product. Others, however, feel that there is a 'glass ceiling' to the product. If you try to do applications that go beyond this barrier, it becomes quite difficult. In addition, the fact that it was limited to VBScript was quite limiting. For these developers, we have only good news. Now, they have the full VB .NET language, with the Compact Framework of classes to create their applications with.

Embedded Visual C++ developers, on the other hand do have a choice to make. If they need absolute control of the device, and they're happy developing with eVC, I often encourage them to continue. Those that want to create Web Services, or otherwise take advantage of the functionality available with the .NET Compact Framework, however, should do more than look at .NET Compact Framework. They will find that C# is an amazingly easy language to learn, and the framework does make doing a lot of stuff very easy.

<!-- FIN ARTICLE -->

 

]]>
主站蜘蛛池模板: 国产第一区二区三区在线观看 | 91精品国产一区二区三区左线 | 一级黄色片aaa | 黄色美女网站免费看 | 日本一级特黄aa毛片免费观看 | 久久免费视频播放 | 国产男人天堂 | 亚洲精品中文字幕久久久久久 | 手机在线看片福利 | 亚洲在线免费免费观看视频 | 亚洲福利国产精品17p | 久草久草久草 | 一级片中文字幕 | 中文字幕va一区二区三区 | 9丨精品国产高清自在线看 ⅹxx中国xxx人妖 | 精品国产成人高清在线 | 黄色三级网站在线观看 | 美女张开大腿让男人捅 | 久久青草免费线观最新 | 巨乳激情 | 国产成人综合怡春院精品 | 久久国产三级 | 国产男女爽爽爽免费视频 | 男女在线观看视频 | 国产一区二区免费播放 | 欧美成人毛片一级在线 | 成人高清在线观看 | 精品三级内地国产在线观看 | 国产理论视频 | 成人在线91| 欧美高清性色生活片免费观看 | 日韩中文字幕视频 | 国产欧美日韩综合一区二区三区 | 91久久福利国产成人精品 | 波多野结衣中文无毒不卡 | 日韩黄色视屏 | 久久国产美女免费观看精品 | 在线欧洲成人免费视频 | 亚洲视频精选 | 亚洲免费视频网站 | 欧美成人影院免费观 |