Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Extensions / Security / RoleService.cs / 1305376 / RoleService.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.Security { using System; using System.Web.ApplicationServices; using System.Web.Script.Services; using System.Web.Services; [ScriptService] internal sealed class RoleService { [WebMethod] public string[] GetRolesForCurrentUser(){ ApplicationServiceHelper.EnsureRoleServiceEnabled(); return Roles.GetRolesForUser(); } [WebMethod] public bool IsCurrentUserInRole(string role) { if (role == null) { throw new ArgumentNullException("role"); } ApplicationServiceHelper.EnsureRoleServiceEnabled(); return Roles.IsUserInRole(role); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.Security { using System; using System.Web.ApplicationServices; using System.Web.Script.Services; using System.Web.Services; [ScriptService] internal sealed class RoleService { [WebMethod] public string[] GetRolesForCurrentUser(){ ApplicationServiceHelper.EnsureRoleServiceEnabled(); return Roles.GetRolesForUser(); } [WebMethod] public bool IsCurrentUserInRole(string role) { if (role == null) { throw new ArgumentNullException("role"); } ApplicationServiceHelper.EnsureRoleServiceEnabled(); return Roles.IsUserInRole(role); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- FixedPosition.cs
- HtmlControlPersistable.cs
- MexNamedPipeBindingElement.cs
- MdiWindowListStrip.cs
- DefaultBindingPropertyAttribute.cs
- CodeTypeMember.cs
- SliderAutomationPeer.cs
- WsrmFault.cs
- _NegotiateClient.cs
- OptimizedTemplateContent.cs
- coordinatorfactory.cs
- HtmlTitle.cs
- Selector.cs
- precedingsibling.cs
- XmlSchemaSequence.cs
- BuildProviderAppliesToAttribute.cs
- ResourcesChangeInfo.cs
- AsymmetricAlgorithm.cs
- controlskin.cs
- XmlCharCheckingWriter.cs
- BindingSource.cs
- PingOptions.cs
- TypeSystem.cs
- DependsOnAttribute.cs
- DSASignatureDeformatter.cs
- UpWmlPageAdapter.cs
- InfiniteTimeSpanConverter.cs
- ToolBarButtonClickEvent.cs
- ValueTable.cs
- QuaternionAnimationUsingKeyFrames.cs
- SQLSingle.cs
- SingleStorage.cs
- XamlSerializerUtil.cs
- MultiTouchSystemGestureLogic.cs
- PermissionListSet.cs
- InvokeGenerator.cs
- ClientEndpointLoader.cs
- ScopelessEnumAttribute.cs
- PropertyIdentifier.cs
- PanelContainerDesigner.cs
- EventDescriptorCollection.cs
- userdatakeys.cs
- XamlBrushSerializer.cs
- IndicCharClassifier.cs
- StorageSetMapping.cs
- CollectionBuilder.cs
- ISFTagAndGuidCache.cs
- EdmError.cs
- MdiWindowListStrip.cs
- mediaeventshelper.cs
- UserControl.cs
- SystemWebSectionGroup.cs
- input.cs
- SignatureDescription.cs
- SafeNativeMethods.cs
- XmlEventCache.cs
- Point3DAnimationUsingKeyFrames.cs
- DeferredRunTextReference.cs
- OledbConnectionStringbuilder.cs
- ExtendedProtectionPolicyElement.cs
- RepeaterItemCollection.cs
- AsyncOperationLifetimeManager.cs
- CombinedGeometry.cs
- CollectionViewProxy.cs
- Attributes.cs
- TextAction.cs
- SystemInformation.cs
- SecurityContext.cs
- DependencyPropertyHelper.cs
- TaskHelper.cs
- SecurityException.cs
- InputDevice.cs
- FlowLayoutSettings.cs
- RoleManagerModule.cs
- SecurityCriticalDataForSet.cs
- EncoderBestFitFallback.cs
- DocumentPageViewAutomationPeer.cs
- SmtpFailedRecipientException.cs
- StreamUpgradeInitiator.cs
- ValidationHelpers.cs
- WebControlParameterProxy.cs
- XsltFunctions.cs
- DynamicResourceExtensionConverter.cs
- DetailsViewInsertEventArgs.cs
- ServiceReference.cs
- ApplicationContext.cs
- LinqDataView.cs
- MimeBasePart.cs
- SubpageParaClient.cs
- SchemaMapping.cs
- RunWorkerCompletedEventArgs.cs
- DriveNotFoundException.cs
- Pair.cs
- PrintDialogException.cs
- PackageProperties.cs
- ToolBar.cs
- SHA256.cs
- BinaryWriter.cs
- EndpointInfo.cs
- MatchNoneMessageFilter.cs