2010-04-28 Marek Habersack <mhabersack@novell.com>
authorMarek Habersack <grendel@twistedcode.net>
Tue, 27 Apr 2010 22:49:20 +0000 (22:49 -0000)
committerMarek Habersack <grendel@twistedcode.net>
Tue, 27 Apr 2010 22:49:20 +0000 (22:49 -0000)
* Makefile (OTHER_LIB_MCS_FLAGS): added a reference to
System.Web.ApplicationServices in the 4.0 profile.

2010-04-28  Marek Habersack  <mhabersack@novell.com>

* KeyedList.cs: do not implement IStateManager in 4.0

2010-04-28  Marek Habersack  <mhabersack@novell.com>

* Makefile (OTHER_LIB_MCS_FLAGS): added a reference to
System.Web.ApplicationServices in the 4.0 profile.

2010-04-28  Marek Habersack  <mhabersack@novell.com>

* Makefile (LIB_MCS_FLAGS): added a reference to
System.Web.ApplicationServices in the 4.0 profile.

2010-04-28  Marek Habersack  <mhabersack@novell.com>

* Makefile (OTHER_LIB_MCS_FLAGS): added a reference to
System.Web.ApplicationServices in the 4.0 profile.

2010-04-28  Marek Habersack  <mhabersack@novell.com>

* Makefile (common_dirs): added System.Web.ApplicationServices

2010-04-28  Marek Habersack  <mhabersack@novell.com>

* RolePrincipal.cs: class is not sealed in 4.0

* MembershipUser.cs: type forwarded to
System.Web.ApplicationServices in 4.0.
In the 4.0 profile, a MembershipHelper instance is created using
reflection, so that the Membership class and password
encryption/decryption services can be accessed without referencing
System.Web

* MembershipProvider.cs: type forwarded to
System.Web.ApplicationServices in 4.0.
{Encrypt,Decrypt}Password implementations moved to
MembershipHelper.
Added new EncryptPassword overload for 4.0

* MembershipHelper.cs: a helper class to handle password
encryption/decryption and to forward requests for certain
Membership properties in 4.0. It is used also in 2.0 to keep code
cleaner. System.Web.ApplicationServices uses it to access the
Membership class without having to reference System.Web

* MembershipCreateStatus.cs, MembershipCreateUserException.cs,
MembershipPasswordException.cs, MembershipPasswordFormat.cs,
MembershipProviderCollection.cs, MembershipUserCollection.cs,
MembershipValidatePasswordEventHandler.cs, RoleProvider.cs,
ValidatePasswordEventArgs.cs:
types forwarded to System.Web.ApplicationServices in 4.0

* FormsIdentity.cs: class is not sealed in 4.0

svn path=/trunk/mcs/; revision=156264

40 files changed:
1  2 
mcs/class/ChangeLog
mcs/class/Makefile
mcs/class/System.IdentityModel/ChangeLog
mcs/class/System.IdentityModel/Makefile
mcs/class/System.ServiceModel/ChangeLog
mcs/class/System.ServiceModel/Makefile
mcs/class/System.Web.ApplicationServices/Assembly/AssemblyInfo.cs
mcs/class/System.Web.ApplicationServices/Assembly/ChangeLog
mcs/class/System.Web.ApplicationServices/ChangeLog
mcs/class/System.Web.ApplicationServices/Makefile
mcs/class/System.Web.ApplicationServices/System.Web.ApplicationServices.dll.sources
mcs/class/System.Web.ApplicationServices/System.Web.Configuration/MembershipPasswordCompatibilityMode.cs
mcs/class/System.Web.ApplicationServices/System.Web.Security/IMembershipHelper.cs
mcs/class/System.Web.ApplicationServices/net_4_0_System.Web.ApplicationServices.dll.sources
mcs/class/System.Web.Extensions/ChangeLog
mcs/class/System.Web.Extensions/Makefile
mcs/class/System.Web/ChangeLog
mcs/class/System.Web/Makefile
mcs/class/System.Web/System.Web.Security/ChangeLog
mcs/class/System.Web/System.Web.Security/FormsIdentity.cs
mcs/class/System.Web/System.Web.Security/MembershipCreateStatus.cs
mcs/class/System.Web/System.Web.Security/MembershipCreateUserException.cs
mcs/class/System.Web/System.Web.Security/MembershipHelper.cs
mcs/class/System.Web/System.Web.Security/MembershipOnlineStatus.cs
mcs/class/System.Web/System.Web.Security/MembershipPasswordException.cs
mcs/class/System.Web/System.Web.Security/MembershipPasswordFormat.cs
mcs/class/System.Web/System.Web.Security/MembershipProvider.cs
mcs/class/System.Web/System.Web.Security/MembershipProviderCollection.cs
mcs/class/System.Web/System.Web.Security/MembershipSortOptions.cs
mcs/class/System.Web/System.Web.Security/MembershipUser.cs
mcs/class/System.Web/System.Web.Security/MembershipUserCollection.cs
mcs/class/System.Web/System.Web.Security/MembershipValidatePasswordEventHandler.cs
mcs/class/System.Web/System.Web.Security/RolePrincipal.cs
mcs/class/System.Web/System.Web.Security/RoleProvider.cs
mcs/class/System.Web/System.Web.Security/SqlMembershipProvider.cs
mcs/class/System.Web/System.Web.Security/ValidatePasswordEventArgs.cs
mcs/class/System.Web/System.Web.UI/ChangeLog
mcs/class/System.Web/System.Web.UI/KeyedList.cs
mcs/class/System.Web/System.Web.dll.sources
mcs/class/System.Web/net_2_0_System.Web.dll.sources

index c0362ed44eed20b8d8b7065b408e4db7d2eed8dc,c0362ed44eed20b8d8b7065b408e4db7d2eed8dc..67652a4923be71712375e0b13bafe9c551bf538e
@@@ -1,3 -1,3 +1,7 @@@
++2010-04-28  Marek Habersack  <mhabersack@novell.com>
++
++      * Makefile (common_dirs): added System.Web.ApplicationServices
++
  2010-04-14  Ankit Jain  <jankit@novell.com>
  
        * Makefile: Add Moonlight.Build.Tasks to net_2_0_dirs and
index f776bd9af586a24051c0681d9055446c676a52e4,f776bd9af586a24051c0681d9055446c676a52e4..c709b0853597cca5be8c796bb6402fd1acbcba02
@@@ -47,6 -47,6 +47,7 @@@ common_dirs := 
        Mono.WebBrowser                 \
        Managed.Windows.Forms           \
        Mono.Data.Sqlite                \
++      System.Web.ApplicationServices  \
        System.Web                      \
        Mono.Web                        \
        System.Web.Services             \
index b3708327be5dc007c06a6fc29385c3837d3c7eef,b3708327be5dc007c06a6fc29385c3837d3c7eef..699a7c90f2e04953f1d52b5ebed90364c9ea405b
@@@ -1,3 -1,3 +1,8 @@@
++2010-04-28  Marek Habersack  <mhabersack@novell.com>
++
++      * Makefile (OTHER_LIB_MCS_FLAGS): added a reference to
++      System.Web.ApplicationServices in the 4.0 profile.
++
  2008-03-21  Atsushi Enomoto  <atsushi@ximian.com>
  
        * Makefile : added missing EXTRA_DISTFILES.
index da40b0c67a81126ff31eabea87b82c047592d011,da40b0c67a81126ff31eabea87b82c047592d011..3390d52a9f8eacd54a3572a3e7f81752cd2fd0f2
@@@ -2,6 -2,6 +2,10 @@@ thisdir = class/System.IdentityMode
  SUBDIRS = 
  include ../../build/rules.make
  
++ifeq (4, $(FRAMEWORK_VERSION_MAJOR))
++OTHER_LIB_MCS_FLAGS = -r:System.Web.ApplicationServices.dll
++endif
++
  LIBRARY = System.IdentityModel.dll
  LIB_MCS_FLAGS = \
                        /d:NET_3_0      \
@@@ -10,7 -10,7 +14,8 @@@
                /r:System.Security.dll \
                /r:System.Web.dll \
                /r:Mono.Security.dll \
--              /r:System.Runtime.Serialization.dll
++              /r:System.Runtime.Serialization.dll \
++              $(OTHER_LIB_MCS_FLAGS)
  
  TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
  
index 0bb3d5ac1c3d0912c2ac7fa6577128a1619b4f91,0bb3d5ac1c3d0912c2ac7fa6577128a1619b4f91..f2f579c7ddb8c7e8c6e837d749de7d5496dd0d11
@@@ -1,3 -1,3 +1,8 @@@
++2010-04-28  Marek Habersack  <mhabersack@novell.com>
++
++      * Makefile (LIB_MCS_FLAGS): added a reference to
++      System.Web.ApplicationServices in the 4.0 profile.
++
  2010-04-23  Astushi Enomoto  <atsushi@ximian.com>
  
        * Http_listener_notes.txt: update comment, as I have fixed one issue
index 6bb0e3c915b5a1ca3dd02b389b795004d134e006,6bb0e3c915b5a1ca3dd02b389b795004d134e006..3e4763cf5805f8104984aad44574fb1d6a473f6a
@@@ -35,6 -35,6 +35,10 @@@ ifeq (moonlight_raw, $(PROFILE)
  LIB_MCS_FLAGS += /r:System.Net
  endif
  
++ifeq (4, $(FRAMEWORK_VERSION_MAJOR))
++LIB_MCS_FLAGS += /r:System.Web.ApplicationServices.dll
++endif
++
  TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
  
  TEST_EXTRA_FILES = \
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..107058a350553579e7bf2920b38ee3b4116ad131
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,71 @@@
++//
++// AssemblyInfo.cs
++//
++// Author:
++//   Andreas Nahr (ClassDevelopment@A-SoftTech.com)
++//
++// (C) 2003 Ximian, Inc.  http://www.ximian.com
++// (C) 2010 Novell, Inc (http://novell.com/)
++//
++
++//
++// Permission is hereby granted, free of charge, to any person obtaining
++// a copy of this software and associated documentation files (the
++// "Software"), to deal in the Software without restriction, including
++// without limitation the rights to use, copy, modify, merge, publish,
++// distribute, sublicense, and/or sell copies of the Software, and to
++// permit persons to whom the Software is furnished to do so, subject to
++// the following conditions:
++// 
++// The above copyright notice and this permission notice shall be
++// included in all copies or substantial portions of the Software.
++// 
++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
++//
++
++using System;
++using System.Reflection;
++using System.Resources;
++using System.Security;
++using System.Security.Permissions;
++using System.Diagnostics;
++using System.Runtime;
++using System.Runtime.CompilerServices;
++using System.Runtime.InteropServices;
++using System.Runtime.Versioning;
++
++[assembly: AssemblyTitle ("System.Web.ApplicationServices.dll")]
++[assembly: AssemblyDescription ("System.Web.ApplicationServices.dll")]
++[assembly: AssemblyDefaultAlias ("System.Web.ApplicationServices.dll")]
++
++[assembly: AssemblyCompany (Consts.MonoCompany)]
++[assembly: AssemblyProduct (Consts.MonoProduct)]
++[assembly: AssemblyCopyright (Consts.MonoCopyright)]
++[assembly: AssemblyVersion (Consts.FxVersion)]
++[assembly: SatelliteContractVersion (Consts.FxVersion)]
++[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
++[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
++
++[assembly: NeutralResourcesLanguage ("en-US")]
++[assembly: CLSCompliant (true)]
++[assembly: AssemblyDelaySign (true)]
++
++[assembly: ComVisible (false)]
++
++[assembly: CompilationRelaxations (CompilationRelaxations.NoStringInterning)]
++[assembly: RuntimeCompatibility (WrapNonExceptionThrows = true)]
++[assembly: SecurityPermission (SecurityAction.RequestMinimum, SkipVerification = true)]
++
++[assembly: AssemblyKeyFile ("../msfinal.pub")]
++[assembly: InternalsVisibleTo ("System.Web, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")]
++
++[assembly: AssemblyTargetedPatchBand ("1.0.21-0")]
++[assembly: Debuggable (DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
++[assembly: AllowPartiallyTrustedCallers]
++[assembly: SecurityRules (SecurityRuleSet.Level2, SkipVerificationInFullTrust=true)]
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
new file mode 100644 (file)
--- /dev/null
--- /dev/null
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
new file mode 100644 (file)
--- /dev/null
--- /dev/null
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..57f271b8c9f8e2ba8ed5304194feaa51096a31f1
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,20 @@@
++thisdir = class/System.Web.ApplicationServices
++SUBDIRS = 
++include ../../build/rules.make
++
++LIBRARY = System.Web.ApplicationServices.dll
++LIB_MCS_FLAGS = -r:System.dll \
++              -r:System.Configuration.dll \
++              -d:SYSTEM_WEB_APPLICATIONSERVICES
++
++EXTRA_DISTFILES = $(RESOURCE_FILES)
++
++VALID_PROFILE := $(filter 4.0, $(FRAMEWORK_VERSION))
++ifndef VALID_PROFILE
++LIBRARY_NAME = dummy-System.Web.ApplicationServices.dll
++NO_INSTALL = yes
++NO_SIGN_ASSEMBLY = yes
++NO_TEST = yes
++endif
++
++include ../../build/library.make
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..8172b53faf1c54b0049910f0c8a31a9188c93e87
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,4 @@@
++Assembly/AssemblyInfo.cs
++../../build/common/Consts.cs
++../../build/common/Locale.cs
++../../build/common/MonoTODOAttribute.cs
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..367108c0433bb4e3494da739b447abf2f67f6c4c
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,37 @@@
++//
++// System.Web.Security.MembershipPasswordCompatibilityMode
++//
++// Authors:
++//    Marek Habersack <mhabersack@novell.com>
++//
++// Copyright (C) 2010 Novell, Inc (http://novell.com)
++//
++// Permission is hereby granted, free of charge, to any person obtaining
++// a copy of this software and associated documentation files (the
++// "Software"), to deal in the Software without restriction, including
++// without limitation the rights to use, copy, modify, merge, publish,
++// distribute, sublicense, and/or sell copies of the Software, and to
++// permit persons to whom the Software is furnished to do so, subject to
++// the following conditions:
++// 
++// The above copyright notice and this permission notice shall be
++// included in all copies or substantial portions of the Software.
++// 
++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
++//
++using System;
++
++namespace System.Web.Configuration
++{
++      public enum MembershipPasswordCompatibilityMode
++      {
++              Framework20,
++              Framework40
++      }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..09e161755600dee6e26d2f83184ed05f6d2d4f08
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,37 @@@
++//
++// IMembershipHelper.cs
++//
++// Authors:
++//      Marek Habersack <mhabersack@novell.com>
++//
++// Copyright (C) 2010 Novell, Inc. (http://novell.com/)
++//
++// Permission is hereby granted, free of charge, to any person obtaining
++// a copy of this software and associated documentation files (the
++// "Software"), to deal in the Software without restriction, including
++// without limitation the rights to use, copy, modify, merge, publish,
++// distribute, sublicense, and/or sell copies of the Software, and to
++// permit persons to whom the Software is furnished to do so, subject to
++// the following conditions:
++// 
++// The above copyright notice and this permission notice shall be
++// included in all copies or substantial portions of the Software.
++// 
++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
++//
++namespace System.Web.Security
++{
++      interface IMembershipHelper
++      {
++              int UserIsOnlineTimeWindow { get; }
++              MembershipProviderCollection Providers { get; }
++              byte [] DecryptPassword (byte [] encodedPassword);
++              byte[] EncryptPassword (byte[] password);
++      }
++}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..d18510145a68ae7e73e4a26e83b30b38da0fda1e
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,23 @@@
++#include System.Web.ApplicationServices.dll.sources
++
++Assembly/AssemblyInfo.cs
++../../build/common/Consts.cs
++../../build/common/Locale.cs
++../../build/common/MonoTODOAttribute.cs
++
++System.Web.Configuration/MembershipPasswordCompatibilityMode.cs
++System.Web.Security/IMembershipHelper.cs
++
++../System.Web/System.Web.UI/KeyedList.cs
++../System.Web/System.Web.UI/KeyedListEnumerator.cs
++../System.Web/System.Web.Security/MembershipCreateStatus.cs
++../System.Web/System.Web.Security/MembershipCreateUserException.cs
++../System.Web/System.Web.Security/MembershipPasswordException.cs
++../System.Web/System.Web.Security/MembershipPasswordFormat.cs
++../System.Web/System.Web.Security/MembershipProviderCollection.cs
++../System.Web/System.Web.Security/MembershipProvider.cs
++../System.Web/System.Web.Security/MembershipUserCollection.cs
++../System.Web/System.Web.Security/MembershipUser.cs
++../System.Web/System.Web.Security/MembershipValidatePasswordEventHandler.cs
++../System.Web/System.Web.Security/RoleProvider.cs
++../System.Web/System.Web.Security/ValidatePasswordEventArgs.cs
index 02f9748bb6a79172939608567eeec3807de035db,02f9748bb6a79172939608567eeec3807de035db..fb1db8908d5398322ace8d0d1807f5fbdaa16137
@@@ -1,3 -1,3 +1,8 @@@
++2010-04-28  Marek Habersack  <mhabersack@novell.com>
++
++      * Makefile (OTHER_LIB_MCS_FLAGS): added a reference to
++      System.Web.ApplicationServices in the 4.0 profile.
++
  2009-12-15  Marek Habersack  <mhabersack@novell.com>
  
        * System.Web.Extensions_test.dll.sources: added
index 68f45aad08f316f3db8e0b036bea2e1c9fa2b5ac,68f45aad08f316f3db8e0b036bea2e1c9fa2b5ac..005f7409be8bc1344c41f95dc8a00b6889a3b73c
@@@ -35,6 -35,6 +35,10 @@@ NUNIT_RESOURCE_FILES= 
        $(wildcard ../System.Web/Test/mainsoft/NunitWeb/NunitWeb/Resources/*.as?x) \
        $(wildcard ../System.Web/Test/mainsoft/NunitWeb/NunitWeb/Resources/*.master)
  
++ifeq (4, $(FRAMEWORK_VERSION_MAJOR))
++OTHER_LIB_MCS_FLAGS += -r:System.Web.ApplicationServices.dll
++endif
++
  LIB_MCS_FLAGS = \
        -unsafe \
        -define:NET_3_5                 \
index a3f6b8668c688c1230c6565d09efd11164332079,a3f6b8668c688c1230c6565d09efd11164332079..6c44bb3c5714e1dcb138632f242129857e697849
@@@ -1,3 -1,3 +1,8 @@@
++2010-04-28  Marek Habersack  <mhabersack@novell.com>
++
++      * Makefile (OTHER_LIB_MCS_FLAGS): added a reference to
++      System.Web.ApplicationServices in the 4.0 profile.
++
  2010-04-07  Marek Habersack  <mhabersack@novell.com>
  
        * Makefile: moved App_* test resources to separate variables -
index f4a69906008d8bcc3dc5642bfd610d69c6ea04da,f4a69906008d8bcc3dc5642bfd610d69c6ea04da..232075cf6b3e0dbb8d77ca6f7a3ee2d25cf93307
@@@ -239,6 -239,6 +239,10 @@@ OTHER_RES += $(RESOURCE_FILES_2
  OTHER_LIB_MCS_FLAGS = -d:INSIDE_SYSTEM_WEB -nowarn:618 -r:System.Configuration.dll -r:Mono.Data.Sqlite.dll
  endif
  
++ifeq (4, $(FRAMEWORK_VERSION_MAJOR))
++OTHER_LIB_MCS_FLAGS += -r:System.Web.ApplicationServices.dll
++endif
++
  LIB_MCS_FLAGS = \
        -unsafe \
        -nowarn:612,618 \
index 4cb3aa924772f1facf04f11980e9a5db39231216,4cb3aa924772f1facf04f11980e9a5db39231216..f606ac65e63528f3fea983f4f2b472388d7e6a64
@@@ -1,3 -1,3 +1,35 @@@
++2010-04-28  Marek Habersack  <mhabersack@novell.com>
++
++      * RolePrincipal.cs: class is not sealed in 4.0
++
++      * MembershipUser.cs: type forwarded to
++      System.Web.ApplicationServices in 4.0.
++      In the 4.0 profile, a MembershipHelper instance is created using
++      reflection, so that the Membership class and password
++      encryption/decryption services can be accessed without referencing
++      System.Web
++
++      * MembershipProvider.cs: type forwarded to
++      System.Web.ApplicationServices in 4.0.
++      {Encrypt,Decrypt}Password implementations moved to
++      MembershipHelper.
++      Added new EncryptPassword overload for 4.0
++
++      * MembershipHelper.cs: a helper class to handle password
++      encryption/decryption and to forward requests for certain
++      Membership properties in 4.0. It is used also in 2.0 to keep code
++      cleaner. System.Web.ApplicationServices uses it to access the
++      Membership class without having to reference System.Web
++
++      * MembershipCreateStatus.cs, MembershipCreateUserException.cs,
++      MembershipPasswordException.cs, MembershipPasswordFormat.cs,
++      MembershipProviderCollection.cs, MembershipUserCollection.cs,
++      MembershipValidatePasswordEventHandler.cs, RoleProvider.cs,
++      ValidatePasswordEventArgs.cs:
++      types forwarded to System.Web.ApplicationServices in 4.0
++
++      * FormsIdentity.cs: class is not sealed in 4.0
++
  2010-02-11  Marek Habersack  <mhabersack@novell.com>
  
        * Roles.cs: IsUserInRole checks if username is null or empty
index c38331e8e2f9a3f7b1ab5c48ea867a4f1f721397,c38331e8e2f9a3f7b1ab5c48ea867a4f1f721397..29323f8065a9d5254aeb4b2bea6dd583e4cda0c1
@@@ -36,7 -36,7 +36,12 @@@ namespace System.Web.Securit
        [AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
        // attributes
        [Serializable]
--      public sealed class FormsIdentity : IIdentity
++#if NET_4_0
++      public
++#else
++      public sealed
++#endif
++      class FormsIdentity : IIdentity
        {
                FormsAuthenticationTicket ticket;
  
index 4b0c431d74ecaabcb1bc0be3ff027aabab13bd1f,4b0c431d74ecaabcb1bc0be3ff027aabab13bd1f..6f0fcdf17d9245639586bb15d38616ad11232228
  // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  //
++using System.Runtime.CompilerServices;
  
--#if NET_2_0
--namespace System.Web.Security {
--
--      public enum MembershipCreateStatus {
++namespace System.Web.Security
++{
++#if NET_4_0
++      [TypeForwardedFrom ("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")]
++#endif
++      public enum MembershipCreateStatus
++      {
                Success,
                InvalidUserName,
                InvalidPassword,
@@@ -45,5 -45,5 +49,5 @@@
                ProviderError
        }
  }
--#endif
++
  
index 58b5e9c98b5621bffb00a5676ddd0443cd535e16,58b5e9c98b5621bffb00a5676ddd0443cd535e16..bae2e79c37cdeeb3d458cb70e68fa6c77458536e
  // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  //
  
--#if NET_2_0
  using System;
  using System.Runtime.Serialization;
++using System.Runtime.CompilerServices;
  
  namespace System.Web.Security
  {
++#if NET_4_0
++      [TypeForwardedFrom ("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")]
++#endif
        [Serializable]
        public class MembershipCreateUserException : Exception
        {
@@@ -72,5 -72,5 +75,5 @@@
                }
        }
  }
--#endif
++
  
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..2292db0db2fa951c55cf8755954ea3472545052a
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,105 @@@
++//
++// System.Web.Security.MembershipEncryptionHelper
++//
++// Authors:
++//    Ben Maurer (bmaurer@users.sourceforge.net)
++//    Lluis Sanchez Gual (lluis@novell.com)
++//
++// (C) 2003 Ben Maurer
++// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
++//
++// Permission is hereby granted, free of charge, to any person obtaining
++// a copy of this software and associated documentation files (the
++// "Software"), to deal in the Software without restriction, including
++// without limitation the rights to use, copy, modify, merge, publish,
++// distribute, sublicense, and/or sell copies of the Software, and to
++// permit persons to whom the Software is furnished to do so, subject to
++// the following conditions:
++// 
++// The above copyright notice and this permission notice shall be
++// included in all copies or substantial portions of the Software.
++// 
++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
++//
++using System;
++using System.Configuration.Provider;
++using System.Security.Cryptography;
++using System.Web.Configuration;
++
++namespace System.Web.Security
++{
++      sealed class MembershipHelper
++#if NET_4_0
++      : IMembershipHelper
++#endif
++      {
++              internal const int SALT_BYTES = 16;
++
++              public int UserIsOnlineTimeWindow {
++                      get { return Membership.UserIsOnlineTimeWindow; }
++              }
++
++              public MembershipProviderCollection Providers {
++                      get { return Membership.Providers; }
++              }
++              
++              static SymmetricAlgorithm GetAlg ()
++              {
++                      MachineKeySection section = (MachineKeySection) WebConfigurationManager.GetSection ("system.web/machineKey");
++
++                      if (section.DecryptionKey.StartsWith ("AutoGenerate"))
++                              throw new ProviderException ("You must explicitly specify a decryption key in the <machineKey> section when using encrypted passwords.");
++
++                      string alg_type = section.Decryption;
++                      if (alg_type == "Auto")
++                              alg_type = "AES";
++
++                      SymmetricAlgorithm alg = null;
++                      if (alg_type == "AES")
++                              alg = Rijndael.Create ();
++                      else if (alg_type == "3DES")
++                              alg = TripleDES.Create ();
++                      else
++                              throw new ProviderException (String.Format ("Unsupported decryption attribute '{0}' in <machineKey> configuration section", alg_type));
++
++                      alg.Key = MachineKeySectionUtils.DecryptionKey192Bits (section);
++                      return alg;
++              }
++              
++              public byte [] DecryptPassword (byte [] encodedPassword)
++              {
++                      using (SymmetricAlgorithm alg = GetAlg ()) {
++                              // alg.Key is set in GetAlg based on web.config
++                              // iv is the first part of the encodedPassword
++                              byte [] iv = new byte [alg.IV.Length];
++                              Array.Copy (encodedPassword, 0, iv, 0, iv.Length);
++                              using (ICryptoTransform decryptor = alg.CreateDecryptor (alg.Key, iv)) {
++                                      return decryptor.TransformFinalBlock (encodedPassword, iv.Length, encodedPassword.Length - iv.Length);
++                              }
++                      }
++              }
++
++              public byte[] EncryptPassword (byte[] password)
++              {
++                      using (SymmetricAlgorithm alg = GetAlg ()) {
++                              // alg.Key is set in GetAlg based on web.config
++                              // alg.IV is randomly set (default behavior) and perfect for our needs
++                              byte [] iv = alg.IV;
++                              using (ICryptoTransform encryptor = alg.CreateEncryptor (alg.Key, iv)) {
++                                      byte [] encrypted = encryptor.TransformFinalBlock (password, 0, password.Length);
++                                      byte [] output = new byte [iv.Length + encrypted.Length];
++                                      // note: the IV can be public, however it should not be based on the password
++                                      Array.Copy (iv, 0, output, 0, iv.Length);
++                                      Array.Copy (encrypted, 0, output, iv.Length, encrypted.Length);
++                                      return output;
++                              }
++                      }
++              }
++      }
++}
diff --cc mcs/class/System.Web/System.Web.Security/MembershipOnlineStatus.cs
index 8467cc2c3748c5bee5dbe2e5c48ac81b5424b758,8467cc2c3748c5bee5dbe2e5c48ac81b5424b758..0000000000000000000000000000000000000000
deleted file mode 100644,100644
+++ /dev/null
@@@ -1,40 -1,40 +1,0 @@@
--//
--// System.Web.Security.MembershipOnlineStatus
--//
--// Authors:
--//    Ben Maurer (bmaurer@users.sourceforge.net)
--//
--// (C) 2003 Ben Maurer
--//
--
--//
--// Permission is hereby granted, free of charge, to any person obtaining
--// a copy of this software and associated documentation files (the
--// "Software"), to deal in the Software without restriction, including
--// without limitation the rights to use, copy, modify, merge, publish,
--// distribute, sublicense, and/or sell copies of the Software, and to
--// permit persons to whom the Software is furnished to do so, subject to
--// the following conditions:
--// 
--// The above copyright notice and this permission notice shall be
--// included in all copies or substantial portions of the Software.
--// 
--// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
--// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
--// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
--// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
--// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
--// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
--// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--//
--
--#if NET_2_0
--namespace System.Web.Security {
--      public enum MembershipOnlineStatus {
--              All = 0,
--              Online = 1,
--              Offline = 2     
--      }
--}
--#endif
--
index 6601304818dab7f50015563b311116054f9d1b39,6601304818dab7f50015563b311116054f9d1b39..69c3315d0e76014bd86a9f3866dd5c666a5a41ae
  // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  //
  
--#if NET_2_0
--
  using System;
  using System.Runtime.Serialization;
++using System.Runtime.CompilerServices;
  
  namespace System.Web.Security
  {
++#if NET_4_0
++      [TypeForwardedFrom ("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")]
++#endif
        [Serializable]
        public class MembershipPasswordException : Exception
        {
@@@ -47,5 -47,5 +49,5 @@@
                }
        }
  }
--#endif
++
  
index af501fd133f11f6e61d8261794d3264f37b0daff,af501fd133f11f6e61d8261794d3264f37b0daff..ff731a0a8ec325180e7d45ebd45cca002663a154
  // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  //
++using System.Runtime.CompilerServices;
  
--#if NET_2_0
--namespace System.Web.Security {
--      public enum MembershipPasswordFormat {
++namespace System.Web.Security
++{
++#if NET_4_0
++      [TypeForwardedFrom ("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")]
++#endif
++      public enum MembershipPasswordFormat
++      {
                Clear = 0, 
                Hashed = 1,
                Encrypted = 2
        }
  }
--#endif
++
  
index 4a9556beab2bb11066a7283924ea897a29e7c3e8,4a9556beab2bb11066a7283924ea897a29e7c3e8..b88e3120ec0a4f7200c001716102654bd0d23c9e
@@@ -6,7 -6,7 +6,7 @@@
  //    Lluis Sanchez Gual (lluis@novell.com)
  //
  // (C) 2003 Ben Maurer
--// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
++// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
  //
  // Permission is hereby granted, free of charge, to any person obtaining
  // a copy of this software and associated documentation files (the
  // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  //
  
--#if NET_2_0
  using System.ComponentModel;
  using System.Configuration.Provider;
--using System.Web.Configuration;
++using System.Reflection;
++using System.Runtime.CompilerServices;
  using System.Security.Cryptography;
  using System.Text;
++using System.Web.Configuration;
  
  namespace System.Web.Security
  {
++#if NET_4_0
++      [TypeForwardedFrom ("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")]
++#endif
        public abstract class MembershipProvider : ProviderBase
        {
--              static readonly object validatingPasswordEvent = new object ();
++#if NET_4_0
++              const string HELPER_TYPE_NAME = "System.Web.Security.MembershipHelper, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
  
++              internal static IMembershipHelper Helper {
++                      get { return helper; }
++              }
++              static IMembershipHelper helper;
++#else
++              static MembershipHelper helper;
++#endif
++              
++              static readonly object validatingPasswordEvent = new object ();
++              
                EventHandlerList events = new EventHandlerList ();
                public event MembershipValidatePasswordEventHandler ValidatingPassword {
                        add { events.AddHandler (validatingPasswordEvent, value); }
                        remove { events.RemoveHandler (validatingPasswordEvent, value); }
                }
--              
++
++              static MembershipProvider ()
++              {
++#if NET_4_0
++                      Type type = Type.GetType (HELPER_TYPE_NAME, false);
++                      if (type == null)
++                              return;
++
++                      try {
++                              helper = Activator.CreateInstance (type) as IMembershipHelper;
++                      } catch {
++                              // ignore
++                      }
++#else
++                      helper = new MembershipHelper ();
++#endif
++              }
++
                protected MembershipProvider ()
                {
                }
                                eh (this, args);
                }
  
--              SymmetricAlgorithm GetAlg ()
--              {
--                      MachineKeySection section = (MachineKeySection) WebConfigurationManager.GetSection ("system.web/machineKey");
--
--                      if (section.DecryptionKey.StartsWith ("AutoGenerate"))
--                              throw new ProviderException ("You must explicitly specify a decryption key in the <machineKey> section when using encrypted passwords.");
--
--                      string alg_type = section.Decryption;
--                      if (alg_type == "Auto")
--                              alg_type = "AES";
--
--                      SymmetricAlgorithm alg = null;
--                      if (alg_type == "AES")
--                              alg = Rijndael.Create ();
--                      else if (alg_type == "3DES")
--                              alg = TripleDES.Create ();
--                      else
--                              throw new ProviderException (String.Format ("Unsupported decryption attribute '{0}' in <machineKey> configuration section", alg_type));
--
--                      alg.Key = MachineKeySectionUtils.DecryptionKey192Bits (section);
--                      return alg;
--              }
--
--              internal const int SALT_BYTES = 16;
                protected virtual byte [] DecryptPassword (byte [] encodedPassword)
                {
--                      using (SymmetricAlgorithm alg = GetAlg ()) {
--                              // alg.Key is set in GetAlg based on web.config
--                              // iv is the first part of the encodedPassword
--                              byte [] iv = new byte [alg.IV.Length];
--                              Array.Copy (encodedPassword, 0, iv, 0, iv.Length);
--                              using (ICryptoTransform decryptor = alg.CreateDecryptor (alg.Key, iv)) {
--                                      return decryptor.TransformFinalBlock (encodedPassword, iv.Length, encodedPassword.Length - iv.Length);
--                              }
--                      }
++#if NET_4_0
++                      if (helper == null)
++                              throw new PlatformNotSupportedException ("This method is not available.");
++#endif
++                      return helper.DecryptPassword (encodedPassword);
                }
  
                protected virtual byte[] EncryptPassword (byte[] password)
                {
--                      using (SymmetricAlgorithm alg = GetAlg ()) {
--                              // alg.Key is set in GetAlg based on web.config
--                              // alg.IV is randomly set (default behavior) and perfect for our needs
--                              byte [] iv = alg.IV;
--                              using (ICryptoTransform encryptor = alg.CreateEncryptor (alg.Key, iv)) {
--                                      byte [] encrypted = encryptor.TransformFinalBlock (password, 0, password.Length);
--                                      byte [] output = new byte [iv.Length + encrypted.Length];
--                                      // note: the IV can be public, however it should not be based on the password
--                                      Array.Copy (iv, 0, output, 0, iv.Length);
--                                      Array.Copy (encrypted, 0, output, iv.Length, encrypted.Length);
--                                      return output;
--                              }
--                      }
++#if NET_4_0
++                      return EncryptPassword (password, MembershipPasswordCompatibilityMode.Framework20);
++#else
++                      return helper.EncryptPassword (password);
++#endif
++              }
++#if NET_4_0
++              [MonoTODO ("Discover what actually is 4.0 password compatibility mode.")]
++              protected virtual byte[] EncryptPassword (byte[] password, MembershipPasswordCompatibilityMode legacyPasswordCompatibilityMode)
++              {
++                      if (helper == null)
++                              throw new PlatformNotSupportedException ("This method is not available.");
++
++                      if (legacyPasswordCompatibilityMode == MembershipPasswordCompatibilityMode.Framework40)
++                              throw new PlatformNotSupportedException ("Framework 4.0 password encryption mode is not supported at this time.");
++                      
++                      return helper.EncryptPassword (password);
                }
++#endif
        }
  }
--#endif
++
  
  
index d9d02bc2bdd197641ad0785b5d709db88bf0a270,d9d02bc2bdd197641ad0785b5d709db88bf0a270..71a8a1730fa8ba1d9d1ba75dacc9c0b630cf444e
  // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  //
--
--#if NET_2_0
  using System.Configuration.Provider;
++using System.Runtime.CompilerServices;
  
--namespace System.Web.Security {
--
++namespace System.Web.Security
++{
++#if NET_4_0
++      [TypeForwardedFrom ("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")]
++#endif
        public sealed class MembershipProviderCollection : ProviderCollection
        {
                public override void Add (ProviderBase provider)
@@@ -58,5 -58,5 +60,5 @@@
                }
        }
  }
--#endif
++
  
diff --cc mcs/class/System.Web/System.Web.Security/MembershipSortOptions.cs
index c170f51fbbfc0942a20145c972384b6d5a23ca0c,c170f51fbbfc0942a20145c972384b6d5a23ca0c..0000000000000000000000000000000000000000
deleted file mode 100644,100644
+++ /dev/null
@@@ -1,43 -1,43 +1,0 @@@
--//
--// System.Web.Security.MembershipSortOptions
--//
--// Authors:
--//    Ben Maurer (bmaurer@users.sourceforge.net)
--//
--// (C) 2003 Ben Maurer
--//
--
--//
--// Permission is hereby granted, free of charge, to any person obtaining
--// a copy of this software and associated documentation files (the
--// "Software"), to deal in the Software without restriction, including
--// without limitation the rights to use, copy, modify, merge, publish,
--// distribute, sublicense, and/or sell copies of the Software, and to
--// permit persons to whom the Software is furnished to do so, subject to
--// the following conditions:
--// 
--// The above copyright notice and this permission notice shall be
--// included in all copies or substantial portions of the Software.
--// 
--// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
--// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
--// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
--// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
--// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
--// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
--// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--//
--
--#if NET_2_0
--namespace System.Web.Security {
--      public enum MembershipSortOptions {
--              UserName = 0,
--              CreationDate = 1,
--              LastActivityDate = 2,
--              LastLoginDate = 3,
--              LastPasswordChangeDate = 4,
--              Email = 5               
--      }
--}
--#endif
--
index 598ecfeab4daf82590aa2c2635e9ecdaf812dd27,598ecfeab4daf82590aa2c2635e9ecdaf812dd27..b2bae459a52116303d52b0691a7ea04bf1f16b36
  // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  //
++using System;
++using System.Reflection;
++using System.Runtime.CompilerServices;
  
--#if NET_2_0
  namespace System.Web.Security
  {
++#if NET_4_0
++      [TypeForwardedFrom ("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")]
++#endif
        [Serializable]
        public class MembershipUser
        {
@@@ -47,7 -47,7 +52,7 @@@
                DateTime lastActivityDate;
                DateTime lastPasswordChangedDate;
                DateTime lastLockoutDate;
--              
++
                protected MembershipUser ()
                {
                }
                public virtual bool IsLockedOut {
                        get { return isLockedOut; }
                }
--              
--              public bool IsOnline {
++
++#if NET_4_0
++              public virtual
++#else
++              public
++#endif
++              bool IsOnline {
                        get {
--                              return LastActivityDate > DateTime.Now - TimeSpan.FromMinutes (Membership.UserIsOnlineTimeWindow);  
++                              int minutes;
++#if NET_4_0
++                              IMembershipHelper helper = MembershipProvider.Helper;
++                              if (helper == null)
++                                      throw new PlatformNotSupportedException ("The method is not available.");
++                              minutes = helper.UserIsOnlineTimeWindow;
++#else
++                              minutes = Membership.UserIsOnlineTimeWindow;
++#endif
++                              return LastActivityDate > DateTime.Now - TimeSpan.FromMinutes (minutes);
                        }
                }
                
                
                MembershipProvider Provider {
                        get {
--                              MembershipProvider p = Membership.Providers [ProviderName];
--                              if (p == null) throw new InvalidOperationException ("Membership provider '" + ProviderName + "' not found.");
++                              MembershipProvider p;                           
++#if NET_4_0
++                              IMembershipHelper helper = MembershipProvider.Helper;
++                              if (helper == null)
++                                      throw new PlatformNotSupportedException ("The method is not available.");
++                              p = helper.Providers [ProviderName];
++#else
++                              p = Membership.Providers [ProviderName];
++#endif
++                              if (p == null)
++                                      throw new InvalidOperationException ("Membership provider '" + ProviderName + "' not found.");
                                return p;
                        }
                }
        }
  }
--#endif
++
  
index 25cbb50365b7e04487d96827ebe27b11b572dbf9,25cbb50365b7e04487d96827ebe27b11b572dbf9..61d486345c393eb1cff95544ffecae1845b458e9
@@@ -5,7 -5,7 +5,7 @@@
  //    Ben Maurer (bmaurer@users.sourceforge.net)
  //
  // (C) 2003 Ben Maurer
--// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
++// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
  //
  // Permission is hereby granted, free of charge, to any person obtaining
  // a copy of this software and associated documentation files (the
  // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  //
  
--#if NET_2_0
  using System.Collections;
++using System.Runtime.CompilerServices;
  using System.Web.UI;
  
--namespace System.Web.Security {
--
++namespace System.Web.Security
++{
++#if NET_4_0
++      [TypeForwardedFrom ("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")]
++#endif
        [Serializable]
--      public sealed class MembershipUserCollection : ICollection {
--
++      public sealed class MembershipUserCollection : ICollection
++      {
                public MembershipUserCollection ()
                {
                }
                bool readOnly = false;
        }
  }
--#endif
++
  
index de47fb24798942e131e05c328cef09c92e5a44f5,de47fb24798942e131e05c328cef09c92e5a44f5..614077aae3750d6f8a704fa41c5f85adfe652743
  // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  //
  
--#if NET_2_0
++using System.Runtime.CompilerServices;
  
  namespace System.Web.Security
  {
++#if NET_4_0
++      [TypeForwardedFrom ("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")]
++#endif
        public delegate void MembershipValidatePasswordEventHandler (object sender, ValidatePasswordEventArgs e);
  }
  
--#endif
++
index 36d0211f0a2a9f5437d10c85b75e16b162261e25,36d0211f0a2a9f5437d10c85b75e16b162261e25..ed23ec7ba7938bd9b09b309293126a51ed09815e
@@@ -6,7 -6,7 +6,7 @@@
  //    Sebastien Pouliot  <sebastien@ximian.com>
  //
  // (C) 2003 Ben Maurer
--// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
++// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
  //
  // Permission is hereby granted, free of charge, to any person obtaining
  // a copy of this software and associated documentation files (the
@@@ -28,8 -28,8 +28,6 @@@
  // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  //
  
--#if NET_2_0
--
  using System.Collections.Specialized;
  using System.Security.Cryptography;
  using System.Security.Permissions;
@@@ -42,7 -42,7 +40,12 @@@ namespace System.Web.Security 
  
        [Serializable]
        [AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
--      public sealed class RolePrincipal : IPrincipal {
++#if NET_4_0
++      public
++#else
++      public sealed
++#endif
++      class RolePrincipal : IPrincipal {
  
                IIdentity _identity;
                bool _listChanged;
                }
        }
  }
--#endif
++
  
index 323252b57f86f5b368749857219587b28306c3dc,323252b57f86f5b368749857219587b28306c3dc..d7b9daeda25bb8006d99eab1c7e95b4c0961dec6
  // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  //
--
--#if NET_2_0
  using System.Configuration.Provider;
++using System.Runtime.CompilerServices;
  
  namespace System.Web.Security
  {
++#if NET_4_0
++      [TypeForwardedFrom ("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")]
++#endif
        public abstract class RoleProvider : ProviderBase
        {
                protected RoleProvider ()
@@@ -52,5 -52,5 +54,5 @@@
                public abstract string ApplicationName { get; set; }
        }
  }
--#endif
++
  
index e8778a48de3622a380fce9f7f25ba8008b150c50,e8778a48de3622a380fce9f7f25ba8008b150c50..5242a204a23a49c9a53724481f076cff34718344
@@@ -270,7 -270,7 +270,7 @@@ namespace System.Web.Security 
                        string passwordSalt = "";
  
                        RandomNumberGenerator rng = RandomNumberGenerator.Create ();
--                      byte [] salt = new byte [SALT_BYTES];
++                      byte [] salt = new byte [MembershipHelper.SALT_BYTES];
                        rng.GetBytes (salt);
                        passwordSalt = Convert.ToBase64String (salt);
  
index 717aa09e719983f7f8d829cc469bc5192b8045d0,717aa09e719983f7f8d829cc469bc5192b8045d0..f311585b849eeee433dc770506d6a9d1fbb06e7d
  // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  //
--
--#if NET_2_0
--
  using System;
++using System.Runtime.CompilerServices;
  
  namespace System.Web.Security
  {
++#if NET_4_0
++      [TypeForwardedFrom ("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")]
++#endif
        public sealed class ValidatePasswordEventArgs: EventArgs
        {
                bool cancel;
@@@ -73,4 -73,4 +74,3 @@@
        }
  }
  
--#endif
index e7a2942c9ce91b39d9c94da2695f292936d9f11b,e7a2942c9ce91b39d9c94da2695f292936d9f11b..5de0427d589af660ae998d0d3291606f6c660c2f
@@@ -1,3 -1,3 +1,7 @@@
++2010-04-28  Marek Habersack  <mhabersack@novell.com>
++
++      * KeyedList.cs: do not implement IStateManager in 4.0
++
  2010-04-12  Marek Habersack  <mhabersack@novell.com>
  
        * PageParser.cs: if EnableViewStateMac option is present in the
index 81ff557f76df9ef5a2e6b473cde834f35a4c810f,81ff557f76df9ef5a2e6b473cde834f35a4c810f..07daeb5f5038a58ab8ad7579bf07f8b885faa67b
@@@ -31,8 -31,8 +31,10 @@@ using System.Collections.Specialized
  
  namespace System.Web.UI
  {
--
--      internal class KeyedList : IOrderedDictionary, IStateManager
++      class KeyedList : IOrderedDictionary
++#if !NET_4_0
++      , IStateManager // why do we implement it at all?
++#endif
        {
  
                Hashtable objectTable = new Hashtable ();
                {
                        return new KeyedListEnumerator (objectList);
                }
--
++#if !NET_4_0
                void IStateManager.LoadViewState (object state)
                {
                        if (state != null)
                {
                        trackViewState = true;
                }
--
++#endif
                public int Count {
                        get { return objectList.Count; }
                }
                        get { return this; }
                }
  
++#if !NET_4_0
                bool trackViewState;
  
                bool IStateManager.IsTrackingViewState {
                        get { return trackViewState; }
                }
--
++#endif
                int IndexOf (object key)
                {
                        for (int i = 0; i < objectList.Count; i++)
index a33f91afb68a5f27b772568e8cd12987993ec370,a33f91afb68a5f27b772568e8cd12987993ec370..cc5fd2104d11bf9c9cc877044bddddb55491b95c
@@@ -413,18 -413,18 +413,8 @@@ System.Web.Security/FormsAuthentication
  System.Web.Security/FormsAuthenticationModule.cs
  System.Web.Security/FormsAuthenticationTicket.cs
  System.Web.Security/FormsIdentity.cs
--System.Web.Security/MembershipCreateStatus.cs
--System.Web.Security/MembershipCreateUserException.cs
  System.Web.Security/Membership.cs
--System.Web.Security/MembershipOnlineStatus.cs
--System.Web.Security/MembershipPasswordException.cs
--System.Web.Security/MembershipPasswordFormat.cs
--System.Web.Security/MembershipProviderCollection.cs
--System.Web.Security/MembershipProvider.cs
--System.Web.Security/MembershipSortOptions.cs
--System.Web.Security/MembershipUserCollection.cs
--System.Web.Security/MembershipUser.cs
--System.Web.Security/MembershipValidatePasswordEventHandler.cs
++System.Web.Security/MembershipHelper.cs
  System.Web.Security/PassportAuthenticationEventArgs.cs
  System.Web.Security/PassportAuthenticationEventHandler.cs
  System.Web.Security/PassportAuthenticationModule.cs
@@@ -434,14 -434,14 +424,12 @@@ System.Web.Security/RoleManagerEventHan
  System.Web.Security/RoleManagerModule.cs
  System.Web.Security/RolePrincipal.cs
  System.Web.Security/RoleProviderCollection.cs
--System.Web.Security/RoleProvider.cs
  System.Web.Security/Roles.cs
  System.Web.Security/SqliteMembershipProvider.cs
  System.Web.Security/SqliteRoleProvider.cs
  System.Web.Security/SqlMembershipProvider.cs
  System.Web.Security/SqlRoleProvider.cs
  System.Web.Security/UrlAuthorizationModule.cs
--System.Web.Security/ValidatePasswordEventArgs.cs
  System.Web.Security/WindowsAuthenticationEventArgs.cs
  System.Web.Security/WindowsAuthenticationEventHandler.cs
  System.Web.Security/WindowsAuthenticationModule.cs
@@@ -632,8 -632,8 +620,6 @@@ System.Web.UI/IUrlResolutionService.c
  System.Web.UI/IUserControlDesignerAccessor.cs
  System.Web.UI/IUserControlTypeResolutionService.cs
  System.Web.UI/IValidator.cs
--System.Web.UI/KeyedList.cs
--System.Web.UI/KeyedListEnumerator.cs
  System.Web.UI/ListSourceHelper.cs
  System.Web.UI/LiteralControl.cs
  System.Web.UI/LosFormatter.cs
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..74fbff458c9553520aba631a6e3e46e352537387
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,15 @@@
++#include System.Web.dll.sources
++
++System.Web.UI/KeyedList.cs
++System.Web.UI/KeyedListEnumerator.cs
++System.Web.Security/MembershipCreateStatus.cs
++System.Web.Security/MembershipCreateUserException.cs
++System.Web.Security/MembershipPasswordException.cs
++System.Web.Security/MembershipPasswordFormat.cs
++System.Web.Security/MembershipProviderCollection.cs
++System.Web.Security/MembershipProvider.cs
++System.Web.Security/MembershipUserCollection.cs
++System.Web.Security/MembershipUser.cs
++System.Web.Security/MembershipValidatePasswordEventHandler.cs
++System.Web.Security/RoleProvider.cs
++System.Web.Security/ValidatePasswordEventArgs.cs