Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / ndp / fx / src / xsp / System / Web / Extensions / Security / RoleService.cs / 1 / 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
- KeyEvent.cs
- ApplicationException.cs
- ColumnMapCopier.cs
- SiteMapSection.cs
- OdbcHandle.cs
- GridViewPageEventArgs.cs
- MimePart.cs
- ToolboxItemAttribute.cs
- NameValuePermission.cs
- DataObjectMethodAttribute.cs
- Calendar.cs
- PolicyValidationException.cs
- ParallelTimeline.cs
- IdentifierCollection.cs
- ButtonField.cs
- LiteralTextParser.cs
- TripleDES.cs
- SqlReferenceCollection.cs
- GradientStop.cs
- uribuilder.cs
- TreeNodeEventArgs.cs
- PeerName.cs
- SByteStorage.cs
- MarginCollapsingState.cs
- ProbeDuplexAsyncResult.cs
- ThreadAttributes.cs
- TrackingExtract.cs
- EventlogProvider.cs
- WindowsStatic.cs
- PathSegmentCollection.cs
- RuntimeHelpers.cs
- TransportChannelFactory.cs
- EntityModelSchemaGenerator.cs
- AttributeEmitter.cs
- mediaeventargs.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- ColorContext.cs
- MasterPageCodeDomTreeGenerator.cs
- IconBitmapDecoder.cs
- ListViewItem.cs
- Label.cs
- NameValueSectionHandler.cs
- MailSettingsSection.cs
- CustomWebEventKey.cs
- WorkflowElementDialog.cs
- AttachedAnnotationChangedEventArgs.cs
- LayoutEvent.cs
- ContractSearchPattern.cs
- Types.cs
- MergePropertyDescriptor.cs
- ParallelDesigner.cs
- NameValuePermission.cs
- WindowsListViewItemStartMenu.cs
- FrameworkElement.cs
- Token.cs
- GregorianCalendarHelper.cs
- Sql8ExpressionRewriter.cs
- ConfigXmlElement.cs
- PassportAuthenticationEventArgs.cs
- MsmqMessageProperty.cs
- OracleRowUpdatingEventArgs.cs
- SqlProcedureAttribute.cs
- StandardBindingOptionalReliableSessionElement.cs
- RemoteHelper.cs
- ScriptModule.cs
- SelectorItemAutomationPeer.cs
- LayoutEvent.cs
- ToolBarButtonClickEvent.cs
- PropertyFilter.cs
- CreateUserWizard.cs
- DisplayNameAttribute.cs
- OdbcTransaction.cs
- XmlText.cs
- ClientConfigurationHost.cs
- XmlWrappingReader.cs
- MessageSecurityTokenVersion.cs
- FolderBrowserDialog.cs
- PromptBuilder.cs
- ObjectAssociationEndMapping.cs
- XmlTypeAttribute.cs
- columnmapfactory.cs
- PerformanceCounterCategory.cs
- MultipleViewPatternIdentifiers.cs
- SmiTypedGetterSetter.cs
- ScrollBar.cs
- XPathScanner.cs
- SizeLimitedCache.cs
- VisualStyleRenderer.cs
- EditorPart.cs
- HttpGetServerProtocol.cs
- sortedlist.cs
- IdentitySection.cs
- WpfGeneratedKnownProperties.cs
- DependencySource.cs
- CssClassPropertyAttribute.cs
- TransformValueSerializer.cs
- OleDbDataAdapter.cs
- ThreadAttributes.cs
- EncoderNLS.cs
- TextEditorLists.cs