83 Commits
Author SHA1 Message Date
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
Vladimir Krasnov b837ec06d8 * WebConfigurationManager.cs: fixed OpenWebConfiguration, removed GetBasePath call and locations search, since this not affects configuration initialization, but improves performance
svn path=/trunk/mcs/; revision=74342
2007-03-15 10:20:42 +00:00
Miguel de Icaza 6b4c7232fd * SiteMapNode.cs (GetExplicitResourceString): implement.
* HttpContext.cs (GetGlobalResourceObject): remove unused variable.

        * StaticFileHandler.cs (ProcessRequest): remove unused variable.

        * HttpApplication.cs (ProcessError): Remove unused variable.

2007-01-20  Miguel de Icaza  <[email protected]>

        * ClientBuildManager.cs: Remove unused variable (this could be a
        real problem, we never use the appPhysicalTargetDir)

        * AssemblyBuilder.cs: Remove unused field.

        * AppResourceFilesCollection.cs: Remove unused field.

        * TemplateControlCompiler.cs (GetExpressionFromString): Remove
        unused variable.

        * AppResourcesCompiler.cs: Remove unused variable.

        * AppSettingsExpressionBuilder.cs (GetAppSetting): remove unused
        parameter.

        * PageCompiler.cs: Put InternalCreatePageProperty inside the
        NET_2_0 block to eliminate warnings.

2007-01-20  Miguel de Icaza  <[email protected]>

        * HandlerFactoryConfiguration.cs (LoadType): remove unused
        variable.
        (ctor): do not assign parent, we do not use it, keep the code for
        reference.

2007-01-20  Miguel de Icaza  <[email protected]>

        * ApplicationManager.cs: Remove unused variable.
        (ShutdownAll) remove unused variables.

        * ApplicationHost.cs: Protect create_dir lock

2007-01-20  Miguel de Icaza  <[email protected]>

        * SqlRoleProvider.cs: comment out unused code.

        * SqlMembershipProvider.cs: Removed unused variables.
        Remove unused variable.

        * AnonymousIdentificationModule.cs (ClearAnonymousIdentifier):
        remove unused variable.   This might be a real bug.

2007-01-20  Miguel de Icaza  <[email protected]>

        * SessionStateModule.cs: Removed unused variables.

2007-01-20  Miguel de Icaza  <[email protected]>

        * SessionDictionary.cs: Removed unused variable (dirty).

2007-01-20  Miguel de Icaza  <[email protected]>

        * XhtmlTextWriter.cs: comment out unused code.

        * ThemeProvider.cs: comment out unused code.

        * DataSourceView.cs: Comment unused variable.

        * ClientScriptManager.cs: Put the expandoAttributes inside the 2.0
        code

        * Control.cs: Put _templateControl inside the NET_2_0 ifdef

2007-01-20  Miguel de Icaza  <[email protected]>

        * HtmlHead.cs: comment out unused code, in particular metadata is
        commented out because nothing could have triggered its creation.

        * HtmlButton.cs: Move declaration of `csm' inside the 1.1 case.

2007-01-20  Miguel de Icaza  <[email protected]>

        * DataControlFieldCollection.cs (RemoveAt): remove unused
        variable.

        * RoleGroupCollection.cs (OnValidate): Flag as protected, as it
        should not show up.

        * RadioButton.cs (RaisePostDataChangedEvent): This method was not
        used in 1.0, so put the whole method in 2.0

2007-01-20  Miguel de Icaza  <[email protected]>

        * WebPart.cs: Remove

        * PersonalizableAttribute.cs: Remove extra API that was wrong as well.

2006-11-28  Miguel de Icaza  <[email protected]>

        * WebPart.cs:

2007-01-20  Miguel de Icaza  <[email protected]>

        * FileUtils.cs (CreateTemporaryFile): Remove unused variable.



svn path=/trunk/mcs/; revision=71399
2007-01-20 22:42:04 +00:00
Vladimir Krasnov 5625ac6222 * WebConfigurationManager.cs: fixed GetSection to execute GetRuntimeObject, refactored GetSection and GetWebApplicationSection
svn path=/trunk/mcs/; revision=69664
2006-12-18 15:59:16 +00:00
Miguel de Icaza 8616a7e405 2006-11-28 Miguel de Icaza <[email protected]>
* Rationalize the user of MonoTODOs.  

		- Removed all the TODOs that were only overwritten methods
		and had no further information.

		- Methods that threw exceptions now have the message "Not
		implemnted".

		- Methods that return some constant are declared like
		that.

		- Removed a bunch of stale MonoTODOs that had not been
		removed. 


svn path=/trunk/mcs/; revision=68620
2006-11-28 22:15:23 +00:00
Marek Habersack 58fca48c17 Add support for App_GlobalResources and App_LocalResources
svn path=/trunk/mcs/; revision=66799
2006-10-18 20:30:10 +00:00
Gonzalo Paniagua Javier 0eb1ae7aa2 2006-09-06 Gonzalo Paniagua Javier <[email protected]>
* WebConfigurationManager.cs: add null checks. Patch by Marek Habersack
	that fixes bug #79283.


svn path=/trunk/mcs/; revision=65033
2006-09-07 03:16:18 +00:00
Roei Erez 0f931c3140 corrections for static fields at WebConfigurationManager which are relevant only when running on mainsoft platform (TARGET_j2EE)
svn path=/trunk/mcs/; revision=64476
2006-08-28 15:25:51 +00:00
Vladimir Krasnov 9a0b452068 * WebConfigurationManager.cs: added configSystem property under TARGET_JVM part
* WebConfigurationHost.cs: fixed GetStreamName and OpenStreamForRead for TARGET_JVM
* CompilationSection.cs: BuildProviders property removed from TARGET_JVM
* SystemWebSectionGroup.cs: Compilation property removed from TARGET_JVM

svn path=/trunk/mcs/; revision=63495
2006-08-08 16:48:57 +00:00
Atsushi Eno feef8c7598 2006-05-18 Atsushi Enomoto <[email protected]>
* WebConfigurationManager.cs: recent sys.config.dll changes on
          ConfigurationManager.GetSection() which should call
          GetRuntimeObject() should also apply here. Fixed monodoc web.


svn path=/trunk/mcs/; revision=60816
2006-05-18 12:53:17 +00:00
Chris Toshok d79978b1c2 2006-05-08 Chris Toshok <[email protected]>
* WebConfigurationManager.cs (GetBasePath): fix bug where
	path.Length was 0 when we got to the last while loop (and indexed
	-1 into an array.)  Thanks Marek for the fix.


svn path=/trunk/mcs/; revision=60415
2006-05-08 17:51:37 +00:00
Chris Toshok 58228fbaa3 2006-05-04 Chris Toshok <[email protected]>
[ Fixes bug #78256 ]
	
	* WebConfigurationHost.cs (GetConfigType): add a MonoTODO about
	how we should use the build provider machinery to get types.
	(MapPath): add rudimentary mapping in the case where we don't have
	a request, basically handle the case where the url begins with (or
	is) HttpRuntime.AppDomainAppVirtualPath.

	* WebConfigurationManager.cs (GetSection): if we don't have a
	valid request, open the web configuration corresponding to
	HttpRuntime.AppDomainAppVirtualPath.
	(GetBasePath): comment this a little, and make it work in the case
	where we don't have an HttpRequest.


svn path=/trunk/mcs/; revision=60275
2006-05-04 19:02:05 +00:00
Chris Toshok 7d0cc820e7 * WebConfigurationManager.cs (GetConfig): add a fallback case for
configuration sections that don't subclass from
	ConfigurationSection.

2006-03-24  Chris Toshok  <[email protected]>


svn path=/trunk/mcs/; revision=58511
2006-03-25 00:01:36 +00:00
Chris Toshok df3cfac2b0 2006-02-02 Chris Toshok <[email protected]>
* WebConfigurationManager.cs (GetSection(string,string)):
	implement.


svn path=/trunk/mcs/; revision=56479
2006-02-02 18:12:30 +00:00
Chris Toshok 3d7c4d5ac3 2006-02-01 Chris Toshok <[email protected]>
* WebConfigurationManager.cs: In the normal case, get the current
	request's web.config, not the application's.  If there is no
	current request, get the application's.
	(GetWebApplicationConfiguration): use Request.ApplicationPath, not
	Request.PhysicalApplicationPath.  OpenWebConfiguration takes
	virtual paths.

	* HttpConfigurationSystem.cs: GetWebApplicationSection =>
	GetSection.


svn path=/trunk/mcs/; revision=56421
2006-02-01 21:31:03 +00:00
Chris Toshok 545336f3a6 2006-01-31 Chris Toshok <[email protected]>
* WebConfigurationManager.cs: err, why did i ifdef stuff NET_2_0
	inside of an ifdef NET_2_0?


svn path=/trunk/mcs/; revision=56345
2006-01-31 17:42:46 +00:00
Chris Toshok 7033a6044e 2006-01-30 Chris Toshok <[email protected]>
* WebConfigurationManager.cs: lots of little changes.  hopefully
	this doesn't break anyone.  it fixes all the nunit problems
	gonzalo was having.

	* WebConfigurationHost.cs (GetStreamName): in the MachineWebPath
	case, handle the case where we have a WebConfigurationFileMap.
	(MapPath): this is likely wrong, but in the case where we don't
	have a file map or current HttpContext, just return the path.


svn path=/trunk/mcs/; revision=56311
2006-01-31 06:05:14 +00:00
Chris Toshok ea89719776 2006-01-26 Chris Toshok <[email protected]>
* HttpConfigurationSystem.cs: new class that gets sections from
	web.config files.

	* WebConfigurationManager.cs: change a lot of the
	NotImplementedExceptions to NotSupportedExceptions.
	(AppSettings): implement by just returning
	ConfigurationManager.AppSettings (note this is broken because
	ConfigurationManager.AppSettings are read-only, but it works for
	reading.)
	(ConnectionStrings): same (and probably broken in the same way..)
	(Init): replace the 2.0 IInternalConfigSystem with our
	HttpConfigurationSystem.

	* WebConfigurationHost.cs: add a comment about how things are
	likely to work in the face of IRemoteWebConfigurationHostServer.
	(CreateConfigurationContext): return a WebContext instance.


svn path=/trunk/mcs/; revision=56137
2006-01-27 02:17:41 +00:00
Chris Toshok 05d5389878 2006-01-16 Chris Toshok <[email protected]>
* WebConfigurationManager.cs: implement a IConfigurationSystem for
	use with WebConfigurationManager.
	(GetSection): try to load the section
	using GetWebApplicationSection before calling into
	ConfigurationManager.GetSection.
	(GetWebApplicationConfiguration): move common code to here.
	(GetWebApplicationSection): use GetWebApplicationConfiguration.
	(AppSettings): implement.

	* WebConfigurationHost.cs (GetWebConfigFileName): add
	"Web.Config", and move to an array/loop implementation.  maybe we
	should scan the directory and check ToLower() instead of
	explicitly enumerating?


svn path=/trunk/mcs/; revision=55650
2006-01-16 20:11:14 +00:00
Chris Toshok df1d6304a5 2005-12-11 Chris Toshok <[email protected]>
* WebConfigurationManager.cs (OpenMachineConfiguration): just call
	ConfigurationManager.OpenMachineConfiguration.
	(OpenWebConfiguration): remove the "IntPtr userToken" version and
	add a "string userName" version to clean up corcompare output.
	Modify all the overloads to pass null instead of IntPtr.Zero.
	(GetWebApplicationSection): if we're not running in a web
	application, use the machine configuration.


svn path=/trunk/mcs/; revision=54213
2005-12-11 17:29:21 +00:00
Chris Toshok 8edc9f83b2 remove spew
svn path=/trunk/mcs/; revision=52834
2005-11-10 06:27:27 +00:00
Chris Toshok a800101389 2005-11-09 Chris Toshok <[email protected]>
* PagesSection.cs, AuthenticationSection.cs, BuildProvider.cs,
	BuildProviderCollection.cs, HttpHandlerActionCollection.cs,
	HttpModulesSection.cs, HttpModuleAction.cs,
	HttpModuleActionCollection.cs, AnonymousIdentificationSection.cs,
	CodeSubDirectory.cs, CodeSubDirectoriesCollection.cs,
	SystemWebSectionGroup.cs, SiteMapSection.cs,
	WebConfigurationManager.cs: flesh out the implementation.

	* TagMap*.cs, TagPrefix*.cs: new implementation.

	* FormsAuthentication*.cs: new implementation.

	* Profile*.cs: new implementation.

	* Namespace*.cs: new implementation.

	* HttpRuntimeSection.cs: new implementation.


svn path=/trunk/mcs/; revision=52807
2005-11-09 23:34:39 +00:00
Chris Toshok 28685b1020 move many 2.0-only classes into System.Web.Configuration_2.0
svn path=/trunk/mcs/; revision=52421
2005-10-31 21:03:10 +00:00