Commit Graph
72 Commits
Author SHA1 Message Date
Andres G. Aragoneses 96bbdc60bf [WebConfigurationManager] Fix memleak by using a LruCache (BXC#5598)
System.Web.ConfigurationManager had a cache which didn't have any max limit,
therefore when using Restful URIs in ASP.NET (like having some variable
parameter in the virtual path, i.e. /user/{userId}/tracks, where {userId}
is a variable Integer) this was very likely to cause a leak which would
end up causing troubles, like an InvalidCastException thrown by
HttpApplication::PreStart()

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=5598
2013-04-23 16:36:42 +01:00
Martin 231819c3b2 Completes commit https://github.com/QuickJack/mono/commit/1daeb920c64e47b4671e6ce4ea8c83158e6e7e6e 2012-02-14 16:46:13 +01:00
Martin 1daeb920c6 Implements Grendello's suggestions to WebConfigurationManager class 2012-02-14 16:42:50 +01:00
Martin 821a558b5d Fixes a bug in WebConfigurationManager
Following is a step by step guide to create a testing project:

(1) Create an ASP.NET project in MonoDevelop
(2) Create a folder "base"
(3) Create two subfolders called "sub1" and "sub2" inside of "base"
(4) Create a web.config file in both sub folders "sub1" and "sub2" and enter the following code:

<configuration>
  	<appSettings>
		<add key="myText" value="src=sub1"/>
	</appSettings>
</configuration>

Set the "value=" element to the appropriate value of the corresponding sub folder.

(5) Enter the following code in Default.aspx.cs
public void Page_Load(object sender, EventArgs args)
{
	//c2.ConfigPath contains wrong path
	Configuration c1 = WebConfigurationManager.OpenWebConfiguration("~/base/sub1");
	Configuration c2 = WebConfigurationManager.OpenWebConfiguration("~/base/sub2");
			
	//myText_sub2 refers to the wrong AppSettings entry
	KeyValueConfigurationElement myText_sub1 = (KeyValueConfigurationElement)c1.AppSettings.Settings["myText"];
	KeyValueConfigurationElement myText_sub2 = (KeyValueConfigurationElement)c2.AppSettings.Settings["myText"];
}
2012-01-18 10:50:23 +01:00
Marek Habersack 7244e38c9f [asp.net] HttpRuntime.AppDomainAppPath may be null during tests, check it before using. 2010-10-26 02:00:21 +02:00
Marek Habersack 4662d97427 [asp.net] Better handling of application's AppDomain restart
* HttpRuntime.cs: disable filesystem watchers on appdomain shutdown and refuse to process
  requests while the current AppDomain is unloading
* HttpApplicationFactory.cs: if the current AppDomain is unloading, ignore FileSystemWatcher
  notifications
* WebConfigurationManager.cs: work around a deadlock issue when entering a ReaderWriterLockSlim
  upgradeable read lock very early during ASP.NET runtime/AppDomain initialization. Every few runs
  the attempt would lock up and since adding a section to cache is not a critical operation we can
  afford timing the lock out in this case. The lockup is probably due to the fact that RWLS is using
  thread local storage to store the current thread's lock status and it may happen that the TLS is
  not cleared during thread object finalization (see metadata/threads.c, the start_wrapper function)
2010-10-25 13:25: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 4f20ce19f2 [asp.net] Partial fix for bug #575600. Support opening another app configuration.
WebConfigurationHost now supports one more parameter passed to it in InitForConfiguration -
a boolean telling whether the configuration being initialized belongs to another app. If it is
true then the virtual path passed to InitForConfiguration is used as the application virtual
path. This has the effect that IsDefinitionAllowed doesn't throw an exception when a configuration
element with the MachineToApplication level is parsed.
WebConfigurationManager.FindWebConfig checks whether the path passed to it belongs to this application
which allows the mechanism described in the first paragraph to work.
2010-08-11 22:23:49 +02:00
Marek Habersack 61163ca5e2 2010-04-09 Marek Habersack <[email protected]>
* WebConfigurationManager.cs: GetSection properly processes paths
	of form '~'. Fixes bug #595140. Patch from Adriaan van Kekem
	<[email protected]>, thanks!

svn path=/trunk/mcs/; revision=155140
2010-04-09 13:01:51 +00:00
Marek Habersack c6c642eec3 commit 9405fa168b1255c51bb31ef17511c05593b08caa
Author: Marek Habersack <[email protected]>
Date:   Sat Mar 6 03:37:53 2010 +0100

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

    	* CompilerCollection.cs: in the 4.0 profile, the latest C#
    	standard is the compiler's default.

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

    	* CSharpCodeCompiler.cs: in the 4.0 profile, the latest C#
    	standard is the default one.

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

    	* RequestValidatorTestGenerated.cs: added

    	* RequestValidator.cs: added

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

    	* TestWorkerRequest.cs: added overloads of GetRawUrl and
    	GetUriPath which make sure that the returned paths do not contain
    	more than one leading / character.

    	* TestRunItem.cs: added new TestRunData property - to contain
    	per-appdomain test run data.

    	* TestCallback.cs: added a TestRunItem parameter.

    	* StandaloneTest.cs: runner object is created for each test item
    	now.
    	Added test progress feedback.

    	* ITestRunner.cs: added two properties, TestRunData - to return
    	collected test result data, if any, and Domain which returns the
    	current AppDomain.

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

    	* RequestValidatorTest.cs: added

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

    	* HttpRequest.cs: cache RawUrl value.
    	Added new internal property, PathNoValidation, which returns
    	request path without validating it.
    	Implemented 4.0 extensible validation.

    	* HttpApplication.cs: Pipeline () validates the request path, if
    	new validation mode is enabled, before doing anything else.
    	Added a generic LoadType overload which checks whether the loaded
    	type, if any, derives from the type specified in the method's
    	specialization.

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

    	* RequestValidator.cs: added

    	* RequestValidationSource.cs: added

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

    	* WebConfigurationManager.cs: do not use Request.Path - it may
    	fail because of invalid web.config file, use
    	Request.PathNoValidation instead.

    	* VersionConverter.cs: added

    	* PropertyHelper.cs: added a Version converter helper.

    	* HttpRuntimeSection.cs: added 4.0 properties -
    	RequestPathInvalidCharacters, RequestValidationType and
    	RequestValidationMode.

svn path=/trunk/mcs/; revision=153172
2010-03-06 02:48:31 +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 692b3e376b 2010-01-09 Marek Habersack <[email protected]>
* WebConfigurationManager.cs: GetSection properly handles looking
	up and caching of <location> instances. Part of fix for bug
	#568441

	* WebConfigurationHost.cs: GetConfigPathFromLocationSubPath
	calculatesthe path relative to the current config file path. Part
	of fix for bug #568441

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

	* VirtualPathUtility.cs: small optimizations for GetDirectory

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

	* ConfigurationLocation.cs: trailing / characters are removed from
	the path.

	* Configuration.cs: instances created for locations inherit
	ConfigPath from their containing document.
	Host.GetConfigPathFromLocationSubPath must be called with current
	instance's configPath, not LocationConfigPath.
	Locations are sought for using paths relative to the current
	instance's configPath, not to the root path.
	All of the above is part of fix for bug #568441

svn path=/trunk/mcs/; revision=149262
2010-01-09 00:29:25 +00:00
Marek Habersack 03adaee01b 2009-11-19 Marek Habersack <[email protected]>
* WebConfigurationManager.cs: use an rw lock to protect access to
	sectionCache. This is now necessary as the save handler clears the
	cache.

svn path=/trunk/mcs/; revision=146525
2009-11-19 12:19:53 +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 b01f70a32c 2009-11-09 Marek Habersack <[email protected]>
* WebConfigurationManager.cs: there's no need to cache sections by
	_file_ path - using section name and web.config path is more than
	enough and it reduces the number of cache entries
	considerably. Fixes bug #550730

svn path=/trunk/mcs/; revision=145721
2009-11-09 11:46:39 +00:00
Marek Habersack 0ab0646601 2009-10-07 Marek Habersack <[email protected]>
* WebConfigurationManager.cs: GetSection doesn't perform string +
	char + string concatenation to generate section cache key (by
	Gonzalo Paniagua Javier) which gives an enormous performance boost
	(processing time for mojoportal's default.aspx went down from
	2.65s to 107ms on average). The key generation is performed
	without any kind of string operation right now (except for
	GetHashCode on 3 strings).
	GetSectionCacheKey is called only once and sectionCache became a
	dictionary.

svn path=/trunk/mcs/; revision=143611
2009-10-07 10:48:59 +00:00
Marek Habersack 6163d748f1 2009-08-20 Marek Habersack <[email protected]>
* WebConfigurationManager.cs: GetSection does not use
	FindWebConfig to get the virtual path to open configuration for -
	doing so would make the configuration system ignore <location>
	sections. Fixes bug #482181

svn path=/trunk/mcs/; revision=140375
2009-08-20 21:07:20 +00:00
Gonzalo Paniagua Javier 9fcc125dd2 location,location,location. Fixes all the tests I broke last night
svn path=/trunk/mcs/; revision=138529
2009-07-23 11:53:26 +00:00
Gonzalo Paniagua Javier f7a0e3a47d 2009-07-23 Gonzalo Paniagua Javier <[email protected]>
* WebConfigurationManager.cs: avoid possible infinite loop when the
	path starts with ~ and 1 file check.


svn path=/trunk/mcs/; revision=138495
2009-07-23 05:01:23 +00:00
Marek Habersack 4a2ae0bb4f 2009-07-15 Marek Habersack <[email protected]>
* WebConfigurationManager.cs: another approach to suppressing
	application reloads after the app writes to its root web.config
	file. Leaving the previous code in place to get more
	protection. It's a kludge, but it's the best option to avoid
	all the races caused by System.Configuration+FileSystemWatcher
	without rewriting large parts of System.Configuration (and
	System.Web.Configuration). Fixes bug #522017

2009-07-15  Marek Habersack  <[email protected]>

	* Configuration.cs: explicitly flush the stream when writing XML
	data. Part of fix for bug #522017

2009-07-15  Marek Habersack  <[email protected]>

	* HttpApplicationFactory.cs: added internal methods to
	enable/disable specific watchers. Part of fix for bug #522017

svn path=/trunk/mcs/; revision=137951
2009-07-15 13:22:33 +00:00
Marek Habersack 01916d259e 2009-07-14 Marek Habersack <[email protected]>
* WebConfigurationManager.cs: added support for suppressing
	application reload when the main config file is written to from
	application.

	* WebConfigurationHost.cs: added minimal implementation of
	WriteCompleted, which checks if there's need to suppress
	application reload.

2009-07-14  Marek Habersack  <[email protected]>

	* ConfigurationSaveEventArgs.cs, ConfigurationSaveEventHandler.cs:
	added

	* Configuration.cs: added two internal events - SaveStart and
	SaveEnd. They are used by System.Web's configuration system to
	suppress application reloads when configuration is modified and
	saved from within a web application. It is necessary to use events
	since there is no guarantee the web application will use
	WebConfigurationManager (and thus WebConfigurationHost) for
	writing.

2009-07-14  Marek Habersack  <[email protected]>

	* System.Configuration.dll.sources: added
	System.Configuration/ConfigurationSaveEventArgs.cs
	System.Configuration/ConfigurationSaveEventHandler.cs

2009-07-14  Marek Habersack  <[email protected]>

	* AssemblyInfo.cs: added InternalsVisibleTo for System.Web

2009-07-14  Marek Habersack  <[email protected]>

	* HttpApplicationFactory.cs: OnFileChanged doesn't reload
	application if reload suppression is active.

svn path=/trunk/mcs/; revision=137847
2009-07-14 11:24:36 +00:00
Gonzalo Paniagua Javier 3d7ff5cc84 2009-07-09 Gonzalo Paniagua Javier <[email protected]>
* WebConfigurationHost.cs: null means MachineToApplication.
	* WebConfigurationManager.cs: when caching configuration and sections,
	use the configuration file directory instead of the incoming request
	path.


svn path=/trunk/mcs/; revision=137632
2009-07-09 17:10:07 +00:00
Marek Habersack 6a261e04ad 2009-06-05 Marek Habersack <[email protected]>
* VirtualPathUtility.cs: IsValidVirtualPath no longer uses
	WebConfigurationManager.GetSection to retrieve the verification
	setting. Instead, the setting is retrieved in the static
	constructor.

	* HttpRequest.cs: ApplyUrlMapping must not use
	WebConfigurationManager.GetSection as it would cause a recursive
	call loop. Code to detect whether url mappings are in effect has
	been moved to a static constructor.

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

	* Page.cs: InitializeTheme uses WebConfigurationManager.GetSection
	to retrieve page theme name. GetWebApplicationSection cannot be
	used because the system.web/pages section is valid also in
	subdirectories. Fixes bug #510302

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

	* WebConfigurationManager.cs: OpenWebConfiguration caches
	configurations with a key generated from all the parameters passed
	to it, not just from path.
	Added internal GetSection method which takes HttpContext as its
	third parameter - used in calling OpenWebConfiguration.
	FindWebConfig is no longer used in GetSection - it breaks handling
	of <location> elements in config files. Fixes bug #510302

svn path=/trunk/mcs/; revision=135558
2009-06-05 20:53:26 +00:00
Marek Habersack 7766743366 2009-04-03 Marek Habersack <[email protected]>
* WebConfigurationManager.cs: added code in the static constructor
	to enable retrieving application settings via
	ApplicationSettingsBase from within asp.net applications. Fixes
	bug #491531

	* ApplicationSettingsConfigurationFileMap.cs: added.

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

	* CustomizableFileSettingsProvider.cs: added a way for System.Web
	to specify path to the current Web.config. Fixes bug #491531

svn path=/trunk/mcs/; revision=130909
2009-04-02 22:35:28 +00:00
Marek Habersack da7b280757 2009-03-01 Marek Habersack <[email protected]>
* WebConfigurationManager.cs: optimized GetWebApplicationSection a
	bit

svn path=/trunk/mcs/; revision=128278
2009-02-28 23:17:42 +00:00
Marek Habersack cab3168b4d 2009-02-28 Marek Habersack <[email protected]>
* WebConfigurationManager.cs: make sure no nrex happens in
	GetSectionCacheKey ()

svn path=/trunk/mcs/; revision=128251
2009-02-28 02:15:28 +00:00
Gonzalo Paniagua Javier db46edacce 2009-02-26 Gonzalo Paniagua Javier <[email protected]>
* WebConfigurationManager.cs: generate a hash from the string hsah
	codes instead of concatenating them.


svn path=/trunk/mcs/; revision=128121
2009-02-26 17:24:22 +00:00
Marek Habersack 2e5b6c6fee 2009-01-09 Marek Habersack <[email protected]>
* WebConfigurationManager.cs: do not normalize the path in
	FindWebConfig when getting the virtual directory.

svn path=/trunk/mcs/; revision=122844
2009-01-09 00:15:17 +00:00
Marek Habersack 10e114be23 2009-01-08 Marek Habersack <[email protected]>
* WebConfigurationManager.cs: improve performance of
	FindWebConfig.

svn path=/trunk/mcs/; revision=122730
2009-01-08 00:32:37 +00:00
Marek Habersack a3e3e7976c 2008-12-24 Marek Habersack <[email protected]>
* WebConfigurationManager.cs: A better version of the previous
        GetSection fix. Right now the method searches for directories
        containing web.config and uses them, if found, to open the web
        configuration. If no web.config is found, web configuration is
        opened for the root application directory.

        * WebConfigurationHost.cs: made GetWebConfigFileName internal
        static, so that code can be reused from WebConfigurationManager.

svn path=/trunk/mcs/; revision=122124
2008-12-25 13:02:15 +00:00
Marek Habersack ce8461d813 2008-12-23 Marek Habersack <[email protected]>
* NunitWeb/Makefile (NunitWeb.dll): added NunitWeb/CustomSection.cs

	* NunitWebResources/CustomSectionEmptyCollection.aspx: added

2008-12-23  Marek Habersack  <[email protected]>

	* WebConfigurationManagerTest.cs: added new test.

2008-12-23  Marek Habersack  <[email protected]>

	* CustomSection.cs: added. Implementation of custom configuration
	elements for WebConfigurationManager tests.

2008-12-23  Marek Habersack  <[email protected]>

	* Web.mono.config: added CustomTags section definition, used in
	WebConfiguratioManager tests.

2008-12-23  Marek Habersack  <[email protected]>

	* WebConfigurationManager.cs: GetSection should call
	OpenWebConfiguration using the actual directory path, not a file
	path. If it fails to do so, System.Configuration may treat the
	top-level Web.config file as a child one which, in turn, in
	certain circumstances will lead to duplicate keys inserted in
	collections.

2008-12-23  Marek Habersack  <[email protected]>

	* Makefile (TEST_RESOURCE_FILES): added Test/mainsoft/NunitWebResources/CustomSectionEmptyCollection.aspx

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

svn path=/trunk/mcs/; revision=122024
2008-12-23 02:42:50 +00:00
Gonzalo Paniagua Javier f6cebfc567 revert
svn path=/trunk/mcs/; revision=121599
2008-12-16 14:56:21 +00:00
Gonzalo Paniagua Javier 56484a4ff6 2008-11-22 Gonzalo Paniagua Javier <[email protected]>
* WebConfigurationManager.cs: fix nullref.


svn path=/trunk/mcs/; revision=119699
2008-11-22 05:34:02 +00:00
Gonzalo Paniagua Javier 464ff6edc4 2008-11-19 Gonzalo Paniagua Javier <[email protected]>
* WebConfigurationManager.cs: don't keep configuration sections for
	files that don't exist on disk.
	Bug #443569 fixed.


svn path=/trunk/mcs/; revision=119378
2008-11-19 21:31:17 +00:00
Marek Habersack ef9c9e51ce Do not abuse the 'private' keyword
svn path=/trunk/mcs/; revision=116539
2008-10-20 17:37:54 +00:00
Marek Safar f3f05c2055 Warnings cleanup
svn path=/trunk/mcs/; revision=111904
2008-08-29 09:48:05 +00:00
Marek Habersack 09c2c620cb 2008-03-01 Marek Habersack <[email protected]>
* HttpRuntime.cs: SettingsMappingManager has been moved to
	Mono.Web.
2008-03-01  Marek Habersack  <[email protected]>

	* WebConfigurationManager.cs: SettingsMappingManager has been
	moved to Mono.Web.dll
2008-03-01  Marek Habersack  <[email protected]>

	* Makefile: added a dependency on Mono.Web.dll

	* System.Web.dll.sources: removed SystemSettingsMapper public APIs
	and moved them to the Mono.Web assembly.
2008-03-01  Marek Habersack  <[email protected]>

	* AssemblyInfo.cs: added
2008-03-01  Marek Habersack  <[email protected]>

	* ISectionSettingsMapper.cs, MembershipSectionMapper.cs,
	RoleManagerSectionMapper.cs, SettingsMapping.cs,
	SettingsMappingManager.cs, SettingsMappingWhat.cs: moved to here
	from System.Web
2008-03-01  Marek Habersack  <[email protected]>

	* Mono.Web.dll.sources: added

	* Makefile: added


svn path=/trunk/mcs/; revision=97035
2008-02-29 23:49:18 +00:00
Marek Habersack 953d97739a 2008-02-25 Marek Habersack <[email protected]>
* WebConfigurationManager.cs: hashtable can contain a key with a
	null value, avoid adding duplicate keys in such cases.

svn path=/trunk/mcs/; revision=96532
2008-02-25 09:51:23 +00:00
Vladimir Krasnov bfbe00f669 * WebConfigurationManager.cs: performance improvement, cached GetSection method
svn path=/trunk/mcs/; revision=96069
2008-02-18 16:25:21 +00:00
Konstantin Triger 6b06beb287 TARGET_JVM: cache the merged AppSettings inside AppDomain
svn path=/trunk/mcs/; revision=95139
2008-02-07 13:41:27 +00:00
Konstantin Triger bbc7149726 the AppSettings collection's Add should behave as Set
svn path=/trunk/mcs/; revision=92342
2008-01-06 14:49:19 +00:00
Konstantin Triger bfb0849d2b Add support for java config files settings inside the .Net appSettings
svn path=/trunk/mcs/; revision=91938
2007-12-27 14:27:55 +00:00
Konstantin Triger 328dda86dc TARGET_JVM: do not use the SettingsMappingManager
svn path=/trunk/mcs/; revision=90998
2007-12-09 08:58:57 +00:00
Marek Habersack 58eceab2ec 2007-12-08 Marek Habersack <[email protected]>
* TranslationResources.resx: added - string resources for the
	Sqlite providers.
2007-12-08  Marek Habersack  <[email protected]>

	* SQLiteProviders_DatabaseSchema.sql: added
	* Makefile: added support for compiling .resx resources.
	Added SQLiteProviders_DatabaseSchema.sql to EXTRA_DISTFILES.
	Added new resource files to EXTRA_DISTFILES
2007-12-08  Marek Habersack  <[email protected]>

	* HttpRuntime.cs: initialize the Settings Mapping Manager once per
	application, just after initalizing the WebConfigurationManager
2007-12-08  Marek Habersack  <[email protected]>

	* SqliteProfileProvider.cs: added - a Profile Provider for
        Sqlite, based on PostgreSQL Profile Provider code from Daniel
        Nauck <[email protected]>
2007-12-08  Marek Habersack  <[email protected]>

	* TranslationProperties.Designer.cs: added - contains strongly
	typed properties referring to string resources used by the Sqlite
	providers.
2007-12-08  Marek Habersack  <[email protected]>

	* WebConfigurationManager.cs: GetSection now runs each section
	through a mapper (if any is defined for the section) before
	returning it to the caller.
2007-12-08  Marek Habersack  <[email protected]>

	* SqliteRoleProvider.cs: added - a Role Provider for
	Sqlite, based on PostgreSQL Role Provider code from Daniel
	Nauck <[email protected]>

	* SqliteMembershipProvider.cs: added - a Membership Provider for
	Sqlite, based on PostgreSQL Membership Provider code from Daniel
	Nauck <[email protected]>
2007-12-08  Marek Habersack  <[email protected]>

	* SerializationHelper.cs: added - serialization helper for the
	Sqlite Profile Provider.

	* RoleManagerSectionMapper.cs: added - section settings mapper for
	the RoleManager section.

	* MembershipSectionMapper.cs: added - section settings mapper for
	the Membership section.

	* ISectionSettingsMapper.cs: added - interface definition for
	section settings mappers.

	* SettingsMappingWhat.cs: added - describes a single 'what' tag
	instance inside the mapper definition in the settings.map file.

	* SettingsMapping.cs: added - represents a single mapper entry in
	the settings.map file.

	* SettingsMappingManager.cs: added - manages settings mapping as
	defined in the settings.map file.


svn path=/trunk/mcs/; revision=90972
2007-12-07 23:26:18 +00:00
Marek Habersack fbd041c942 2007-05-30 Marek Habersack <[email protected]>
* WebConfigurationManager.cs: if errors happen when opening the
        configuration file, mark the manager as unsafe to prevent further
        usage and avoid error loops.

2007-05-30  Marek Habersack  <[email protected]>

        * TraceManager.cs: Catch all the possible exceptions in the
        constructor - the object MUST be created successfully (even if
        there are errors).

        * HttpRequest.cs: do not attempt to apply url mappings if the
        configuration manager has errors.

        * HttpRuntime.cs: handle static constructor exceptions later on,
        during the first call to ReallyProcessRequest.

        * QueueManager.cs: provide defaults for the parameters to be read
        from the config file(s).
        Catch all the possible exceptions in the constructor - the object
        MUST be created successfully (even if there are errors).


svn path=/trunk/mcs/; revision=78208
2007-05-30 13:50:14 +00:00
Konstantin Triger 898724f159 refactoring: fix documentation attributes
svn path=/trunk/mcs/; revision=78129
2007-05-29 14:57:08 +00:00
Igor Zelmanovich ae1457b6dd 2007-05-15 Igor Zelmanovich <[email protected]>
* WebConfigurationManager.cs: 
	make configurations hashtable case-insensitive.
	* WebConfigurationHost.cs: for TARGET_J2EE only:
	GetStreamName returns file path in right case, that make it works 
	on case-sensitive file system.

	* ConfigurationLocationCollection.cs: for TARGET_JVM only:
	location path is case-insensitive.
		
	* PageMapper.cs: reverted r77353, 77321
	make it case-insensitive


svn path=/trunk/mcs/; revision=77415
2007-05-15 14:58:27 +00:00
Igor Zelmanovich 490aa86ced 2007-05-14 Igor Zelmanovich <[email protected]>
* WebConfigurationManager.cs: 
	make configurations synchronized.
	added new internal method RemoveConfigurationFromCache.

	* HttpApplication.cs:
	prevent DOS attack: remove configuration from the cache in case 
	of invalid resource not exists	


svn path=/trunk/mcs/; revision=77336
2007-05-14 09:47:41 +00:00
Marek Habersack aef2ee73d1 2007-04-24 Marek Habersack <[email protected]>
* HttpRequest.cs: MS.NET throws HttpException for invalid paths,
	not ArgumentNullException.

	* HttpException.cs: wrap GetHtmlErrorMessage internals in
	try/catch to capture possible exceptions in HttpContext.

	* HttpContext.cs: IsCustomErrorEnabled is used from within
	HttpException, make sure it gets the section in a safe way and
	resorts to the default settings.
	
	* HttpResponse.cs: HeaderEncoding is used in the same context as
	above. Take the same precautions.

2007-04-24  Marek Habersack  <[email protected]>

	* WebConfigurationHost.cs: wrap MapPath calls in try/catch,
	because bad URLs can cause it to throw exceptions. If such
	exception is caught, throw a HttpException for Bad Request (400).

	* WebConfigurationManager.cs: added two internal methods for safe
	retrieval of config sections.


svn path=/trunk/mcs/; revision=76162
2007-04-24 06:54:27 +00:00
Vladimir Krasnov aff7910664 * WebConfigurationManager.cs: fixed OpenWebConfiguration, should not lock when checking if configuration is already open
svn path=/trunk/mcs/; revision=74721
2007-03-21 10:32:32 +00:00