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
- BaseProcessProtocolHandler.cs
- Cloud.cs
- RuntimeConfigLKG.cs
- COM2PropertyPageUITypeConverter.cs
- UserCancellationException.cs
- ModuleConfigurationInfo.cs
- XmlDomTextWriter.cs
- HttpHandlersSection.cs
- XmlDigitalSignatureProcessor.cs
- WasEndpointConfigContainer.cs
- BooleanFunctions.cs
- EnumValidator.cs
- Triplet.cs
- SourceSwitch.cs
- RecommendedAsConfigurableAttribute.cs
- xsdvalidator.cs
- AuthenticationService.cs
- BaseCodePageEncoding.cs
- TabletDeviceInfo.cs
- FormatterServices.cs
- CharKeyFrameCollection.cs
- PackageRelationship.cs
- CultureInfoConverter.cs
- BitmapCodecInfoInternal.cs
- BuildProvider.cs
- XPathSelfQuery.cs
- XPathDocumentNavigator.cs
- Model3D.cs
- RegionIterator.cs
- WarningException.cs
- EventHandlerList.cs
- Rfc2898DeriveBytes.cs
- DataGridViewRowStateChangedEventArgs.cs
- WebConfigurationHostFileChange.cs
- OpCodes.cs
- ParameterCollection.cs
- MouseButtonEventArgs.cs
- SqlDataSourceAdvancedOptionsForm.cs
- ImageClickEventArgs.cs
- ButtonBaseAutomationPeer.cs
- IdentityModelDictionary.cs
- TypeInitializationException.cs
- WinFormsComponentEditor.cs
- BitmapSizeOptions.cs
- DetailsViewInsertEventArgs.cs
- TableCellsCollectionEditor.cs
- TransactionState.cs
- NotificationContext.cs
- ListViewPagedDataSource.cs
- SqlProcedureAttribute.cs
- TextProperties.cs
- PolyLineSegment.cs
- ITextView.cs
- CookieProtection.cs
- DataGridTextBoxColumn.cs
- Symbol.cs
- Vector3D.cs
- _FixedSizeReader.cs
- TextParentUndoUnit.cs
- WinEventHandler.cs
- SafeRightsManagementPubHandle.cs
- cookiecollection.cs
- ProtocolsConfigurationHandler.cs
- RecordManager.cs
- CommonProperties.cs
- MapPathBasedVirtualPathProvider.cs
- AffineTransform3D.cs
- ScriptResourceInfo.cs
- FontResourceCache.cs
- MethodCallExpression.cs
- ConfigXmlCDataSection.cs
- XmlConvert.cs
- FigureHelper.cs
- HtmlInputText.cs
- SymbolMethod.cs
- ChtmlCommandAdapter.cs
- Soap.cs
- CompositeActivityTypeDescriptor.cs
- InkCanvasSelectionAdorner.cs
- SHA1CryptoServiceProvider.cs
- Assembly.cs
- sitestring.cs
- XmlSchemaSubstitutionGroup.cs
- StorageScalarPropertyMapping.cs
- BidOverLoads.cs
- storepermissionattribute.cs
- FaultHandlingFilter.cs
- ValidateNames.cs
- WorkBatch.cs
- BitmapCacheBrush.cs
- TargetPerspective.cs
- CaseInsensitiveComparer.cs
- smtppermission.cs
- DbMetaDataCollectionNames.cs
- RegexCode.cs
- LongValidator.cs
- IgnoreFileBuildProvider.cs
- ObjectStateManagerMetadata.cs
- Helpers.cs
- PenLineJoinValidation.cs