* MasterPageParser.cs: do not compile anything while
parsing. MasterType virtual path is not compiled, but stored for
later. It is compiled when the MasterType property is requested
from within MasterPageCompiler.
* PageParser.cs: do not compile anything while
parsing. MasterPageFile, MasterType and PreviousPageType virtual
paths aren't compiled but checked for existence and stored for
later. Actual compilation happens when the MasterType and
PreviousPageType are requested from within PageCompiler.
* BaseParser.cs: added a new helper method, ThrowParseFileNotFound.
2008-12-10 Marek Habersack <[email protected]>
* ParseException.cs: made serializable.
* PageCompiler.cs: CreateStronglyTypedProperty calls
AddReferencedAssembly to add type's assembly to the unit's
references after the typed property has been created.
* BaseCompiler.cs: added a new helper method,
AddReferencedAssembly to be used whenever an assembly location
needs to be added to the compilation unit's list after the parsing
is done (e.g. when processing PreviousPageType or MasterPageType
properties in PageParser)
2008-12-10 Marek Habersack <[email protected]>
* Makefile (TEST_RESOURCE_FILES): added
Test/mainsoft/NunitWebResources/MissingMasterFile.aspx
* System.Web_test.dll.sources: added System.Web.UI/PageParserTest.cs
2008-12-10 Marek Habersack <[email protected]>
* NunitWebResources/MissingMasterFile.aspx: added
2008-12-10 Marek Habersack <[email protected]>
* PageParserTest.cs: added
svn path=/trunk/mcs/; revision=121181
* System.Web.dll.sources: added
System.Web.Compilation/AspComponent.cs
2008-11-25 Marek Habersack <[email protected]>
* RootBuilder.cs: use new API in AspComponentFoundry to retrieve
registered control type.
* TemplateControlParser.cs: AddControlImports () removed. Its
functionality is now implemented in ControlBuilder.AddChild in a
more elegant, fine grained and correct way.
* TemplateParser.cs: replaced some "" with String.Empty
* ControlBuilder.cs: AddChild now adds an import for child's
namespace if the control being added has been registered in the
web.config file. Possible fix for #447896 and #447898
* PageParser.cs, MasterPageParser.cs: do not call
AddControlImports, it no longer exists.
2008-11-25 Marek Habersack <[email protected]>
* AspComponentFoundry.cs: GetComponentType methods replaced with
GetComponent returning an instance of AspComponent which fully
describes the registered item. Components are cached, indexed by
full tag name.
* AspComponent.cs: added
svn path=/trunk/mcs/; revision=119893
* TemplateControlParser.cs: added internal method
AddControlImports which adds namespaces named in the
pages/controls section of web.config
* MasterPageParser.cs: unconditionally add namespaces named in the
pages/controls section of web.config.
* PageParser.cs: add namespaces named in the pages/controls
section of web.config to the page whenever it uses a master page.
svn path=/trunk/mcs/; revision=116858
* PageParser.cs (ProcessMainAttributes): Take value of
enableEventValidation from web.config into account. Fixes bug #397099.
svn path=/trunk/mcs/; revision=104877
* AspComponentFoundry.cs: added a new GetComponentType overload
which returns component source and a boolean flag whether the
control was registered from web.config (2.0).
2008-04-24 Marek Habersack <[email protected]>
* RootBuilder.cs: when registering a custom control, add its path
to the parser dependencies. Fixes bug #377915
In the 2.0 profile, if the custom control being used was
registered from web.config and is found in the same directory what
the file being parsed, throw an exception. This behavior matches
MS.NET.
* TemplateParser.cs: added new VirtualPath property, which stores
the virtual path to the file being parsed.
* PageParser.cs: set the VirtualPath property in the 2.0 profile
when constructing the parser.
svn path=/trunk/mcs/; revision=101623
* WebHandlerBuildProvider.cs: derive from the new
SimpleBuildProvider class.
* BuildManager.cs: full implementation of the batch compilation
for the 2.0 profile. The implementation is most probably different
to MS.NET's but the effects are the same (or nearly the same -
there are some minor differences). There are missing bits and
pieces, but minor ones - to be added later.
* SimpleBuildProvider.cs: new build provider abstract class
deriving from the GenericBuildProvider that implements common code
for building web handlers and web services.
* GenericBuildProvider.cs: new generic abstract class used to
implement base builder code for all the build provider types and
maximize code reuse.
* PageBuildProvider.cs: derive from the new TemplateBuildProvider
class and implement all the necessary abstract members.
Handle "fake" virtual paths, to properly support generating of the
WSDL helper code.
* BuildProvider.cs: SetVirtualPath now converts the passed path to
absolute URL.
Added internal virtual method GenerateCode, used by derived
classes.
SetCommonParameters no longer sets the referenced assemblies, this
is done in BuildManager now.
Added an internal virtual property CodeUnit which returns the
build provider's compilation unit.
* PageCompiler.cs: fix assignment of base types for asynchronous
pages, to match MS.NET.
For asynchronous pages, add the necessary methods generation.
* BaseCompiler.cs: default namespace is now set using a constant.
Renamed the Init method into ConstructType, to better reflect its
purpose and made the method internal - it is used by the build
providers.
Added several CreateProvider overloads for easier and more unified
compilation provider creation.
Added an internal MainClassType property to enable class type name
retrieval from other parts of the class hierarchy.
* ApplicationFileBuildProvider.cs: new build provider deriving
from the TemplateBuildProvider class to compile the global.asax
file.
* AspGenerator.cs: properly handle parsers which have no input
file path given, but use TextReader instead.
Dependencies are virtual paths now, convert them to physical ones
before creating cache dependency.
* CachingCompiler.cs: parser dependencies are virtual paths now,
convert them to physical ones before creating cache dependency.
* AssemblyBuilder.cs: full implementation of the documented
functionality as well as a lot of internal build code
added. Produces assemblies using the same style what MS.NET for
temporary and target file naming. Handles partial type squashing
if the same partial type is used by several code compile units
added to the same builder instance.
* MasterPageBuildProvider.cs: use the new TemplateBuildProvider
base class and add implementation of all the abstract methods
required by it.
* ThemeDirectoryBuildProvider.cs: new build provider to compile
theme directories. Replaces the old ThemeDirectoryCompiler class.
* UserControlBuildProvider.cs: use the new TemplateBuildProvider
base class and add implementation of all the abstract methods
required by it.
* TemplateBuildProvider.cs: new internal abstract class which
implements the common tasks for all the template control build
providers.
* WebServiceBuildProvider.cs: use the new SimpleBuildProvider base
type to implement building.
2008-01-24 Marek Habersack <[email protected]>
* PageThemeFileParser.cs: the DefaultBaseType property removed.
* ApplicationFileParser.cs: added constructor which takes a
TextReader.
Removed the DefaultBaseType property.
Added the Reader property.
* MasterPage.cs: use BuildManager to create page instance.
* WebHandlerParser.cs: added a compatibility constructor.
* TemplateControl.cs: GetTypeFromControlPath uses
BuildManager.GetCompiledType for the 2.0+ profile.
* WebServiceParser.cs: added a compatibility internal
constructor.
* SimpleWebHandlerParser.cs: properly treat context and
physicalPath parameters to the constructor, especially for the
2.0+ profile where they are obsolete.
Dependencies are added using virtual paths.
* PageThemeParser.cs: DefaultBaseType property removed.
* Page.cs: Style sheets and themes are compiled using
BuildManager.
Previous page instance is compiled using BuildManager for the 2.0+
profile.
* MasterPageParser.cs: Use BuildManager to create instance and
compile types.
Dependencies are added using virtual paths.
* SimpleHandlerFactory.cs: Use
BuildManager.CreateInstanceFromVirtualPath for the 2.0+ profile.
* UserControlParser.cs: if the parser is created using a
TextReader, take the input file path from the virtual path.
Added a new internal constructor which takes both a TextReader and
an inputFile parameters.
Set base type to the default in the constructors.
Use virtual path when setting master page dependency.
DefaultBaseTypename doesn't use a literal string in the 2.0+
profile, it gets the base type from the application
configuration.
* TemplateControlParser.cs: Dependency on a control/page mentioned
in the Reference directive is registered using the virtual path.
TextReader property is an override now.
* TemplateParser.cs: RegisterCustomControl adds a dependency on
the virtual path, not the physical path. The custom control is
compiled using BuildManager.GetCompiledType for the 2.0+ profile.
RegisterNamespace does not add a dependency on the assembly.
LoadType does not add a dependency on the assembly.
Legacy Src attribute is handled properly now.
Dependency on code-behind (Src and CodeFile directive attributes)
is added using the code-behind file's virtual path.
GetAssemblyFromSource adds a dependency using the virtual path.
DefaultBaseType implemented here, using DefaultBaseTypeName which
is implemented in the descendant classes.
Added internal CodeBehindSource property, used by build
providers.
ClassName property works correctly if inputFile is missing
(e.g. when the parser has been created using a TextReader)
Added a virtual internal property TextReader to return the readed
which has been used to create the parser instance.
* PageHandlerFactory.cs: GetHandler uses
BuildManager.CreateInstanceFromVirtualPath for the 2.0+ profile.
* PageParser.cs: set the default base type in the constructors.
If the input file is not passed to a constructor, take the input
file path from the virtual path.
GetCompiledPageInstance uses BuildManager.CreateInstanceFromVirtualPath
for the 2.0+ profile.
MasterPage dependency is set using the virtual path of the master
page.
MasterPage is compiled into a type using BuildManager.GetCompiledType.
GetCompiledPageType uses BuildManager.GetCompiledType for the 2.0
profile.
DefaultBaseType override removed, it is implemented in the
TemplateParser class.
DefaultBaseTypename doesn't use a literal string in the 2.0+
profile, it gets the base type from the application
configuration.
2008-01-24 Marek Habersack <[email protected]>
* HttpApplicationFactory.cs: use BuildManager.GetCompiledType to
build the application (global.asax) file.
svn path=/trunk/mcs/; revision=93848
* SimpleWebHandlerParser.cs: Default value for Debug is taken from
the compilation config section.
* TemplateParser.cs: Added LoadConfigDefaults here, loads default
value for Debug from the compilation section.
Cache CompilationConfig in methods where it is accessed more than
once.
Default value for Debug in ProcessMainAttributes is taken from the
compilation config.
* PageParser.cs, TemplateControlParser.cs: LoadPagesConfigDefaults
renamed to LoadConfigDefaults.
2007-12-15 Marek Habersack <[email protected]>
* AppCodeCompiler.cs: do not instantiate CodeDomProvider twice.
* BaseCompiler.cs: do not use CreateCompiler () in the 2.0
profile, it's obsoleted. CachingCompiler will use the
CodeDomProvider methods directly in that case.
* WebServiceCompiler.cs: Updated GetCompiledType to acquire
compiler information for the 2.0 profile from system.codeDom.
* CachingCompiler.cs: the Compile overloads do not use the
compiler instance, but call appropriate methods on the
CodeDomProvider instance directly.
Updated some Compile overloads to acquire compiler information for
the 2.0 profile from system.codeDom.
svn path=/trunk/mcs/; revision=91343
* TemplateParser.cs: add the file pointed to by the Src or
CodeFile attributes to the list of page cache dependencies.
* PageParser.cs, UserControlParser.cs: Add the MasterPage file to
the list of page cache dependencies.
* MasterPageParser.cs: add the source pointed to by VirtualPath to
the list of cache dependencies.
svn path=/trunk/mcs/; revision=88403
* TemplateParser.cs: removed code that ignored the Async and
AsyncTimeout attributes.
* PageParser.cs: handle the Async and AsyncTimeout attributes
here. Fixes bug #325450
2007-10-17 Marek Habersack <[email protected]>
* PageCompiler.cs: added code to set the AsyncMode and
AsyncTimeout Page properties.
svn path=/trunk/mcs/; revision=87714
* PagesConfiguration.cs: Use enum for EnableSessionState.
* PagesEnableSessionState.cs: Marked internal on 1.0 profile.
* PageParser.cs: Replace enableSessionState and readOnlySessionState
bools with enum backed field. Move 1.0 profile code for checking value
of EnableSessionState pages config to PagesConfigurationHandler.
Fixes bug #82392 for 1.0 profile.
svn path=/trunk/mcs/; revision=83810
* PageParser.cs: honor web.config enableSessionState
ReadOnly setting instead of overwriting based on default value for
page directive EnableSessionState. Patch from Joel Reed
<[email protected]>, thanks! Fixes bug #82392
svn path=/trunk/mcs/; revision=83807
* PageParser.cs: added support for the PreviousPageType
directive.
2007-05-24 Marek Habersack <[email protected]>
* PageCompiler.cs: added support for the PreviousPageType directive.
* Directive.cs: as above.
svn path=/trunk/mcs/; revision=77907
* HttpCapabilitiesBase.cs: move the User-Agent code to a separate
internal method.
2007-05-01 Marek Habersack <[email protected]>
* HtmlForm.cs: do not use User-Agent directly, we must take
ClientTarget into account.
2007-05-01 Marek Habersack <[email protected]>
* BaseValidator.cs: do not use User-Agent directly, we must take
ClientTarget into account.
2007-05-01 Marek Habersack <[email protected]>
* PageParser.cs: clientTarget comparisons must be case-insensitive
svn path=/trunk/mcs/; revision=76522
* PagesSection.cs: provide appropriate default value for the
asyncTimeout setting.
2007-04-06 Marek Habersack <[email protected]>
* Page.cs: defaults for ViewStateEncrptionMode and AsyncTimeout
are read from the pages section, if found.
* TemplateControlParser.cs: added support for loading
pages/controls defaults from web.config even if the page/control
does not have its corresponding directive.
Added support for reading the CompilationMode attribute.
* PageParser.cs: added support for loading pages/controls defaults
as above. Fixes bug #80915.
Added support for reading the maxPageStateFieldLength setting.
Added support for reading the pageParserFilter setting.
svn path=/trunk/mcs/; revision=75475
2006-03-02 Chris Toshok <[email protected]>
* Control.cs (ApplyStyleSheetTheme): remove the exception, and add
a MonoTODO.
* Page.cs (Theme): implement setter/getter.
(StyleSheetTheme): same.
* PageParser.cs (ProcessMainAttributes): parse the Theme and
StyleSheetTheme attributes.
In System.Web.UI.WebControls:
2006-03-02 Chris Toshok <[email protected]>
* WebControl.cs (SkinID): implement setter/getter, and have them
just chain up to base.SkinID.
In System.Web.Compilation:
2006-03-02 Chris Toshok <[email protected]>
* TemplateControlCompiler.cs (InitMethod): emit an assignment for
SkinID just after the creation of our object, and right after that
call "_ctrl.ApplyStyleSheetSkin (page)".
(CreateAssignStatementsFromAttributes): split out the majority of
this code to CreateAssignStatementFromAttribute, and change this
method to simply a loop over the attribute keys. In the 2.0 case,
skip the SkinID property, since that's handled explicitly in
InitMethod.
* PageCompiler.cs (AddStatementsToInitMethod): emit assignments
for Theme and StyleSheetTheme.
svn path=/trunk/mcs/; revision=57516
* System.Web.UI/WebHandlerParser.cs:
* System.Web.UI/WebServiceParser.cs:
* System.Web.UI/UserControlParser.cs:
* System.Web.UI/PageParser.cs: added new ctor that uses a TextReader
as input.
* System.Web.UI/TemplateControlParser.cs: new Reader property.
* System.Web.UI/SimpleWebHandlerParser.cs: new Reader property and
ctor.
* System.Web.dll.sources: added new files.
* System.Web.Compilation/GlobalAsaxCompiler.cs:
* System.Web.Compilation/PageCompiler.cs:
* System.Web.Compilation/TemplateControlCompiler.cs: CreateMethods is
now internal.
* System.Web.Compilation/WebServiceBuildProvider.cs:
* System.Web.Compilation/PageBuildProvider.cs:
* System.Web.Compilation/UserControlBuildProvider.cs:
* System.Web.Compilation/WebHandlerBuildProvider.cs: new build
providers.
* System.Web.Compilation/BuildProvider.cs: add assemblies.
* System.Web.Compilation/BaseCompiler.cs: expose the provider and the
compile unit through properties.
svn path=/trunk/mcs/; revision=56878
* MasterPage.cs (CreateMasterPage): don't nullref on null
contentTemplateCollection.
* ControlBuilder.cs: add a flushOutputStatements field.
* PageParser.cs (ProcessMainAttributes): handle Title attribute.
(Title): add getter.
* Page.cs (Title): implement getter/setter.
(InternalProcessRequest): after calling ApplyMasterPage, apply the
page's Title directive if there is one.
(AddContentTemplate): make the EditorBrowsable attribute apply to
the method, not the field.
svn path=/trunk/mcs/; revision=56634
* Page.cs (GetFormatter): CONFIGURATION_2_0 work.
* TemplateParser.cs (..ctor): CONFIGURATION_2_0 work.
(PagesConfig): add a CONFIGURATION_2_0 version that returns a
PagesSection.
* PageParser.cs (ProcessMainAttributes): CONFIGURATION_2_0 work.
* BaseParser.cs (CompilationConfig): add a CONFIGURATION_2_0
version that returns a CompilationSection.
svn path=/trunk/mcs/; revision=53582
* Html32TextWriter.cs: Added LinkDemand and InheritanceDemand for
AspNetHostingPermission with Minimal level. Added new 2.0 properties
(but the generated HTML doesn't use them).
* HtmlTextWriter.cs: Added LinkDemand and InheritanceDemand for
AspNetHostingPermission with Minimal level.
* ImageClickEventArgs.cs: Added LinkDemand for AspNetHostingPermission
with Minimal level.
* LiteralControl.cs: Added LinkDemand and InheritanceDemand for
AspNetHostingPermission with Minimal level. Default Text is null.
* LosFormatter.cs: Added LinkDemand and InheritanceDemand for
AspNetHostingPermission with Minimal level. Stubbed new 2.0 ctor.
* ObjectConverter.cs: Added LinkDemand and InheritanceDemand for
AspNetHostingPermission with Minimal level. Obsoleted ctor for 2.0.
* ObjectTagBuilder.cs: Added LinkDemand for AspNetHostingPermission
with Minimal level. Added check for null id (HttpException).
* Page.cs: Added LinkDemand and InheritanceDemand for
AspNetHostingPermission with Minimal level. Throw some HttpException
when no context is available.
* Pair.cs: Added LinkDemand for AspNetHostingPermission with Minimal
level. InheritanceDemand too for 1.x.
* PageParser.cs: Added LinkDemand for AspNetHostingPermission with
Minimal level.
svn path=/trunk/mcs/; revision=50093
* PageParser.cs: don't try to compile the master page if it wan't
provided. Use MapPath from the base classes instead of the long
version. Fixes bug #75269 that prevented xsp2 from working properly.
svn path=/trunk/mcs/; revision=46006
* PageParser.cs: Added MasterType property. Get the type from the
MasterType directive.
* MasterPageParser.cs: Added GetCompiledMasterType method.
svn path=/trunk/mcs/; revision=45884
* PageParser.cs: Read the MasterPageFile attribute.
* UserControlParser.cs: Not sealed any more since we need to inherit from
it. Added new constructor with an additional "type" parameter.
* MasterPageParser.cs: Parser for master pages.
* Page.cs: Added support for master pages.
* MasterPage.cs: Implemented.
svn path=/trunk/mcs/; revision=39318
* System.Web/TraceContext.cs: added internal HaveTrace property whose
value is true when the page has a Trace attribute.
* System.Web.Handlers/TraceHandler.cs: check that trace is enabled or
throw.
* System.Web.UI/Page.cs: added additional checks for saving/displaying
trace data.
* System.Web.UI/PageParser.cs: removed checks for trace enabled in
configuration files.
Thanks to David Taylor for most of these patch and the tests.
svn path=/trunk/mcs/; revision=30638
* PageParser.cs:
* UserControlParser.cs: set the page/user control base type even when no
default directive provided. Fixes bug #60572.
svn path=/trunk/mcs/; revision=30227
* PageParser.cs: use default trace settings from web.config and check
if trace is only requested for local connections. Fixes bug #60180.
svn path=/trunk/mcs/; revision=30206
* System.Web/TraceContext.cs: don't check if HttpRuntime.TraceManager
is enabled when writing.
* System.Web.Compilation/PageCompiler.cs: fixed Trace and add support
for Buffer.
* System.Web.UI/Page.cs: removed obsolete TODO. Only check if Trace is
enabled, not HttpRutime.TraceManager.
* System.Web.UI/PageParser.cs: for 'trace' we have 2 variables now.
Added support for 'buffer' attribute.
Fixes bug #58481.
svn path=/trunk/mcs/; revision=28873
* System.Web.dll.sources: added new files in S.W.Configuration.
* System.Web/HttpContext.cs: add setter for ConfigTimeout.
* System.Web/HttpException.cs: added Description property and HTML
encode some unescaped values.
* System.Web/HttpRequest.cs: support request validation.
* System.Web/HttpRequestValidationException.cs: added message and
description.
* System.Web/HttpServerUtility.cs: implemented ScriptTimeout.
* System.Web.Compilation/PageCompiler.cs: invoke Request.ValidateInput
if required.
* System.Web.Configuration/GlobalizationConfiguration.cs: undo old fix.
* System.Web.Configuration/PagesConfiguration.cs:
* System.Web.Configuration/PagesConfigurationHandler.cs: new files for
processing system.web/pages section.
* System.Web.UI/ApplicationFileParser.cs: adde DefaultBaseTypeName
property.
* System.Web.UI/PageParser.cs: support validateRequest.
* System.Web.UI/TemplateControlParser.cs: get default values from
system.web/pages section.
* System.Web.UI/TemplateParser.cs: added separate method for changing
base type (Inherits or system.web/pages).
* System.Web.UI/UserControlParser.cs: support system.web/pages defined
base type.
svn path=/trunk/mcs/; revision=21971
* LosFormatter.cs: new ctor for 1.1. The default ctor is public.
* Page.cs: added ViewStateUserKey and made RegisterclientScriptFile
internal.
* PageParser.cs: the ctor is public.
* PartialCachingAttribute.cs: added new ctor and Shared property.
svn path=/trunk/mcs/; revision=21290
* System.Web.dll.sources: added CustomErrorsConfigHandler.cs
* System.Web/HttpContext.cs: implemented IsCustomErrorEnabled and
IsDebuggingEnabled. Added internal ErrorPage property.
* System.Web/HttpRuntime.cs: on error, check if we have a custom error
page enabled to handle it and redirect.
* System.Web/HttpResponse.cs: added RedirectCustomError (), which
actually does the redirection to the error page.
* System.Web.Compilation/PageCompiler.cs: assign the ErrorPage property
if provided.
* System.Web.UI/Page.cs: assign the ErrorPage to the context if we get
an exception when processing the page which only calls Unload.
* System.Web.UI/PageParser.cs: handle ErrorPage.
* System.Web.Configuration/CustomErrorsConfigHandler.cs: handle
<system.web><customErrors />..
Closes bug #51979.
svn path=/trunk/mcs/; revision=21286
* System.Web.Compilation/PageCompiler.cs: assign LCID, Culture and/or
UICulture in FrameworInitialize() if provided in @Page.
* System.Web.UI/Page.cs: fixed UICulture, LCID and Culture. Set the
thread [UI]Culture before processing the request.
* System.Web.UI/PageParser.cs: read Culture, UICulture and LCID
attributes. Added properties for these. Partially contributed by
Mohammad Damt.
Fixes bug #51511.
svn path=/trunk/mcs/; revision=20633
* System.Web/HttpApplication.cs: added AssemblyLocation property.
* System.Web.UI/DesignTimeTemplateParser.cs: added FIXME related to
PageParser.
* System.Web.UI/PageParser.cs: initialize the parser in the constructor,
not just before compiling and reference the application assembly.
* System.Web.UI/SimpleWebHandlerParser.cs: reference the assembly that
contains the application Type.
* System.Web.UI/TemplateControl.cs:
* System.Web.UI/TemplateControlParser.cs: fix BenM #1 bug. Now we pass
correct virtual path and physical path when compiling a user control.
* System.Web.UI/TemplateParser.cs: new AddApplicationAssembly ().
* System.Web.UI/UserControlParser.cs: now we get valid values in the
ctor.
Referencing the application assembly fixes bug #49652.
svn path=/trunk/mcs/; revision=19299