26 Commits
Author SHA1 Message Date
Marek Habersack 5411dd0e2a 2010-05-19 Marek Habersack <[email protected]>
* PageParser.cs: handle several main directive attributes
    	specially, as they can have expressions as their values. Fixes bug
    	#603532

    	* MainDirectiveAttribute.cs: added - helper class to handle
    	directive attributes which can take either a value or an
    	expression.

    	* BaseParser.cs: IsDirective, IsExpression and IsDataBound methods
    	moved to here from TemplateControlCompiler.

    2010-05-19  Marek Habersack  <[email protected]>

    	* TemplateControlCompiler.cs: IsDirective, IsExpression and
    	IsDataBound methods moved to System.Web.UI.BaseParser.
    	Made CompileExpression and GetFieldOrProperty methods internal.

    	* PageCompiler.cs: check several of the Page directive attributes
    	for expressions. Fixes bug #603532

    	* AspGenerator.cs, TagAttributes.cs: use IDictionary instead of
    	Hashtable

svn path=/trunk/mcs/; revision=157519
2010-05-19 01:28:09 +00:00
Marek Habersack 5e9719f57c Gotten rid of NET_2_0 ifdefs and 1.1 code from System.Web.UI
svn path=/trunk/mcs/; revision=149929
2010-01-20 21:21:01 +00:00
Marek Habersack 8b4e17d0d2 2009-11-10 Marek Habersack <[email protected]>
* TemplateParser.cs: AddImports is called from LoadConfigDefaults
	so that it reads configuration from the correct .config file (it
	needs to be called after this.VirtualPath has been
	initialized). Fixes an issue with MVC apps which put configuration
	in Views/web.config etc. Fixes bug #552457

	* ControlBuilder.cs, Page.cs: system.web/pages section is not
	confined to the top-level web.config

2009-11-10  Marek Habersack  <[email protected]>

	* WebConfigurationManager.cs: path passed to OpenWebConfiguration
	from GetSection does not come from FindWebConfig.

2009-11-10  Marek Habersack  <[email protected]>

	* BaseCompiler.cs: parser.Imports is a Dictionary <>/Hashtable
	now.

	* AspComponentFoundry.cs: system.web/pages section is not confined
	to the top-level web.config

svn path=/trunk/mcs/; revision=145831
2009-11-10 13:49:01 +00:00
Marek Habersack 5c59801fff Performance improvements:
- made sure invariant culture is used with String.ToLower, String.ToUpper and String.Compare
- replaced all calls to CultureInfo.InvariantCulture with a reference to a static field System.Web.Util.Helpers.InvariantCulture

svn path=/trunk/mcs/; revision=143587
2009-10-07 00:10:03 +00:00
Marek Habersack 1c50013daa 2009-04-21 Marek Habersack <[email protected]>
* SimpleWebHandlerParser.cs: retrieve CompilationSection from the
	appropriate web.config file.

	* BaseParser.cs: moved the internal property VirtualPath from
	TemplateParser to here and added an internal method
	GetConfigSection to retrieve sections from the correct web.config
	file on 2.0 applications. Fixes bug #494245

	* PageParser.cs: use the new GetConfigSection method to retrieve
	ClientTargetSection.

	* TemplateParser.cs: moved the VirtualPath property to
	BaseParser.
	PagesConfig now uses the new GetConfigSection method. Fixes bug
	#494245

svn path=/trunk/mcs/; revision=132300
2009-04-21 17:54:02 +00:00
Gonzalo Paniagua Javier 871da8a251 2009-02-28 Gonzalo Paniagua Javier <[email protected]>
* BaseParser.cs:
	* PageParser.cs:
	* ControlBuilder.cs:
	* TemplateParser.cs:
	* Page.cs:
	* SimpleWebHandlerParser.cs: settings that have to be in
	machine.config or the root level web.config now call
	GetWebApplicationSection.



svn path=/trunk/mcs/; revision=128273
2009-02-28 20:04:36 +00:00
Marek Habersack 45cccd09d5 2009-01-09 Marek Habersack <[email protected]>
* BaseParser.cs, PageParser.cs, UserControlParser.cs: use
	VirtualPathUtility.GetDirectory instead of UrlUtils.GetDirectory.

svn path=/trunk/mcs/; revision=122893
2009-01-09 14:41:30 +00:00
Marek Habersack d0135f374d 2008-12-10 Marek Habersack <[email protected]>
* 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
2008-12-10 02:03:35 +00:00
Marek Habersack 4b8b453f42 2007-03-21 Marek Habersack <[email protected]>
* TemplateControlCompiler.cs: added support for setting custom
	attributes of a base class from the Page or Control directive
	attributes.

2007-03-21  Marek Habersack  <[email protected]>

	* UnknownAttributeDescriptor.cs: an internal helper class for
	custom directive attributes support.

	* BaseParser.cs: ThrowParseException can now take variadic
	parameters, for convenience.

	* TemplateParser.cs: add support for custom attributes for the
	Page and Control directives.

2007-03-21  Marek Habersack  <[email protected]>

	* System.Web.dll.sources: added UnknownAttributeDescriptor.cs


svn path=/trunk/mcs/; revision=74734
2007-03-21 14:09:18 +00:00
Marek Habersack 988df7eff0 2007-03-18 Marek Habersack <[email protected]>
* UrlUtils.cs: GetDirectory always returns a path with trailing
	slash.

2007-03-18  Marek Habersack  <[email protected]>

	* WebConfigurationSettings.cs: fix the GetConfigFromFileName
	directory logic.

2007-03-18  Marek Habersack  <[email protected]>

	* BaseParser.cs: fix BaseVirtualDir to always return app-absolute
	paths.

svn path=/trunk/mcs/; revision=74574
2007-03-18 22:12:53 +00:00
Chris Toshok 6550ae7c10 2006-02-01 Chris Toshok <[email protected]>
* TemplateParser.cs: CONFIGURATION_2_0 => NET_2_0, and replace
	calls to GetWebApplicationSection with GetSection.

	* SimpleWebHandlerParser.cs: same.

	* Page.cs: same.

	* PageParser.cs: same.

	* BaseParser.cs: same.


svn path=/trunk/mcs/; revision=56415
2006-02-01 20:00:39 +00:00
Chris Toshok 2b27715958 2006-01-04 Chris Toshok <[email protected]>
* SimpleWebHandlerParser.cs: Remove the declaration of
	compilationConfig in the CONFIGURATION_2_0 case.  it's
	unnecessary.
	(.ctor): ifdef out the AddAssembliesInBin call in the
	CONFIGURATION_2_0 case.  need to revisit this.
	(CompilationConfig): add a CONFIGURATION_2_0 version.

	* BaseParser.cs: Remove the declaration of compilationConfig in
	the CONFIGURATION_2_0 case.  it's unnecessary.


svn path=/trunk/mcs/; revision=55045
2006-01-04 07:15:30 +00:00
Chris Toshok 2fd12039bd 2005-11-28 Chris Toshok <[email protected]>
* 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
2005-11-28 20:54:41 +00:00
Sebastien Pouliot c1cc7616df 2005-09-14 Sebastien Pouliot <[email protected]>
* AttributeCollection.cs: Added LinkDemand for AspNetHostingPermission
	with Minimal level.
	* BaseParser.cs: Added LinkDemand and InheritanceDemand for 
	AspNetHostingPermission with Minimal level.
	* BasePartialCachingControl.cs: Added LinkDemand and InheritanceDemand
	for AspNetHostingPermission with Minimal level.
	* CompiledTemplateBuilder.cs: Added LinkDemand for 
	AspNetHostingPermission with Minimal level.
	* ConstructorNeedsTagAttribute.cs: Added LinkDemand for 
	AspNetHostingPermission with Minimal level.
	* ControlBuilderAttribute.cs: Added LinkDemand for 
	AspNetHostingPermission with Minimal level. Simplified Equals and 
	IsDefaultAttribute.
	* ControlBuilder.cs: Added LinkDemand and InheritanceDemand for 
	AspNetHostingPermission with Minimal level.
	* ControlCachePolicy.cs: Hided ctor and removed SupportsCaching setter
	* ControlCollection.cs: Added LinkDemand and InheritanceDemand for 
	AspNetHostingPermission with Minimal level. Fixed possible stack 
	overflow in Add* methods. Fixed CopyTo as we're not allocating the 
	array based on the number of items.
	* Control.cs: Added LinkDemand and InheritanceDemand for 
	AspNetHostingPermission with Minimal level. Fixed 2.0 signatures.
	* CssStyleCollection.cs: Added LinkDemand for AspNetHostingPermission 
	with Minimal level.
	* IStyleSheet.cs: Fixed parameter orders (2.0).


svn path=/trunk/mcs/; revision=50041
2005-09-14 17:25:07 +00:00
Ben Maurer 0e8decdb37 remove svn:executable from .cs files
svn path=/trunk/mcs/; revision=46562
2005-06-27 15:51:40 +00:00
Duncan Mak d1c09fcc67 Add licensing info
svn path=/trunk/mcs/; revision=30345
2004-06-24 20:59:43 +00:00
Gonzalo Paniagua Javier 50e79aceb8 2003-10-14 Gonzalo Paniagua Javier <[email protected]>
* System.Web.dll.sources: new files in System.Web.Configuration.

	* System.Web.Configuration/CompilationConfiguration.cs:
	* System.Web.Configuration/CompilationConfigurationHandler.cs:
	* System.Web.Configuration/CompilerCollection.cs:
	* System.Web.Configuration/WebCompiler.cs: new files that process and
	store system.web/compilation info (compilers + assemblies).

	* System.Web.Configuration/HttpHandlersSectionHandler.cs: added option
	for an attribute to be empty.

	* System.Web.UI/BaseParser.cs: added CompilationConfig property.

	* System.Web.UI/TemplateParser.cs:
	* System.Web.UI/SimpleWebHandlerParser.cs: added CompilationConfig
	property. Don't hardcode assembly names any more, assemblies in bin
	are added depending on the configuration. The default language is
	also taken from the configuration.

	* System.Web.Compilation/BaseCompiler.cs: now gets the CodeCompiler
	from configuration files.

	In short, this changes make our ASP.NET support any language
	that has CodeDom CodeCompiler and CodeGenerator.

	VB.NET currently fails because of its buggy handling of options.

svn path=/trunk/mcs/; revision=19035
2003-10-14 11:12:47 +00:00
Gonzalo Paniagua Javier 4668e31142 2003-08-20 Gonzalo Paniagua Javier <[email protected]>
* ControlCollection.cs:
	* EmptyControlCollection.cs: create a minimum ArrayList for this.

	* BaseParser.cs: added setter for BaseVirtualDir.

	* Page.cs: fixed message when restoring view state fails.
	* UserControlParser.cs: set the BaseVirtualDirectory to handle the case
	when a relative path to the control is given. Fixes bug #47685.

svn path=/trunk/mcs/; revision=17424
2003-08-20 01:24:43 +00:00
Gonzalo Paniagua Javier bdb911a7f2 2003-05-14 Gonzalo Paniagua Javier <[email protected]>
* System.Web.UI/BaseParser.cs: fixed MapPath for non-rooted files.
	* System.Web.UI/PageParser.cs: don't pass a non-virtual file around.
	* System.Web.UI/TemplateControlParser.cs: InputFile uses MapPath now.
	Take care of the exception teh may be throw by MapPath on an invalid
	path.

	* System.Web.UI/TemplateParser.cs: removed unused method.
	* System.Web.UI/UserControlParser.cs: modified inputfile. The result is
	the same, but this one is better.
	* System.Web.Util/UrlUtils.cs: fixed Combine and reworked Reduce.

svn path=/trunk/mcs/; revision=14566
2003-05-14 09:07:11 +00:00
Gonzalo Paniagua Javier a3e7d18173 2003-05-01 Gonzalo Paniagua Javier <[email protected]>
* System.Web/HtmlizedException.cs: added more virtual methods.

	* System.Web/HttpException.cs:  some work on the output when there's
	a source file present.

	* System.Web.Compilation/AspGenerator.cs: copy the location before
	setting the value for the control builders.

	* System.Web.Compilation/BaseCompiler.cs: changed parameters for
	CompilationException.

	* System.Web.Compilation/CompilationException.cs: it takes now line
	numbers and error descriptions from the CompilerErrorCollection.

	* System.Web.Compilation/Location.cs: used when a copy of an ILocation
	is needed.

	* System.Web.Compilation/ParseException.cs: implemented new methods
	to provide line numbers and souce file.

	* System.Web.Compilation/TemplateControlCompiler.cs: throw a
	ParseException where appropiate.

	* System.Web.UI/BaseParser.cs: Location property is now here. Added a
	couple of convenience methods to throw a ParseException.

	* System.Web.UI/TemplateParser.cs:
	* System.Web.UI/TemplateControlParser.cs:
	* System.Web.UI/PageParser.cs: throw ParseException where appropiate.

svn path=/trunk/mcs/; revision=14191
2003-05-01 19:34:32 +00:00
Gonzalo Paniagua Javier 201982bea9 2003-04-30 Gonzalo Paniagua Javier <[email protected]>
* System.Web.Compilation/TemplateControlCompiler.cs: correctly set
	the TemplateSourceDirectory value.

	* System.Web.UI/ApplicationFileParser.cs: store the Context and
	override BaseVirtualDir so that it's the application path.

	* System.Web.UI/BaseParser.cs: removed CurrentVirtualPath property.

	* System.Web.UI/TemplateControlParser.cs: use BaseVirtualDir.

	* System.Web.UI/UserControlParser.cs: removed CurrentVirtualPath.

svn path=/trunk/mcs/; revision=14168
2003-04-30 20:07:26 +00:00
Gonzalo Paniagua Javier a0a0d602bc 2003-04-30 Gonzalo Paniagua Javier <[email protected]>
* ApplicationFileParser.cs: it works now. Prior to these changes, we
	were using the compiler directly.

	* BaseParser.cs: added some useful properties and methods.

	* CodeBuilder.cs: use ILocation.
	* CodeRenderBuilder.cs: use ILocation.
	* CollectionBuilder.cs: use the RootBuilder to map tag names into Types.

	* ControlBuilder.cs: made it useful.

	* DataBindingBuilder.cs: the control type for data bound text is
	DataBoundLiteralControl now.

	* ObjectTagBuilder.cs: store some object tag attributes.

	* PageParser.cs: handle page-only directives.

	* RootBuilder.cs: bah.
	* SimpleWebHandlerParser.cs: made it dummy.
	* TemplateControl.cs: Modified file.

	* TemplateControlParser.cs: handle directives that are common to pages
	and user controls.

	* TemplateParser.cs: utility methods and handling of directives that
	are common to app, page and user controls.

	* UserControl.cs: added ControlBuilderAttribute.

	* UserControlControlBuilder.cs: builder for user controls.
	* UserControlParser.cs: use the new interfaces.

svn path=/trunk/mcs/; revision=14142
2003-04-30 05:02:54 +00:00
Gonzalo Paniagua Javier 8e35e3a7b9 2002-12-20 Gonzalo Paniagua Javier <[email protected]>
* System.Web/HttpCookie.cs: send 'expires' in the header.
	* System.Web.Security/FormsAuthenticationModule.cs: remove debug lines.
	* System.Web.UI/BaseParser.cs: a couple of path fixes to make it work
	when the page is not in the root directory.
	* System.Web.Util/UrlUtils.cs: fixed IsRelativeUrl and IsRootUrl.

svn path=/trunk/mcs/; revision=9797
2002-12-20 13:49:48 +00:00
Gonzalo Paniagua Javier 8e91ed0203 2002-12-18 Gonzalo Paniagua Javier <[email protected]>
* System.Web/HttpApplicationFactory.cs: add the context as parameter
	when building the application Type.

	* System.Web/HttpCookie.cs: new internal constructor.
	* System.Web/HttpCookieCollection.cs: new internal method to make a
	cookie expire.

	* System.Web/HttpRequest.cs: MapPath fixes.
	* System.Web/HttpResponse.cs: implemented ApplyAppPathModifier.
	* System.Web/HttpRuntime.cs: fixed typo in AppDomainAppVirtualPath.
	* System.Web.Compilation/AspGenerator.cs: now it uses the current
	HttpContext when creating user controls. TemplateSourceDirectory is no
	longer a dummy value.

	* System.Web.Compilation/GlobalAsaxCompiler.cs:
	* System.Web.Compilation/PageCompiler.cs:
	* System.Web.Compilation/UserControlCompiler.cs: set the context which
	will be used to locate the files.

	* System.Web.UI/BaseParser.cs: use MapPath and context to locate files.
	* System.Web.UI/Control.cs: implemented MapPathSecure.
	* System.Web.UI/TemplateControl.cs: use UrlUtils to generate the path.
	* System.Web.UI/TemplateControlParser.cs: use the context and MapPath.
	* System.Web.UI/UserControl.cs: implemented MapPath.
	* System.Web.UI/UserControlParser.cs: added context parameter to
	constructor.
	* System.Web.Util/PathUtil.cs: removed.
	* System.Web.Util/UrlUtils.cs: fixed Combine to handle '~'.

svn path=/trunk/mcs/; revision=9737
2002-12-18 02:17:17 +00:00
Gonzalo Paniagua Javier 922dfc4b3d 2002-08-16 Gonzalo Paniagua Javier <[email protected]>
* System.Web.Compilation/AspElements.cs:
	* System.Web.Compilation/AspParser.cs:
	* System.Web.Compilation/AspTokenizer.cs:
	* System.Web.Compilation/ChangeLog:
	* System.Web.Compilation/PageCompiler.cs:
	* System.Web.Compilation/TemplateFactory.cs:
	* System.Web.UI/ApplicationFileParser.cs:
	* System.Web.UI/BaseParser.cs:
	* System.Web.UI/PageParser.cs:
	* System.Web.UI/TemplateControl.cs:
	* System.Web.UI/TemplateControlParser.cs:
	* System.Web.UI/TemplateParser.cs: first steps to move xsp into
	System.Web.

svn path=/trunk/mcs/; revision=6668
2002-08-16 05:36:06 +00:00
Duncan Mak b3976280ad 2002-05-17 Duncan Mak <[email protected]>
* System.Web.build: Added new arguments: "/noconfig",
	"/r:System.Drawing.dll" and "/r:System.Xml.dll".

	* AttributeCollection.cs:
	* ControlCollection.cs:
	* CssStyleCollection.cs:
	* DataBindingCollection.cs:
	* EmptyControlCollection.cs: Added missing Collection classes.

	* BaseParser.cs:
	* TemplateParser.cs:  Implemented. BaseParser is weird because
	there is no documentation on what it does.

	* ControlBuilder.cs:

	* DataBinder.cs:
	* DataBinding.cs: Added.

	* DataBoundLiteralControl.cs:
	* Triplet.cs: Added.

	* RenderMethod.cs: Added this delegate for Control.cs

svn path=/trunk/mcs/; revision=4726
2002-05-17 20:54:14 +00:00