ASP.NET 的安全隱患

asp.net存在安全隱患,即攻擊者可以利用潛在的canonicalization攻擊webserver(即利用 ..\.. 欺騙 IIS,從而遍曆目錄),建議在Global.asax.cs中加入如下代碼提高安全性:<script language="C#" runat="server">void Application_BeginRequest(object source, EventArgs e) {    if (Request.Path.IndexOf('\\') >=

ASP.NET編程技巧

3、盡量減少表單回送 每當點擊Web網頁上的Button、LinkButton或ImageButton控制項時,表單就會被發送到伺服器上。如果控制項的AutoPostBack屬性被設定為true,如果CheckBox、CheckBoxList等控制項的狀態被改變後,也會使表單會發送回伺服器。 每次當表單被發送回伺服器,就會被重新載入,啟動Page_Load事件,執行Page_Load事件處理常式中的所有代碼。把網頁的初始化代碼放在這裡是最合適不過的了。我們經常會希望在每次載入網頁時執行一些代碼,

在 Asp.Net Web 應用程式中長時間裝載頁面時顯示進度條

在ASP.NET中顯示進度條對於載入時間比較長的ASP.NET頁面,我們可以在用戶端瀏覽器中顯示進度條來顯示頁面正在裝載。下面就是具體的實現過程:建立項目,名字為WebPortal,在項目類型中選擇Visual C#項目或者Visual Basic項目都可; 在模板類型中選擇ASP.NET Web應用程式; 位置裡輸入:http://localhost/WebPortal; 添加新項:名字為ShowProgress的Web表單。

在ASP.NET下實現數字和字元相混合的驗證碼

關鍵字   驗證碼,ASP.NET,.NET 出處          經常在論壇裡看到有問怎麼實現驗證碼的文章,其實關於驗證碼的文章在CSDN,DEV-CLUB等網站上都有很多,但是很多文章只講訴了如何輸出一個隨機產生數字或字元的圖象,當然了,這個是驗證碼的核心了,但是對很多ASP.NET的初學者來說,怎麼使用它產生的圖象又成了一個問題(論壇有不少問這個的),這也是我寫本文的一個原因.   

ASP.NET 1.x與ASP.NET 2.0的幾點區別

    1.Global.asax檔案的處理形式不一樣,轉化後將出現錯誤,在vs2003中Global.asax具有代碼後置檔案,2.0下, 將代碼分離檔案移到 App_Code 目錄下,以便使其自動變為可通過應用程式中的任意 ASP.NET 頁面訪問。“Code-behind”屬性將從 ASAX 檔案的指令中刪除。vs2005則直接把代碼寫在Global.asax。所以需要刪除轉化過來的檔案重新加入,並把相應的代碼copy過來。    2.2.0沒有了專案檔。 在 1.1

Interoperability with ASP.NET Web Services

Interoperability between ASP.NET Web services and Windows Communication Foundation (WCF) Web services can be achieved by ensuring that services implemented using both technologies conform to the WS-I Basic Profile 1.1 specification. ASP.NET Web

Basic Sample – How To Keep ASP.NET ViewState On The Server

Ref: ArticleDuring recent few engagements with my customers I've noticed  VIewState is extensively [unintentionally] used. ViewState is on by default. The result is heavy weight Html that round trips on the network. This causes slow response time

asp.net ajax 和 jquery 一起用出 blug 了,不知道是誰的 ?

asp.net ajax 和 jquery 一起用出 blug 了,不知道是誰的 ?現在做項目都是用 asp.net ajax 非同步請求,然後在 WebServices 操作商務邏輯,並傳回值然後用 jquery 處理返回的值,跟新頁面。昨天做了一個留言,點擊提交,因為是非同步。也沒有什麼具體的錯誤,就是沒有結果。為什麼我的 WebServices 裡面的插入沒有執行。。我記得我是用 VS2005 精簡版做的,難道是版本問題,乾脆換成專業版,問題依然存在

[轉 ] asp.net用url重寫URLReWriter實現任意次層網域

來找這篇文章的,應該都知道什麼叫次層網域吧,廢話就不說了.但是討論前,先要明白一個思想問題.很多朋友一直考慮不清(我前幾天也一直搞不明白)的問題是,我鍵入一個地址後,怎麼這個url就被重寫了?第一步:在瀏覽器鍵入了一個地址,比如http://love.kerry.com,點斷行符號後,都發生了什麼?為了把問題簡單化,我來這樣解釋:第二步:首先,鍵入的地址被解析,最終來到了一台web伺服器.交給IIS處理.在.net的世界中,IIS會把這樣的請求再交給一個web處理器 處理,最後,該

ASP.NET好書一本

ASP.NET 2.0 Website Programming: Problem - Design - Solution書裡面涉及很多實際開發的具體分析,設計,以及解決辦法,而且也算是淺顯易懂。我也是今天才剛剛有空拿起這本英文書對著電腦看的,以後我會陸續放上一些關於這本書每章的精華部分。對於初學者來說,這本書可以算是一本很不錯的入門asp.net 2.0的書,並且例子也很淺顯易懂,每一張都分成三塊,分別是1 . 提出問題2.

asp.net產生縮圖通用函數(支援多種產生方式)

/**//**//**//// <summary>        /// 產生縮圖        /// </summary>        /// <param name="originalImagePath">源圖路徑(實體路徑)</param>        /// <param name="thumbnailPath">縮圖路徑(實體路徑)</param>        /// <param name="wid

Running ASP.NET 1.1 with IIS 6.0

While Windows Server 2003 includes both IIS 6.0 and ASP.NET 1.1, these components are disabled by default. This whitepaper describes how to enable IIS 6.0 and ASP.NET 1.1, and recommends several configuration settings to get the optimal performance

ASP.NET 2.0 – Web Site vs Web Application project

Ref: http://maordavid.blogspot.com/2007/06/aspnet-20-web-site-vs-web-application.htmlA common question by asp.net developers is what project model should I use for asp.net application? Web Site project (which introduced with VS 2005) or Web

ASP.NET session expired simple solution

Add the following code to the template.master.cs

Using JQuery to Make Asp.Net Play Nice with Asp.Net

Ref: http://blog.spontaneouspublicity.com/2007/08/20/using-jquery-to-make-aspnet-play-nice-with-aspnet/  I have found that developing an Asp.Net application that makes heavy use of javascript is very difficult. One of the major pain points is

Implementing HTTP Handlers in ASP.NET

As I mentioned before, it was hard to find information on how to setup an ASP.NET HTTP handler when I first started out. Of course, after time, I've found a wealth of articles, posts, and comments from others on these and other related topics. As my

How to: Configure WCF Service to Interoperate with ASP.NET Web Service Clients

-->To configure a Windows Communication Foundation (WCF) service endpoint to be interoperable with ASP.NET Web service clients, use the System.ServiceModel.BasicHttpBinding type as the binding type for your service endpoint. You can optionally

ASP.NET Performance Tips

Ref: http://weblogs.asp.net/haroonwaheed/archive/2008/06/30/ASP.NET-Performance-Tips.aspxAt times even after applying the best coding policies & practices you don’t get the desired level of performance you are hoping from your ASP.NET

Speeding Up FireFox When Using the ASP.NET Development Server from Localhost

Ref: http://scottonwriting.net/sowblog/posts/13367.aspxI have long used FireFox as my default browser for surfing the web,but I typically test my ASP.NET pages on Internet Explorer for a coupleof reasons:Some of the larger software projects I work

ASP.NET Tutorial – Making hight quality image thumbnails

Ref: http://asptutorials.net/ASP/making-high-quality-image-thumbnails/It is very useful on image gallery websites to take uploaded gifs or jpegs and automatically create thumbnails from them. It is not simple to do this in ASP.NET 2, but this

總頁數: 1638 1 .... 506 507 508 509 510 .... 1638 Go to: 前往

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.