【正文】
bed. Sorry!)。 簡單地說, doubleclickable *.exe文件,在,這意味著這種類型的網站代表了本身運行時的行為?;叵胍幌拢粋€特定的頁面能處理網頁本身范圍內發(fā)生的錯誤事件。 ()。 ()。 請求 :要求此屬性允許您進行互動交流傳入的 HTTP請求(通過的 HttpRequest)。 。 服務器 :此屬性獲取當前請求(通過 HttpServerUtility)的內在服務器對象。 } HttpApplication基類 如上所述, ,它提供作為 。 EventLog ev = new EventLog(Application)。如同頁面級錯誤事件,您可以訪問特定的 : void Application_Error(Object sender, EventArgs e) { Exception ex = ()。如果在 ,你可能會記得, HttpApplication的義務。雖然可以通過建立起來的相關網頁設置一個 Web應用程序,你很可能需要 一種整個互動的 Web應用程序。 (, )。 ()。接下來,您被要求指定您的硬盤驅動器包含各種文件和圖像的物理文件夾代表本網站(在此情況下, C: \ CodeTests \ CarsWebSite)。 下面,需要創(chuàng)建一個新的虛擬目錄舉辦汽車的網站。 當您創(chuàng)建 Web應用程序使用 Visual Studio 2021,您可以產生一個新的當前網站的虛擬目錄選項。 工作與 IIS 虛擬目錄 在每一個虛擬目錄里單一的 IIS 有能力辦好許多 Web應用程序。 當你建立 Web 應用程序,你會經常需要與 IIS 進行交互。 NET 代碼庫)在一組特定的目錄中存儲給定的 Web服務器。只 要服務器發(fā)出響應客戶 ,所有關于以前的交互作用被遺忘了。此時, 瀏覽器打開一個(通常是通過端口 80)套接字連接和發(fā)送的默認 HTTP 網頁上 一旦托管的 Web服務器接收 發(fā)送來的 HTTP請求,指定的資源可能包含邏輯輸入值(例如在一個文本框的值),以便以適當?shù)母袷交貜?HTTP響應。線路協(xié)議 ,關系到計算機的問題是超文本傳遞協(xié)議( HTTP)。正如你所看到的, 了一些新的網絡控制模式,新的 “母版頁 ”的模式,以及各種定制技術。在本章及下面學習中,將探討如何用 .NET 平臺促進瀏覽器的建設。弗雷 國籍 : 美國 出處: and DataBound Controls 網頁和 Web 控件 到現(xiàn)在為止,本書的示例應用程序主要集中在控制臺和基于 Windows 窗體前端。 了這一點,本章的剩余部分主要 是 ASP網絡(包括增強的代碼隱藏模型),以及如何使用 Web控件和 。鑒于這一事實,機器必須確定一個特定的有線協(xié)議,以確定如何發(fā)送和接收數(shù)據。例如,如果導航到 域名稱服務( DNS)轉換成由四個部分組成, 32位數(shù)值(又名 IP 地址)注冊的網址。 網絡的另一個顯著的發(fā)展是從傳統(tǒng)的桌面 程序變成 HTTP的無國界有線協(xié)議。 了解 Web應用程序和 Web服務器 一個 web應用程序可以被理解為一個檔案集合( *.熱媒, *. asp和 *.的 ASPX,圖像文件等)和(如相關的 組件。互聯(lián)網信息服務( IIS)是微軟的企業(yè)級 Web服務器的產品,它內在的支持傳統(tǒng)的 ASP以及 Web應用程序。為此,只需訪問添加 /從控制面板文件夾刪除程序小程序并選擇添加 /刪除 Windows 組件。在內部,該虛擬目錄映射到一個物理根目錄,如 C: \ ipub \ root的 \ AspNetCarsSite,其中包含 Web應用程序的內容。第一步是創(chuàng)建一個你新文件夾以保存文件,構成新的網站(例如, C: \ CodeTests \ CarsWebSite)集合。跳過過去的歡迎屏幕,是你的網站的名稱(汽車)。 原文 2 The Role of the File At this point, an application may seem to be little more than a set of *.aspx files and their respective web controls. While you could build a web application by simply linking a set of related web pages, you will most likely need a way to interact with the web application as a whole. To this end, your web applications may choose to include an optional file via the WebSite. Add New Item menu option. Simply put, is just about as close to a traditional doubleclickable *.exe that we can get in the world of , meaning this type represents the runtime behavior of the website itself. Once you insert a file into a web project, you will notice it is little more than a script block containing a set of event handlers: % Application Language=C % script runat=server void Application_Start(Object sender, EventArgs e) { // Code that runs on application startup } void Application_End(Object sender, EventArgs e) { // Code that runs on application shutdown } void Application_Error(Object sender, EventArgs e) { // Code that runs when an unhandled error occurs } void Session_Start(Object sender, EventArgs e) { // Code t