... invoking a page-agnostic URL in an ASP. NET Web Forms application.
4 PART I ASP. NETMVC fundamentals
Note This book is based on ASP. NETMVC 5. This version of ASP. NETMVC is backward
compatible with ... vii
Contents
Introduction xiii
PART I ASP. NETMVC FUNDAMENTALS
Chapter 1 ASP. NETMVC controllers 3
Routing incoming requests 4
Simulating the ASP. NETMVC runtime 4
The URL routing HTTP module ... can use ASP. NET to
execute code in response to a request regardless of the dependencies on physical les. This is just one
of the aspects that most distinguishes ASP. NETMVC from ASP. NET Web...
... developed as an ASP. NETMVC component, the URL routing module is
now a native part of the ASP. NET platform and, as mentioned, offers its services to both
ASP. NETMVC and ASP. NET Web Forms applications, ... . . . . . . . . . . . . . . . . . . . . . .185
PART II ASP. NETMVC SOFTWARE DESIGN
Chapter 5 Aspects of ASP. NETMVC Applications 189
ASP. NET Intrinsic Objects 189
SEO and HTTP Response
190
Managing ... to ASP. NET MVC, the idea of a bound context involves grouping controllers in areas.
10 PART I ASP. NETMVC Fundamentals
Although you can denitely use a pure REST approach within an ASP. NET MVC...
... 7.0
www
service
www
service
WAS
ASP. NET
Static/Nonstatic
Static
http.syshttp.sys
inetinfo.exe
w3wp.exe
aspnet_wp.exe
w3wp.exe
CLR
aspnet_isapi.dll
aspnet_isapi.dll
Browser
Browser
HTTP
HTTP
HTTP
Named
Pipe
ASPNET
Worker
Process
CLR
HTTP ... details.
ASP. NETMVC Wrapper Objects
ASP. NETMVC takes testability very seriously, and it shows in a number of ways. For example,
ASP. NETMVC supplies abstract classes for the various ASP. NET intrinsic ... between classic ASP (and, later, ASP. NET) and
JSP. This gap is covered today with the release of an alternative programming model for the
ASP. NET platform. Welcome, ASP. NET MVC!
Note You might...
... move to it.
ASP. NETMVC and Simplicity
Simplicity is a characteristic that is often associated with ASP. NET MVC. If you look at
Figure 1-8, you can hardly contest the point ASP. NETMVC is architecturally ... Handler
IIS
ASP. NET HTTP Runtime
Browser
MVC HTTP Handler
Response Output Stream
FIGURE 1-8 The run-time stack of ASP. NETMVC and Web Forms.
As you can see, the run-time stack of ASP. NETMVC is simpler ... as a clear strength of ASP. NET MVC, others
may see as a weakness. ASP. NETMVC doesn’t offer server controls of its own and also se-
verely limits the use of classic ASP. NET server controls. Even...
... interactions in an MVC application
The ASP. NETMVC Framework provides support for a choice of view engines. Earlier versions of MVC
used the standard ASP. NET view engine, which processed ASPX pages ... foundational ideas of ASP. NET
MVC, including the new features in ASP. NETMVC 4, and to experience in practice what the framework is
like to use.
www.it-ebooks.info
CHAPTER 3 THE MVC PATTERN
57 ...
P A R T 1
Introducing ASP. NETMVC 4
ASP. NETMVC is a radical shift for web developers using the Microsoft platform. It emphasizes clean
architecture, design...
... of ASP. NETMVC and
would like to both create ASP. NETMVC 4 applications and continue
working with ASP. NETMVC 3 applications, fear not ASP. NET MVC
can be installed and run side by side with ASP. NET ... it!
Installing ASP. NET MVC
In order to begin developing ASP. NETMVC applications, you’ll need to download and
install the ASP. NETMVC 4 Framework. This is as easy as visiting the ASP. NET MVC
website ... 4
ASP. NETMVC 4
The Model-View-Controller Architecture 4
The Model 5
The View 6
The Controller 6
What’s New in ASP. NETMVC 4? 6
Introduction to EBuy 8
Installing ASP. NETMVC 9
Creating an ASP. NET MVC...
... site
msdn .microsoft. com
msdn .microsoft. com
ASP. NET Web site
ASP. NET Web site
www .asp. net
www .asp. net
GotDotNet Web site
GotDotNet Web site
www.gotdotnet.com
www.gotdotnet.com
TechNet Security ...
msdn .microsoft. com/library/en-
msdn .microsoft. com/library/en-
us/dnnetsec/html/ThreatCounter .asp
us/dnnetsec/html/ThreatCounter .asp
Building Secure ASP. NET Applications
Building Secure ASP. NET ... element
Always run ASP. NET as a least-privileged account
Always run ASP. NET as a least-privileged account
Never run ASP. NET as SYSTEM
Never run ASP. NET as SYSTEM
Using the default ASPNET account...
... section called Programming Exercises.” These sections
contain exercises that might be used in a programming class to test your knowl-
edge of C programming.
Notes on the Third Edition
The C language ... first edition of Practical C Programming
was published. Back then, ANSI compilers were rare and compilers that accepted
the K&R syntax were common. Now the reverse is true.
The thirdedition ... options.
Windows Programming
You may wonder why we describe MS-DOS programming when Windows is
widely used. We do so because programming in Windows is much more com-
plex than programming in MS-DOS.
For...
... 11
ASP. NETMVC Is Open Source 11
Who Should Use ASP. NET MVC? 11
Comparisons with ASP. NET Web Forms 11
Comparisons with Ruby on Rails 12
Comparisons with MonoRail 13
What’s New in ASP. NETMVC ... Combining ASP. NET Technologies 675
Using ASP. NETMVC in a Web Forms Application 675
Upgrading an ASP. NET Web Forms Application to Support MVC 676
Interactions Between Web Forms Pages and MVC Controllers ... of
Pro ASP. NETMVC
Framework
US $54.99
Shelve in:
.NET
User level:
Intermediate–Advanced
THE APRESS ROADMAP
Pro
Silverlight 4 in C#
Pro
LINQ
Pro
ASP. NETMVC 2
Pro C# 2010
and the
.NET 4...
... con-
trasting classic ASP and ASP. NET, you get a good idea as to why things are the way they are
in ASP. NET. You can also gain an appreciation for all that ASP. NET does for you.
Microsoft originally ... or even classic ASP The text
explains how ASP. NET 3.5 is different from ASP. NET 1.x and 2.0. It also includes refer-
ences explaining differences between ASP. NET and classic ASP.
Those who ... Introduction xxv
Microsoft Internet Information Services (included with Windows)
Microsoft Visual Studio 2008 Standard Edition or Microsoft Visual Studio 2008
Professional Edition
Microsoft SQL...
...
GET/vdir/page.aspx HTTP/1.1 200 OK
aspnet_isapi.dll
(ISAPI Extension)
another_isapi.dll
(ISAPI Extension)
asp. dll
(ISAPI Extension)
IHttpHandler
named pipe
ASP. NET Worker Process
(aspnet_wp.exe)
INETINFO.EXE ... 7.0
Kernel
http.sys
GET/vdir/page .asp
GET/vdir2/page.aspx
FIGURE 2-3 ASP. NET and IIS 7.0
Throughout the forthcoming chapters, we’ll follow a request through the ASP. NET pipeline.
You can plug into the ASP. NET pipeline ... File, Open.
3. Find the assembly compiled by the ASP. NET runtime. Go to C:\WINDOWS \Microsoft
.NET\ Framework\v2.0.50727\Temporary ASP. NET Files\aspnetstepbystep\. The subdi-
rectory is named v2.0.50727...
... containing the control.
Tell ASP. NET to assign unique IDs for the child
controls within either type of composite
control
Derive the binary composite control from ASP. NET s
CompositeControl class. ... this case, ASP. NET passes in a normal HtmlTextWriter into the RenderControl method.
However, if you happen to get a request from a lesser browser that understands only HTML 3.2,
ASP. NET passes ... browser capabilities confi guration help ASP. NET fi gure out what kind of HtmlTextWriter to
use. The browser capability information deduced by the ASP. NET runtime may be used for more
than simply...
... We saw how ASP. NET supports data caching in Chapter 15. The contents of the application
data cache in ASP. NET may be fl ushed due to various dependencies. The same is true of ASP.
NET output ... within ASP. NET.
Page Tracing
The fi rst place to start with debugging is to examine ASP. NET page tracing. The Page class
has a property named Trace. When Trace is turned on, it tells the ASP. NET ... Exceptions
In the last example page that threw an exception, ASP. NET responded by redirecting to the
default error page. ASP. NET also lets you trap exceptions by setting up a handler for Error...