// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
using System;
using System.Web;
using System.Web.Configuration;
{
public static class ProfileManager
{
-#if TARGET_J2EE
- const string Profiles_config = "Profiles.config";
- const string Profiles_ProfileProviderCollection = "Profiles.ProfileProviderCollection";
- private static ProfileSection config
- {
- get
- {
- object o = AppDomain.CurrentDomain.GetData (Profiles_config);
- if (o == null) {
- config = (ProfileSection) WebConfigurationManager.GetSection ("system.web/profile");
- return (ProfileSection) config;
- }
-
- return (ProfileSection) o;
- }
- set
- {
- AppDomain.CurrentDomain.SetData (Profiles_config, value);
- }
- }
- private static ProfileProviderCollection providersCollection
- {
- get
- {
- object o = AppDomain.CurrentDomain.GetData (Profiles_ProfileProviderCollection);
- return (ProfileProviderCollection) o;
- }
- set
- {
- AppDomain.CurrentDomain.SetData (Profiles_ProfileProviderCollection, value);
- }
- }
-#else
- private static ProfileSection config;
- private static ProfileProviderCollection providersCollection;
+ static ProfileSection config;
+ static ProfileProviderCollection providersCollection;
static ProfileManager ()
{
config = (ProfileSection) WebConfigurationManager.GetSection ("system.web/profile");
}
-#endif
public static int DeleteInactiveProfiles (ProfileAuthenticationOption authenticationOption, DateTime userInactiveSinceDate)
{
}
}
- private static void CheckEnabled ()
+ static void CheckEnabled ()
{
if (!Enabled)
throw new Exception ("This feature is not enabled. To enable it, add <profile enabled=\"true\"> to your configuration file.");
}
}
-#endif