329 Commits
Author SHA1 Message Date
Maxim Lipnin c890be00c9 use for loop to access item values and avoid InvalidCastException which occurs because VirtualDirectoryMappingCollection enumerator returns key and it's not expected 2019-02-19 21:08:02 +01:00
Marek Safar 71ad99f720 [build] Narrow recursive dependencies 2018-02-08 23:49:44 -05:00
Pablo Ruiz García db758b9f85 Fix OpenMappedWebConfiguration throws: System.IndexOutOfRangeException, when using RazorGenerator under mono (#5013) 2017-06-12 01:55:26 +02:00
Alexander Köplinger a22bb15e6b [System.Web] Rename method parameters to match .NET contract 2017-03-16 13:02:09 +01:00
Marek Safar 47a6f56439 [bcl] Clean up some warnings 2016-11-29 19:16:02 +01:00
Alexander Köplinger b03e606287 Remove ChangeLog files from the repo
They weren't updated in the last 6 years and aren't helpful anymore (e.g. by causing unrelated matches during git grep searches).
2016-01-29 19:17:06 +01:00
kasthack 5b8a2d206c [System.Web] Public interfaces from reference source 2015-09-24 05:29:04 +03:00
kasthack 31682e6b04 [System.Web] Public enums from reference source 2015-09-22 18:46:35 +03:00
kasthack d408da6df2 System.Web.Configuration.(AdapterDictionary,AuthenticationMode,MachineKeyValidation,ProcessModelComAuthenticationLevel,ProcessModelComImpersonationLevel,SystemWebCachingSectionGroup,WebApplicationLevel,XhtmlConformanceMode) from reference source
Added AsyncPreloadModeFlags + some internal classes used by MS's implementation
2015-09-20 09:53:17 +03:00
kasthack 8663666b4a System.Web.Configuration.CustomErrorsRedirectMode from referencesource 2015-09-20 08:32:56 +03:00
kasthack 6e363f21bf System.Web.Configuration.PagesEnableSessionState referencesource 2015-09-20 08:30:05 +03:00
kasthack 814331510c System.Web.Configuration.ProcessModelLogLevel from referencesource 2015-09-20 08:21:32 +03:00
kasthack eaefcc235e System.Web.Configuration.CustomErrorsMode from referencesource 2015-09-20 08:14:52 +03:00
kasthack a1ff605a1e System.Web.Configuration.TraceDisplayMode from referencesource 2015-09-20 08:11:52 +03:00
kasthack d972f553a9 System.Web.Configuration.AuthorizationRuleAction from referencesource 2015-09-20 08:10:32 +03:00
Matthias Bogad 58e0608c10 [System.Web] ASP.Net MVC5 missing methods fixed
I have added System.HttpApplication.RegisterModule(), the missing two properties of the System.Web.Routing.RouteCollection as well as the corresponding property in the HttpRuntimeSection to completely turn this off. Microsofts MIT-Licensed counterparts of the official System.Web assembly from github [0] were used as a reference. It is kind-of bolted on, but should be good enough until the whole open-sourced System.Web is incorporated. It should at least get the default MVC5 Template from Visual Studio 2013 up and running, once the async pipeline for the owin stuff is fixed.

[0]: http://github.com/Microsoft/referencesource/

Additionally, the MissingMethodException "get_InClientBuildManager" in System.Web.Hosting.HostingEnvironment was fixed.
In this commit, the following bugs were fixed:
https://bugzilla.xamarin.com/show_bug.cgi?id=21810
https://bugzilla.xamarin.com/show_bug.cgi?id=16475
2015-06-09 14:06:52 +02:00
Zoltan Varga c1b4366932 [bcl] Remove NET_4_5 defines from class libs. 2015-01-13 16:34:23 -05:00
Zoltan Varga 032f313d5f [bcl] Remove NET_4_0 defines from class libs. 2015-01-13 16:06:31 -05:00
Zoltan Varga 0985d4aa4b [bcl] Remove NET_2_0 defines from the class libs. This has been done using: unifdef -t -DNET_2_0 -o <filename> <filename>. 2015-01-13 15:29:38 -05:00
Etienne CHAMPETIER a4134641d8 [cleanup] WebConfigurationManager: remove hasConfigErrors
it's not used since 2009 (6a261e04ad)

Signed-off-by: Etienne CHAMPETIER <[email protected]>
2014-12-01 23:57:19 +01:00
Etienne CHAMPETIER 227b0d1b55 [cleanup] System.Web*: remove TARGET_J2EE
done using unifdef
git grep -l TARGET_J2EE | grep -v ChangeLog | xargs -n1 unifdef -m -UTARGET_J2EE

Signed-off-by: Etienne CHAMPETIER <[email protected]>
2014-12-01 23:57:18 +01:00
Etienne CHAMPETIER 9b7b75d7ec WebConfigurationManager: simplify call to ConfigurationSection.GetRuntimeObject ()
this call come from an obfuscation contest :) ?

Signed-off-by: Etienne CHAMPETIER <[email protected]>
2014-10-24 16:17:01 +02:00
Etienne CHAMPETIER 3fd3541704 WebConfigurationManager: protect GetSection
all public static should be thread-safe

Signed-off-by: Etienne CHAMPETIER <[email protected]>
2014-10-24 16:16:55 +02:00
Alexander Köplinger 48e112d652 [Cleanup] Removed TARGET_JVM
It was once part of a special Java target profile, but this is no longer used today.
2014-08-08 03:28:34 +02:00
Alexander Köplinger a8b2f07578 [Cleanup] Removed .jvm.cs files that are no longer used
They were once part of a special Java target profile, but this is no longer used today.
2014-08-07 23:01:51 +02:00
Marek Habersack 92f2a76fea [system.web] remove some more remnants of Mono.Web.dll to fix Xamarin Studio activation
The section mapping system wasn't being initialized and used properly since some ifdefs had
been left in the source code. This caused a null reference exception while trying to perform
some HTTP requests and, as the result, broke Xamarin Studio activation.
2014-05-12 19:33:10 +02:00
Frederic Mestayer 03e31732d3 [System.Web] Do not crash on duplicate keys in browser capabilities
Correct https://bugzilla.xamarin.com/show_bug.cgi?id=14720 and
probably https://bugzilla.xamarin.com/show_bug.cgi?id=13014

Signed-off-by: Etienne CHAMPETIER <[email protected]>
Signed-off-by: Frederic Mestayer <[email protected]>
2013-09-20 14:19:40 +02:00
Alexander Köplinger 9ccd495f33 Added handling of 'targetFramework' attribute (new in .NET 4.5) to HttpRuntime and HttpRuntimeSection 2013-07-06 16:53:22 +02:00
Andres G. Aragoneses 7fe883d9c5 [System.Web] Improve locking logic for WebConfigManager's sectionCache
As suggested by Marek Habersack, instead of catching
SynchronizationLockException in the case that the lock wasn't
acquired, we now have a boolean that indicates if it was
acquired or not, so we can act on it on the finally{} block.
2013-05-27 21:27:33 +01:00
Andres G. Aragoneses 7d75358e6c [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()

(Read operations in the cache now cause a write operation on the cache
object, so all sectionCache lock-read usages are converted to lock-write.)

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=5598
2013-05-14 17:47:40 +01:00
Bojan Rajkovic db8f33718a Revert "Merge pull request #618 from knocte/aspnet_lru"
This reverts commit 675328ef16, reversing
changes made to edc181c514.
2013-05-01 17:05:12 -04:00
Andres G. Aragoneses 126d079b84 [System.Web] Use STDERR instead of STDOUT in LRUcache
As suggested by Marek Habersack
2013-04-26 17:03:54 +01:00
Andres G. Aragoneses e072c0ec34 [System.Web] Move MONO_ASPNET_WEBCONFIG_CACHESIZE parsing out of LRUcache 2013-04-26 16:58:50 +01:00
Andres G. Aragoneses d198187591 [WebConfigurationManager] Reset LRUcache eviction count in Clear() 2013-04-25 00:10:50 +01:00
Andres G. Aragoneses d94839c493 [WebConfigurationManager] Make the max LRUcache size configurable
Using the env var MONO_ASPNET_WEBCONFIG_CACHESIZE, as discussed in BXC#5598
2013-04-25 00:01:08 +01:00
Andres G. Aragoneses 4f9bdfab16 [System.Web] Coding style nits in LruCache 2013-04-24 12:35:26 +01:00
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
aerisg222 c2fc2dc584 initial implementation of http capability provider introduced in .net 4.0. 2012-08-02 12:49:26 -04:00
Pablo Ruiz Garcia 05325691a2 Fix browser capabilities compatibility with ms.net by 1) Avoid issues with capabilities defined with same name, but diferent case. and 2) favor majorversion/minorversion capabilities, but fallback to majorver/minorver if not found, to preserve compatibility with previous versions. 2012-04-05 20:22:19 +02: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
QuickJack cd2c570c55 Allows write access to web.config files below an app's root. 2012-01-10 21:01:16 +01:00
Martin 3a604b81c5 http://bugzilla.xamarin.com/show_bug.cgi?id=2345 2011-12-12 13:12:07 +01:00
Marek Habersack 7662f68051 [asp.net] Shorten code in WebConfigurationHost 2011-04-14 20:49:30 +02:00
Marek Habersack c04e994ef6 [asp.net] A more effective way of looking for web.config 2011-04-13 16:56:37 +02:00
Martin f56770d667 [asp.net] Fix for bug #658184. AuthorizationRule restores its Action when unmerging. 2011-03-30 12:20:33 +02:00
Marek Habersack 1171cacd8d [asp.net] Implemented CustomErrorsRedirectMode 2011-02-09 01:24:16 +01:00
Marek Habersack 886240dea0 [asp.net] HttpRuntimeSection.RequestPathInvalidCharacters default value is different 2011-02-03 17:34:28 +01:00
Marek Habersack df3af8d7ec [asp.net,mcs] Fixed 'protected internal' build errors and removed System.Web-specific hack from mcs 2011-01-10 11:16:44 +01:00