【正文】
te a simple web application named Cars. The first step is to create a new folder on your machine to hold the collection of files that constitute this new site (., C:\CodeTests\CarsWebSite). Next, you need to create a new virtual directory to host the Cars site. Simply rightclick the Default Web Site node of IIS and select New ? Virtual Directory from the context menu. This menu selection launches an integrated wizard. Skip past the wele screen and give your website a name (Cars). Next, you are asked to specify the physical folder on your hard drive that contains the various files and images that represent this site (in this case, C:\CodeTests\CarsWebSite). The final step of the wizard prompts you for some basic traits about your new virtual directory (such as read/write access to the files it contains, the ability to view these files from a web browser, the ability to launch executables [., CGI applications], etc.). For this example, the default selections are just fine (be aware that you can always modify your selections after running this tool using various rightclick Property dialog boxes integrated within IIS). 譯文 1 作者: 迪諾 第一個明顯不同的是,產(chǎn)生 Web 應(yīng)用程序?qū)⒅辽偕婕皟膳_聯(lián)網(wǎng)的機(jī)器(當(dāng)然在開發(fā)過程中完全有可能有一臺機(jī)器扮演客戶端和服務(wù)器角色)。此時,客戶端的 HTML瀏覽器從 Web服務(wù)器發(fā)出的請求。 Web服務(wù)器是 接管網(wǎng)絡(luò)應(yīng)用的軟件產(chǎn)品,而且通常提供集成安全等一系列相關(guān)服務(wù)的數(shù)量,文件傳輸協(xié)議( FTP)的支持,郵件交換服務(wù),等等。因此,如果您創(chuàng)建一個新的虛擬目錄名為CarsRUs,外界可以瀏覽到這個網(wǎng)站使用的網(wǎng)址,如 您的網(wǎng)站的 IP 地址已經(jīng)與整個世界的登記)。此菜單選擇啟動一個綜合向?qū)А?} Given that the Application_Error() event handler is the last chance exception handler for your web application, odds are that you would rather not report the error to the user, but you would like to log this information to the web server’s event log, for example: % Import Namespace = % ... void Application_Error(Object sender, EventArgs e) { // Log last error to event log. Exception ex = ()。 簡單地說, doubleclickable *.exe文件,在,這意味著這種類型的網(wǎng)站代表了本身運(yùn)行時的行為。 ()。 請求 :要求此屬性允許您進(jìn)行互動交流傳入的 HTTP請求(通過的 HttpRequest)。 服務(wù)器 :此屬性獲取當(dāng)前請求(通過 HttpServerUtility)的內(nèi)在服務(wù)器對象。 EventLog ev = new EventLog(Application)。如果在 ,你可能會記得, HttpApplication的義務(wù)。 (, )。接下來,您被要求指定您的硬盤驅(qū)動器包含各種文件和圖像的物理文件夾代表本網(wǎng)站(在此情況下, C: \ CodeTests \ CarsWebSite)。 當(dāng)您創(chuàng)建 Web應(yīng)用程序使用 Visual Studio 2021,您可以產(chǎn)生一個新的當(dāng)前網(wǎng)站的虛擬目錄選項。 當(dāng)你建立 Web 應(yīng)用程序,你會經(jīng)常需要與 IIS 進(jìn)行交互。只 要服務(wù)器發(fā)出響應(yīng)客戶 ,所有關(guān)于以前的交互作用被遺忘了。線路協(xié)議 ,關(guān)系到計算機(jī)的問題是超文本傳遞協(xié)議( HTTP)。在本章及下面學(xué)習(xí)中,將探討如何用 .NET 平臺促進(jìn)瀏覽器的建設(shè)。 了這一點(diǎn),本章的剩余部分主要 是 ASP網(wǎng)絡(luò)(包括增強(qiáng)的代碼隱藏模型),以及如何使用 Web控件和 。例如,如果導(dǎo)航到 域名稱服務(wù)( DNS)轉(zhuǎn)換成由四個部分組成, 32位數(shù)值(又名 IP 地址)注冊的網(wǎng)址。 了解 Web應(yīng)用程序和 Web服務(wù)器 一個 web應(yīng)用程序可以被理解為一個檔案集合( *.熱媒, *. asp和 *.的 ASPX,圖像文件等)和(如相關(guān)的 組件。為此,只需訪問添加 /從控制面板文件夾刪除程序小程序并選擇添加 /刪除 Windows 組件。第一步是創(chuàng)建一個你新文件夾以保存文件,構(gòu)成新的網(wǎ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 linkin