Q3,, Iis ? (Namespace) Q6, Q7, Q8 Visual Studio ? Q9 Q10 (Pre-Compile) Q11 IIS Q12 Q13
Q3,, Iis ? (Namespace) Q6, Q7, Q8 Visual Studio ? Q9 Q10 (Pre-Compile) Q11 IIS Q12 Q13
Q3 ,
Q4 ASP.NET , IIS ?
Q5 ASP.NET 2.0 (namespace)
Q6 ASP.NET ,
Q7 ,
Q8 Visual Studio ?
Q9
Q10 (Pre-compile) ASP.NET
Q11 IIS ASP.NET 1.x ASP.NET 2.0
Q12 ASP.NET AJAX ASP.NET 2.0
Q13 ASP.NET AJAX 1.0 ASP.NET 3.5
Q3 ,
Web , ,
, , ,
, ,
GZipStream GZip
DeflateStream Deflate
CompressionMode.Compress
Write()
CompressionMode.Decompress
Read()
,
, , 1
2-2
, Q3
1 GZipStream
stream.Write(SourceData, 0, (int)SourceData.Length);
stream.Flush();
ms.Flush();
result = ms.ToArray();
stream.Close();
ms.Close();
return result;
, , 2
2 GZipStream
source.Write(SourceData, 0, SourceData.Length);
source.Flush();
source.Position = 0;
GZipStream stream =
2-3
Part2
do
if (readBytes == 0)
break;
offset += readBytes;
ms.Write(buffer, 0, readBytes);
else
ms.Write(buffer, 0, buffer.Length);
ms.Flush();
result = ms.ToArray();
stream.Close();
ms.Close();
return result;
DeflateStream ,
GZipStream DeflateStream,
2-4
, Q3
1.
2. ( GIF/JPEG ) ,
, CPU
, ,
( 3 4)
// compress data.
data = CompressGZipData(data);
// Write to Client.
Response.ContentType = "application/octet-stream";
Response.BinaryWrite(data);
Response.End();
2-5
Part2
Stream s = response.GetResponseStream();
data = DecompressGzipData(data);
.NET Framework
DeflateStream
GZipStream
2-6
Q4 ASP.NET
IIS ?
,
,
, IIS ,
, ASP.NET
2-7
Part2
, ASP.NET ,
ASP.NET , , ASP.
NET (Dynamic Port) ,
, ,
, URL
,
,
false,
2-8
ASP.NET , IIS ? Q4
, ,
, ASP.NET ,
IIS , ASP.NET
( ) , ,
IIS , ASP.NET
,
, IIS ,
IIS ,
2-9
Q5 ASP.NET 2.0
(namespace)
V ASP.NET 2.0 V ASP.NET 3.5
Visual Studio .NET 2003 (.NET 1.x) Visual Studio 2005 (.NET 2.
0) Web , .NET 1.1 , ASP.NET
(namespace) ,
, ASP.NET ASP.
NET 2.0, , ASP.NET 2.0 ,
Visual Studio ,
, ,
ASP.NET 2.0 (.NET 2.0) ,
Partial Class, Partial Class ,
, C# VB.NET
2-10
ASP.NET 2.0 (namespace) Q5
1 ASP.NET
Partial Class , ,
, ,
( ) , Partial Class
, , Partial Class , ASP.NET 2.0 ,
ASP, , ,
2-11
Part2
2 ASP.NET
namespace ASP {
3 ASP.NET ASP.NET
namespace ASP {
2-12
ASP.NET 2.0 (namespace) Q5
, ASP.NET 2.0 ,
ASP.NET , ,
ASP.NET , , ASP.NET
Q6 ASP.NET ,
2-13
Q6 ASP.NET ,
ASP.NET , ,
, , ASP.NET 2.0
Cross-Page Post Back , A Post Back
B, B A Post Back ,
,
ASP.NET 1.x , ,
, , ASP.NET
2.0, , , ,
ASP.NET 1.x ASP.NET 2.0 (Visual Studio .NET Visual Studio 2005)
2-14
ASP.NET , Q6
/CorporationContent/Brands/BrandForm.aspx
ASP.CorporationContent.Brands CorporationContent_Brands_BrandForm
BrandForm
/CorporationContent/Corporation.aspx
ASP.CorporationContent CorporationContent_Corporation
Corporation
, , ASP.NET 2.0
,
,
App_Browsers
App_Code ,
DLL , , Web
2-15
Part2
App_LocalResources
(*.resx *.resource)
Bin , DLL
App_Code , (
WSDL XSD ), DLL , ,
App_Code ,
, , App_Code
, , C# VB.
NET , C# VB.NET , App_Code
, Web.config
<compilation debug="false">
<codeSubDirectories>
</codeSubDirectories>
</compilation>
App_Code
2-16
ASP.NET , Q6
(*.cs *.vb) ,
App_Code,
, ,
, ASP.NET ,
, ,
( Windows Forms Web Service ), App_Code ,
ASP.NET , ,
Q5 ASP.NET (namespace)
2-17
Q7 ,
ASP.NET 2.0 , ,
, , ,
ASP.NET 2.0 , 50 ,
, ,
, ,
, ,
ASP.NET ,
,
,
,
, ,
,
( HTML Rendering ),
,
, (User Control) ,
, (Composite
Control) , , ,
,
, ,
2-18
, Q7
1 (.ascx)
CodeFile="DateRangeSelector.ascx.cs"
Inherits="DateRangeSelector" %>
<link rel="stylesheet"
src="../../Scripts/calendar.js"></script>
src="../../Scripts/lang/calendar-en.js"></script>
src="../../Scripts/calendar-setup.js"></script>
EnableViewState="false" />
MaxLength="10" />
<script type="text/javascript">
Calendar.setup ({
inputField : startDateTextBoxID,
ifFormat : "%Y/%m/%d",
button : "btn1",
align : "B1"
});
</script>
MaxLength="10" />
2-19
Part2
<script type="text/javascript">
Calendar.setup ({
inputField : endDateTextBoxID,
ifFormat : "%Y/%m/%d",
button : "btn2",
align : "B1"
});
</script>
2 (.ascx.cs)
this.ScriptSpace.Text =
this.T_StartDate.ClientID + "\";" +
"\";" + "</script>";
if (!Page.IsPostBack)
this.T_StartDate.Text =
this._dateFrom.ToString("yyyy/MM/dd");
this.T_EndDate.Text = this._dateTo.ToString("yyyy/MM/dd");
2-20
, Q7
get
DateTime returnDate =
Convert.ToDateTime(this.T_StartDate.Text);
returnDate.Day, 0, 0, 0);
set
this._dateFrom = value;
get
set
this._dateTo = value;
}
2-21
Part2
, , ,
,
, (Custom Control) ,
, , Visual Studio
, , HTML Script
, , ,
DLL , ,
, ,
, ASP.NET 2.0 , ,
( sealed ) ,
, ,
,
2-22
, Q7
, (
T , ) , ,
, , ,
,
, , ,
, , ,
, ,
,
Exam 70-528: TS: Microsoft .NET Framework 2.0 Web Application Development
Web
Web
Exam 70-547: PRO: Designing and Developing Web Applications by using .NET Framework
, .NET Framework
2-23
Part2
Q14 Button , ?
Q16 ASP.NET ( )
Q23 ?
Q24 ?
Q25 ?
Q74 ?
2-24
Q8 Visual Studio ?
V ASP.NET 1.0 V ASP.NET 1.1 V ASP.NET 2.0 V ASP.NET 3.5
ASP.NET IIS , ,
IIS (Restricted) , IIS
, Windows Vista
( Q2 Windows Vista ), IIS
,
http://support.microsoft.com/kb/306172/en-us
2-25
Part2
<configuration>
<system.web>
</system.web>
</configuration>
, , debug true,
2-26
Visual Studio ? Q8
2-27
Part2
5. , Visual Studio ,
( )
,
2-28
Q9
V ASP.NET 1.0 V ASP.NET 1.1 V ASP.NET 2.0 V ASP.NET 3.5
Web , ,
, ,
,
Web , ,
, ,
, ,
, ,
, , Debug
2-29
Part2
, ,
(Production Environment) , ,
, ,
, , CPU ,
, Release ,
Trace , , ,
, Web
2-30
Q10 (Pre-compile)
ASP.NET
V ASP.NET 2.0 V ASP.NET 3.5
, ,
MSIL , , ,
, MSIL,
2-31
Part2
aspnet_compiler.exe
aspnet_compiler [-?]
[-c]
[-errorstack]
[-nologo]
[-delaysign]]
-v virtualPath IIS
-p physicalPath
-u
-f
-d Web.config,
targetDir
-c
-errorstack ,
-fixednames
-keyfile file
-keycontainer container
-aptca , (Partial
Trust)
-delaysign ,
2-32
(Pre-compile) ASP.NET Q10
, -v -p , -u
-fixednames
, -keyfile -delaysign, -keycontainer
-aptca
2-33
Part2
ASP.NET
ASP.NET , (In-place compilation) ,
aspnet_compiler HTTP Request, HTTP Request
(Binary Compilation) , ,
, ,
(Updatable Compilation) ,
, ,
, , ,
, ( ) ,
, ,
, ,
,
ASP.NET ,
aspnet_compiler.exe Visual Studio 2005
, Windows Installer
Web
2-34
Q11 1.x
IIS
ASP.NET 2.0
ASP.NET
2-35
Part2
, ASP.NET side-by-side ,
.NET Framework
IIS ASP.NET , ,
.NET Framework , .NET Framework
2-36
IIS ASP.NET 1.x ASP.NET 2.0 Q11
, ASP.NET 1.1
ASP.NET 1.1
2-37
Q12 ASP.NET AJAX
ASP.NET 2.0
V ASP.NET 2.0 V ASP.NET AJAX
ASP.NET AJAX ,
ASP.NET AJAX
2-38
ASP.NET AJAX ASP.NET 2.0 Q12
<configSections>
<sectionGroup name="system.web.extensions"
type="System.Web.Configuration.SystemWebExtensionsSectionGroup,
PublicKeyToken=31bf3856ad364e35">
<sectionGroup name="scripting"
type="System.Web.Configuration.ScriptingSectionGroup,
PublicKeyToken=31bf3856ad364e35">
<section name="scriptResourceHandler"
type="System.Web.Configuration.ScriptingScriptResourceHandlerSection,
System.Web.Extensions, Version=1.0.61025.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35"
requirePermission="false"
allowDefinition="MachineToApplication"/>
<sectionGroup name="webServices"
type="System.Web.Configuration.ScriptingWebServicesSectionGroup,
System.Web.Extensions, Version=1.0.61025.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<section name="jsonSerialization"
type="System.Web.Configuration.ScriptingJsonSerializationSection,
System.Web.Extensions, Version=1.0.61025.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35"
<section name="profileService"
type="System.Web.Configuration.ScriptingProfileServiceSection,
System.Web.Extensions, Version=1.0.61025.0,
2-39
Part2
Culture=neutral, PublicKeyToken=31bf3856ad364e35"
requirePermission="false"
allowDefinition="MachineToApplication" />
<section name="authenticationService"
type="System.Web.Configuration.ScriptingAuthenticationServiceSection,
System.Web.Extensions, Version=1.0.61025.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35"
requirePermission="false"
allowDefinition="MachineToApplication" />
</sectionGroup>
</sectionGroup>
</sectionGroup>
</configSections>
<appSettings> ,
, <system.web> ,
1. <asp:ScriptManager> , ScriptManager
asp , <system.web> <pages>
2
2 asp System.Web.Extensions.dll
<pages>
<controls>
assembly="System.Web.Extensions, Version=1.0.61025.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</controls>
</pages>
2-40
ASP.NET AJAX ASP.NET 2.0 Q12
3 System.Web.Extension
<compilation>
<assemblies>
Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</assemblies>
</compilation>
<httpHandlers>
type="System.Web.Script.Services.ScriptHandlerFactory,
PublicKeyToken=31bf3856ad364e35"/>
type="System.Web.Script.Services.ScriptHandlerFactory,
PublicKeyToken=31bf3856ad364e35"/>
type="System.Web.Handlers.ScriptResourceHandler,
PublicKeyToken=31bf3856ad364e35"/>
</httpHandlers>
2-41
Part2
<httpModules>
PublicKeyToken=31bf3856ad364e35"/>
</httpModules>
<system.web>
6 ASP.NET AJAX
<system.web.extensions>
<scripting>
<webServices>
<!--
<jsonSerialization maxJsonLength="500">
<converters>
<add name="ConvertMe"
type="Acme.SubAcme.ConvertMeTypeConverter"/>
</converters>
</jsonSerialization>
-->
2-42
ASP.NET AJAX ASP.NET 2.0 Q12
<!--
<authenticationService enabled="true"
requireSSL = "true|false"/>
-->
<!--
<profileService enabled="true"
readAccessProperties="propertyname1, propertyname2"
-->
</webServices>
<!--
<scriptResourceHandler enableCompression="true"
enableCaching="true" />
-->
</scripting>
</system.web.extensions>
2-43
Part2
<modules>
<add name="ScriptModule"
preCondition="integratedMode"
type="System.Web.Handlers.ScriptModule, System.Web.Extensions,
Version=1.0.61025.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35"/>
</modules>
<handlers>
<remove name="WebServiceHandlerFactory-ISAPI-2.0"/>
preCondition="integratedMode"
type="System.Web.Script.Services.ScriptHandlerFactory,
PublicKeyToken=31bf3856ad364e35"/>
path="*_AppService.axd" preCondition="integratedMode"
type="System.Web.Script.Services.ScriptHandlerFactory,
PublicKeyToken=31bf3856ad364e35"/>
type="System.Web.Handlers.ScriptResourceHandler,
PublicKeyToken=31bf3856ad364e35" />
</handlers>
2-44
ASP.NET AJAX ASP.NET 2.0 Q12
, , , , ,
ASP.NET AJAX, ASP.NET AJAX
1. ASP.NET AJAX
2. Web.config, Web.config
3. ( )
4. ,
, ASP.NET AJAX ,
http://ajax.asp.net
2-45
Q13 ASP.NET AJAX 1.0
ASP.NET 3.5
V ASP.NET 2.0
2-46
ASP.NET AJAX 1.0 ASP.NET 3.5 Q13
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions"
publicKeyToken="31bf3856ad364e35"/>
2-47
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0"
newVersion="3.5.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions.Design"
publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0"
newVersion="3.5.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
http://blogs.msdn.com/webdevtools/archive/2007/07/30/using-vs-2008-
to-target-asp-net-ajax-1-0.aspx
Upgrading ASP.NET AJAX 1.0 Web Site and Web Applications to .NET Framework 3.5
http://blogs.msdn.com/webdevtools/archive/2007/07/28/upgrading-asp-
net-ajax-1-0-websites-and-web-applications-to-net-framework-3-5.aspx
2-48