1 / 27

Internal ASP.NET

Internal ASP.NET. AJAX 、 Silver light 、 WCF など最新技術が満載の昨今. だからこそ、今、基本を押さえておきたい! ASP.NET の中身を詳しく知ろう!. ASP.NET による Web アプリケーション開発はすごく簡単. Windows アプリケーションのように開発できる。 ボタンクリックイベントやテキストボックス変更イベントなど。 Web である事を意識しなくても簡単に開発できる。 Visual Studio があれば、ある程度はコーディングレスで開発できる。. 本当に簡単か?.

mabli
Download Presentation

Internal ASP.NET

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Internal ASP.NET

  2. AJAX、Silver light、WCF など最新技術が満載の昨今 • だからこそ、今、基本を押さえておきたい!ASP.NET の中身を詳しく知ろう!

  3. ASP.NETによるWebアプリケーション開発はすごく簡単ASP.NETによるWebアプリケーション開発はすごく簡単 • Windowsアプリケーションのように開発できる。 • ボタンクリックイベントやテキストボックス変更イベントなど。 • Webである事を意識しなくても簡単に開発できる。 • Visual Studio があれば、ある程度はコーディングレスで開発できる。

  4. 本当に簡単か? • タイマー使いたいんですけど、うまく動きません。 • テキストボックスに文字を入力したんですけど、イベント拾えません。 • とにかく、値を取得できません。 • 値が初期値に戻るんですが。

  5. ASP.NETはHTTPを意識しなくても良いようになっているASP.NETはHTTPを意識しなくても良いようになっている • それがまずい!

  6. 当たり前だがHTTPの限界を超えられない。 • HTTPはステートレスなプロトコルである事を常に意識しよう。

  7. ASP.NET の処理の流れを知る

  8. ブラウザとWebサーバ

  9. HttpRuntime • ASP.NETパイプラインの入り口 • ProcessRequest(HttpWorkerRequestwr) • HttpContext、HttpApplication、HttpHandlerを作りリクエストを処理する。 • 「プログラミング ASP.NET 2.0」には、リクエスト毎にひとつのインスタンスが作成されるとあるが、多分まちがい。 • アプリケーションドメイン毎にひとつ存在するだけのはず。

  10. HttpWorkerRequest • リクエストをカプセル化したもの。 • ASP.NETをホストするプロセスが作成し、HttpRuntimeに渡す。 • ASP.NETをホスティングするためにSimpleWorkerRequestが用意されている。

  11. HttpContext • リクエスト→レスポンスに渡って使用するコンテキスト。 • リクエストの度に生成される。

  12. HttpApplicationFactory • HttpApplicationのインスタンスをつくる • プールに存在すればプール内のHttpApplicationを返す

  13. HttpApplication • Global.asax • ひとつのリクエストを担当する

  14. HttpApplicationのイベント • リクエスト開始 • 認証 • 承認 • キャッシュ解決 • セッション取得 • ハンドラ実行 • セッション更新 • キャッシュ生成 • リクエスト終了

  15. IHttpModule • FormsAuthenticationModule • ErrorHandlerModule • OutputCacheModule • SessionStateModule

  16. DEMO IHttpModule

  17. IHttpHandlerFactory • PageHandlerFactory • IHttpHandlerFactoryの利点は?

  18. IHttpHandler • Page(ASP.default.aspx) • HttpForddenHandler • IHttpHandler.ProcessRequest(HttpContext c)

  19. Pageのライフタイム

  20. 特に注意すべきなのは、ポストデータの設定が2度ある事。特に注意すべきなのは、ポストデータの設定が2度ある事。

  21. Pageの生成

  22. おまけ • 「Advanced Development on IIS 7」より

  23. IIS6

  24. IIS7

More Related