Commit Graph
670 Commits
Author SHA1 Message Date
Marek Habersack 0459740493 [asp.net] Fix for bug #670874. Match request URLs against precompiled dictionary using absolute paths. 2011-03-17 01:50:35 +01:00
Marek Habersack b956f6dc78 [asp.net] Fix for bug #669048. Fix up virtual precompiled app virtual paths with the virtual root of the current app 2011-02-09 21:59:00 +01:00
Marek Habersack be07f04c62 [asp.net] Be more careful with errors collection when compilation fails. 2011-02-09 01:24:16 +01:00
Marek Habersack 4b084b4966 [asp.net] Global.asax assembly must be passed as reference when compiling. BuildManager.GetType improvements.
When user has their own global application class (global.asax is present) the assembly produced from it must
be passed as reference to the compiler.
BuildManager.GetType now supports fully-qualified type names for 'typeName' and searches for the type in the
top-level assemblies, the global.asax assembly and in the assemblies specified in as references in web.config.

All of this fixes certain MVC3+Razor applications.
2011-01-24 15:18:07 +01:00
Gonzalo Paniagua Javier a2ed4f6fc2 [System.Web] Razor works now (modulo DB) 2011-01-20 21:58:59 -05:00
Marek Habersack f4d9b0ef94 [asp.net] Avoid passing duplicate assemblies on mcs command line. 2011-01-20 14:31:20 +01:00
Marek Habersack 90f8bf7ffd [asp.net] Do not throw NREX when firstError is null in ErrorMessage getter 2011-01-20 14:31:20 +01:00
Marek Habersack 9926e923d7 [asp.net] Removed the /noconfig comment - it turns out this is what is supposed to be done 2011-01-18 09:40:23 +01:00
Marek Habersack d18d08622c [asp.net] Implemented BuildManager.GetObjectFactory
This method is not used by Mono internally but is called by MVC v3.
2011-01-17 14:47:07 +01:00
Marek Habersack c85558427d [asp.net] Pass /noconfig to mcs so that page builds succeed 2011-01-15 01:52:31 +01:00
Marek Habersack 355291ccc7 [asp.net] Use faster string comparison in caches in System.Web.Compilation 2010-11-03 20:35:51 +01:00
Marek Habersack 3639946555 [asp.net] Fix for bug #646810. Implemented FormsAuthentication.EnableFormsAUthentication + tests 2010-10-28 14:57:31 +02:00
Marek Habersack 30bbf985d2 [asp.net] Fix for bug #646984. Theme stylesheets must be output in correct order.
This patch changes the way we output theme stylesheets to match .NET behavior. Theme
.css files are sorted using an ordinal and case-insensitive comparer and are output
to the page at the top of the <head> element's contents instead of at the end.
2010-10-27 14:23:21 +02:00
Marek Safar aad016fd87 Clean up few more warnings 2010-10-15 15:20:25 +01:00
Kornél Pál 714812b6e5 [asp.net] Fix for bug #643763. BuildManager must not fail with BuildProviders lacking the BuildProviderAppliesTo attribute. 2010-10-08 08:41:39 +02:00
Marek Habersack ae23776616 [asp.net] Get rid of a possible (although unlikely) race condition when acquiring locks
The patch removes a small race condition where a boolean flag is set after acquiring a lock to
indicate to code executing in the finally {} block that it should release the lock. The boolean
variable is now removed and the lock is released unconditionally. It carries a potential to
throw an exception when the lock is not held, but it's better than to fail to release it and
lead the application to a deadlock.
2010-09-28 13:29:21 +02:00
Marek Habersack e5ec9150cb [asp.net] Fix for bug #633756. Children processed as properties must be instantiated before using.
When a server-side control processes its children (in the markup) as properties, it needs to instantiate
an object of the property type and assign it to the appropriate property of the control. Failing to do so
will cause markup which references properties to fail in certain cases (for instance when the control's
property type is a class and it is not instantiated by the control's constructor).
2010-08-24 01:02:47 +02:00
Marek Habersack 09babb5146 [asp.net] Fix for bug #628683. Do not ignore whitespace between <%: %> blocks 2010-08-09 16:03:41 +02:00
Marek Habersack 51e6b86309 [asp.net,4.0] Added support for setting default base types for various kinds of resources.
ASP.NET 4.0 allows one to set base types for Pages, User Controls, Application and PageParserFilter
from the pre-application start method(s). This commit implements support for this mechanism.

* ApplicationFileParser.cs: added override of DefaultBaseType property which checks whether
  PageParser.DefaultApplicationBaseType is set and, if yes, uses it to set application base type
  if there's no custom Global.asax
* PageParser.cs: implemented the EnableLongStringsAsResources, DefaultPageBaseType, DefaultApplicationBaseType,
  DefaultPageParserFilterType and DefaultUserControlBaseType properties.
* TemplateParser.cs: if PageParser.DefaultPageParserFilterType is set, use it as the default type to create instance
  of the page parser filter
* Added tests for the new properties.
* Added support in standalone runner for setting custom application domain data on domain creation, just before
  the test is ran.
2010-08-06 22:27:08 +02:00
Marek Habersack 8731e553a7 [asp.net,4.0] Added support for declarative per-user control output cache provider selection
This adds support for the ProviderName attribute of the OutputCache directive in user controls.
Also implemented missing support for SqlDependency attribute.

* TemplateControlCompiler.cs: StaticPartialCachingControl instantiation now uses the constructor overloads
  which accept sqlDependency (2.0+) and providerName (4.0+)
* UserControlCompiler.cs: added code to output PartialCachingAttribute which accepts sqlDependency (2.0+) and
  ProviderName (4.0+) arguments
* PartialCachingAttribute.cs added the 4.0 ProviderName property
* StaticPartialCachingControl.cs: implemented two missing constructors (one 2.0 and the other 4.0)
  Added a missing BuildCachedControl overload which accepts providerName (4.0)
* TemplateParser.cs: factored out OutputCache attribute processing to a separate internal virtual method.
* UserControlParser.cs: added support for the ProviderName attribute of the OutputCache directive.
2010-08-06 01:27:34 +02:00
Marek Habersack b0f59ebc86 [asp.net] implemented BaseTemplateParser.{GetReferencedType,GetUserControlType} methods
* BuildProvider.cs: factored out build provider type retrieval code to a separate method
* BuildProviderCollection.cs: factored out build provider type retrieval code to a separate method
* BuildManagerDirectoryBuilder.cs: system.web/compilation section is not an application section - it can
  be defined in web.config on any level.
2010-08-04 21:50:33 +02:00
Marek Habersack 0d77ff9eae 2010-07-16 Marek Habersack <[email protected]>
* FolderLevelBuildProviderAppliesTo.cs,
	FolderLevelBuildProviderAppliesToAttribute.cs: added

svn path=/trunk/mcs/; revision=160500
2010-07-16 17:40:53 +00:00
Marek Habersack d8838a6414 This commit introduces a few 4.0 rendering changes which break some tests. The broken tests
fail to work on .NET 4.0 as well, for the most part. I will fix them next week.

    2010-07-02  Marek Habersack  <[email protected]>

    	* TemplateControlParser.cs: added support for ClientIDMode
    	property

    	* Control.cs: implemented 4.0 features - ClientIDMode and
    	RenderingCompatibility.

    	* ClientIDMode.cs, IDataKeysControl.cs: added

    2010-07-02  Marek Habersack  <[email protected]>

    	* Menu.cs: 4.0 API updates.

    	* GridView.cs: implemented 4.0 properties -
    	SortedAscendingCellStyle, SortedAscendingHeaderStyle,
    	SortedDescendingCellStyle, SortedDescendingHeaderStyle,
    	ClientIDRowSuffix, ClientIDRowSuffixDataKeys, ShowHeaderWhenEmpty
    	along with associated rendering changes.

    	* DetailsView.cs, FormView.cs, GridView.cs: 4.0 API changes -
    	renamed ShowPage to SetPageIndex and made it public.
    	Added 4.0 interfaces to inheritance list and implemented them.

    	* DataKeyArray.cs: added internal constructor which accepts IList
    	instead of ArrayList. Changed the 'keys' field type to IList.

    	* ContainedTable.cs: the 'id' attribute must be rendered last.

    	* CheckBox.cs, CheckBoxList.cs, SiteMapPath.cs, Table.cs,
    	TableStyle.cs, TextBox.cs, WebControl.cs: 4.0 rendering changes.

    	* Calendar.cs, CompositeControl.cs, DropDownList.cs, HyperLink.cs,
    	Image.cs, ImageButton.cs, Label.cs, LinkButton.cs, LoginName.cs,
    	Panel.cs, Table.cs, TableCell.cs, TableRow.cs:
    	added new 4.0 property, SupportsDisabledAttribute.

    2010-07-02  Marek Habersack  <[email protected]>

    	* VersionConverter.cs: added support for checking whether the
    	passed version is equal or more than a specified minimal version.

    	* PagesSection.cs: added two 4.0 properties - ClientIDMode and
    	ControlRenderingCompatibilityVersion

    2010-07-02  Marek Habersack  <[email protected]>

    	* TemplateControlCompiler.cs: added support for ClientIDMode 4.0
    	property

    	* PageCompiler.cs, UserControlCompiler.cs: AddStatementsToInitTop
    	must call the base implementation.

svn path=/trunk/mcs/; revision=159826
2010-07-02 19:12:31 +00:00
Marek Habersack 7eedf1309c 2010-06-15 Marek Habersack <[email protected]>
* ResourceExpressionBuilder.cs: cast the return value of
	GetLocalResourceObject to appropriate type. Fixes bug #607766

	* TemplateControlCompiler.cs: made CreateConvertToCall internal
	static, so that it can be used from ResourceExpressionBuilder

svn path=/trunk/mcs/; revision=158909
2010-06-15 01:11:02 +00:00
Marek Habersack 96b54e28f0 2010-06-05 Marek Habersack <[email protected]>
* PageRouteHandler.cs: implemented

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

	* UrlRoutingModule.cs: 4.0 doesn't do the UrlRouting.axd magic, it
	simply remaps the current handler to the one obtained from the
	route.

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

	* TemplateControlCompiler.cs: expression evaluation results are
	wrapped in a Convert.ConvertTo* call or a typecast.

	* RouteValueExpressionBuilder.cs: implemented

	* RouteUrlExpressionBuilder.cs: added missing custom attributes

svn path=/trunk/mcs/; revision=158497
2010-06-04 22:47:30 +00:00
Marek Habersack 4bcb71eec8 WIP: page routing
svn path=/trunk/mcs/; revision=158496
2010-06-04 22:47:15 +00:00
Marek Habersack 0b08553dbc 2010-06-01 Marek Habersack <[email protected]>
* HtmlHead.cs: added code to render description and keywords metas
	if the corresponding HtmlMeta controls aren't found and the user
	set either Description or Keywords properties.

2010-06-01  Marek Habersack  <[email protected]>

	* TemplateControlCompiler.cs: added new virtual method,
	AddStatementsToInitMethodBottom and renamed
	AddStatementsToInitMethod to AddStatementsToInitMethodTop.

	* PageCompiler.cs: code to set Meta{Description,Keywords}
	properties, if present.

2010-06-01  Marek Habersack  <[email protected]>

	* PageParser.cs: added support for MetaDescription and
	MetaKeywords main directive attributes

	* Page.cs: implemented MetaDescription and MetaKeywords
	4.0 properties.

svn path=/trunk/mcs/; revision=158303
2010-06-01 22:01:28 +00:00
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 d410d4fe4a 2010-05-17 Marek Habersack <[email protected]>
* HttpApplicationFactory.cs: pre-application start methods must be
	called even before App_Code is compiled.

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

	* BuildProvider.cs: made the Extension property case-insensitive

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

	* BuildProvider.cs: implemented a 4.0 method RegisterBuildProvider

	* BuildManager.cs: separated dynamically registered assemblies
	store from the referenced assemblies cache.

svn path=/trunk/mcs/; revision=157435
2010-05-17 10:58:08 +00:00
Marek Habersack aac871a351 2010-05-16 Marek Habersack <[email protected]>
* BuildManager.cs: do not cache referenced assemblies until it's
	safe.

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

	* HttpApplicationFactory.cs: let BuildManager know when it's safe
	to cache referenced assemblies.

svn path=/trunk/mcs/; revision=157391
2010-05-16 01:55:10 +00:00
Marek Habersack fbbf51a5e4 2010-05-14 Marek Habersack <[email protected]>
* AssemblyInfo.cs: this assembly should be signed with winfx.pub

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

	* HttpResponse.cs: added internal Context property

	* HttpRequest.cs: added a setter to the internal Context property

	* HttpContext.cs: set request and response Context properties to
	'this' in the constructor.

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

	* Control.cs: implemented 4.0 GetRouteUrl overloads and
	GetUniqueIDRelativeTo

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

	* RouteValueExpressionBuilder.cs: added

	* RouteUrlExpressionBuilder.cs: implemented

svn path=/trunk/mcs/; revision=157378
2010-05-15 02:29:09 +00:00
Marek Habersack f70f49d3c3 Fixlet
svn path=/trunk/mcs/; revision=157284
2010-05-13 01:18:36 +00:00
Marek Habersack 20d0038bd1 commit e25cece56ee428a8ace8979e31ab2c0c077be4f5
Author: Marek Habersack <[email protected]>
Date:   Wed May 12 23:27:21 2010 +0200

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

    	* HttpApplicationFactory.cs: when initializing new application
    	type, make sure to call pre-application start methods.

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

    	* BuildManager.cs: implemented a 4.0 feature - pre-application
    	start methods.

svn path=/trunk/mcs/; revision=157266
2010-05-12 21:28:40 +00:00
Marek Habersack 71f8b16af6 2010-05-07 Marek Habersack <[email protected]>
* BuildManager.cs:
	Implemented 4.0 methods GetObjectFactory, GetCachedBuildDependencySet and properties
	BatchCompilationEnabled, TargetFramework

svn path=/trunk/mcs/; revision=156945
2010-05-07 23:04:51 +00:00
Marek Habersack fc9dca9970 2010-05-07 Marek Habersack <[email protected]>
* BuildManager.cs:
	Implemented 4.0 method AddReferencedAssembly.

svn path=/trunk/mcs/; revision=156944
2010-05-07 23:04:40 +00:00
Marek Habersack d6a7ab5426 2010-05-07 Marek Habersack <[email protected]>
* BuildManager.cs:
	Implemented 4.0 method GetGlobalAsaxType.

svn path=/trunk/mcs/; revision=156942
2010-05-07 23:04:20 +00:00
Marek Habersack 2d0ca9037e 2010-05-07 Marek Habersack <[email protected]>
* BuildManager.cs: implemented 4.0 methods {Create,Read}CacheFile.
	Fixed signature of the GetVirtualPathDependencies method.

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

	* BuildManagerCacheFiles.cs: added - tests for
	BuildManager.{Create,Read}CacheFile

svn path=/trunk/mcs/; revision=156941
2010-05-07 23:04:10 +00:00
Marek Habersack 3c944e50eb 2010-04-29 Marek Habersack <[email protected]>
* AppResourcesAssemblyBuilder.cs: when running on windows,
	SetAlPath must return al.exe path with a trailing space, or
	otherwise the process won't start. Fixes bug #600691

svn path=/trunk/mcs/; revision=156382
2010-04-29 00:33:44 +00:00
Marek Habersack 3f81315ae9 2010-04-12 Marek Habersack <[email protected]>
* PageCompiler.cs: if EnableViewStateMac is set in the page
	source, generate relevant code.

2010-04-12  Marek Habersack  <[email protected]>

	* PageParser.cs: if EnableViewStateMac option is present in the
	directive, remember it for later use by the compiler.

	* Page.cs: initialize EnableViewStateMac with the default read
	from the config.

svn path=/trunk/mcs/; revision=155262
2010-04-12 19:37:54 +00:00
Gonzalo Paniagua Javier c4b08a1fc0 undo
svn path=/trunk/mcs/; revision=154498
2010-03-30 21:22:16 +00:00
Gonzalo Paniagua Javier 4ac0c2f561 2010-03-30 Gonzalo Paniagua Javier <[email protected]>
* System.Web.UI/PageParser.cs:
	* System.Web.UI/Page.cs:
	* System.Web.Compilation/PageCompiler.cs: default for
	EnableViewStateMac is true. Allow setting it from a @Page
	directive.


svn path=/trunk/mcs/; revision=154493
2010-03-30 21:00:21 +00:00
Marek Habersack 4828e79cbd 2010-03-17 Marek Habersack <[email protected]>
* AspGenerator.cs, AspParser.cs, TemplateControlCompiler.cs, TagType.cs, CodeRenderBuilder.cs: implemented the new <%: %> 4.0 html-encoded code render expression.

svn path=/trunk/mcs/; revision=153793
2010-03-17 22:35:23 +00:00
Marek Habersack ea68682bed oops
svn path=/trunk/mcs/; revision=153211
2010-03-06 22:47:44 +00:00
Marek Habersack 2e5d3c0fb4 2010-03-06 Marek Habersack <[email protected]>
* TemplateControlCompiler.cs: AssignPropertyForResources localizes
	a property even if the Localized attribute is absent. If the
	attribute is present, it checks its IsLocalizable property to
	decide if localization should be performed. Fixes bug #585933

svn path=/trunk/mcs/; revision=153164
2010-03-06 00:28:52 +00:00
Marek Habersack e105f08673 2010-03-04 Marek Habersack <[email protected]>
* BuildManager.cs: do less work in the static constructor

2010-03-04  Marek Habersack  <[email protected]>

	* RuntimeHelpers.cs: added. Contains methods moved here from
	HttpRuntime, so that initialization sequence of various objects is
	independent of HttpRuntime.

2010-03-04  Marek Habersack  <[email protected]>

	* HttpRuntime.cs: do less work in the static constructor. Most of
	the code was moved to System.Web.Util.RuntimeHelpers. Properties
	which have been moved: MonoVersion, RunningOnWindows,
	CaseInsensitive, IsDebuggingEnabled

Also:
	- hushed some compiler warnings
	- various classes now use RuntimeHelpers instead of HttpRuntime

svn path=/trunk/mcs/; revision=153038
2010-03-04 19:04:13 +00:00
Marek Habersack 07adce6380 2010-02-27 Marek Habersack <[email protected]>
* HttpRuntime.cs: added internal property DomainUnloading.

	* HttpApplication.cs: when app domain is unloading, catch
	ThreadAbortExceptions and reset the abort.

2010-02-27  Marek Habersack  <[email protected]>

	* BuildManager.cs: count only builds of updated files before
	unloading the app domain. Fixes bug #581459

svn path=/trunk/mcs/; revision=152600
2010-02-27 02:57:44 +00:00
Marek Habersack 2cf5d1a507 2010-02-19 Marek Habersack <[email protected]>
* TemplateControlCompiler.cs: GetConverterForMember now completely
	relies on TypeDescriptor and description providers to retrieve
	converter for a property. Fixes bug #578586
	If UrlPropertyAttribute is found for a member,
	GetExpressionFromString uses the preconverted value, if any, as
	parameter to HandleUrlProperty.

svn path=/trunk/mcs/; revision=152040
2010-02-19 01:51:06 +00:00
Marek Habersack c4a76e1dd9 2010-02-11 Marek Habersack <[email protected]>
* AppResourcesCompiler.cs: explicitly dispose all the streams and
	readers+writers in CompileResource.

2010-02-11  Marek Habersack  <[email protected]>

	* Web.config, Web.mono.config: added test role manager
	definition.

2010-02-11  Marek Habersack  <[email protected]>

	* RolesTest.cs: added a test for IsUserInRole. Patch from Tiaan
	Geldenhuys <[email protected]>, thanks!

2010-02-11  Marek Habersack  <[email protected]>

	* Roles.cs: IsUserInRole checks if username is null or empty
	before attempting to use it. Patch from Tiaan Geldenhuys
	<[email protected]>. thanks!

2010-02-11  Marek Habersack  <[email protected]>

	* System.Web_test.dll.sources: added
	mainsoft/NunitWeb/NunitWeb/TestRoleProvider.cs

2010-02-11  Marek Habersack  <[email protected]>

	* WebTest.cs: test environment setup enhancements. Contributed by
	Tiaan Geldenhuys <[email protected]>, thanks!

	* TestRoleProvider.cs: added. Contributed by Tiaan Geldenhuys
	<[email protected]>, thanks!

svn path=/trunk/mcs/; revision=151519
2010-02-11 14:15:55 +00:00
Marek Habersack f8064df3a7 2010-02-04 Marek Habersack <[email protected]>
* PreservationFile.cs: updated the BuildResulTypeCode enum

	* BuildManager.cs: LoadCompiled now adds all the assemblies built
	from the App_Code directory to the BuildManager.CodeAssemblies
	collection. Fixes bug #576810

svn path=/trunk/mcs/; revision=150802
2010-02-04 01:01:18 +00:00
Marek Habersack d08769539a 2010-01-19 Marek Habersack <[email protected]>
* Makefile (TEST_RESOURCE_FILES): added
	Test/mainsoft/NunitWebResources/App_GlobalResources/Resource1.resx
	and
	Test/mainsoft/NunitWebResources/TagWithExpressionWithinAttribute.aspx

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

	* TemplateControlCompilerTest.cs: added test for bug #568631

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

	* AspGenerator.cs: modified the runatServer regex to correctly
	match embedded server tags which end in a sequence like: "%>"/>
	Fixes bug #568631

svn path=/trunk/mcs/; revision=149855
2010-01-19 22:36:10 +00:00