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
- ColumnWidthChangingEvent.cs
- NaturalLanguageHyphenator.cs
- KeyManager.cs
- ECDiffieHellmanCng.cs
- LinearKeyFrames.cs
- Byte.cs
- InplaceBitmapMetadataWriter.cs
- DiffuseMaterial.cs
- TextFragmentEngine.cs
- ReliabilityContractAttribute.cs
- DSASignatureDeformatter.cs
- XmlValidatingReaderImpl.cs
- Merger.cs
- AutomationElementIdentifiers.cs
- Icon.cs
- PointLight.cs
- CacheChildrenQuery.cs
- StatusBar.cs
- ConfigurationProperty.cs
- MyContact.cs
- recordstatefactory.cs
- XhtmlBasicPhoneCallAdapter.cs
- RSAOAEPKeyExchangeFormatter.cs
- BoundColumn.cs
- NamespaceQuery.cs
- PropertyGrid.cs
- CombinedHttpChannel.cs
- Application.cs
- newinstructionaction.cs
- StateMachine.cs
- WorkItem.cs
- recordstatescratchpad.cs
- Fault.cs
- CommandCollectionEditor.cs
- Viewport3DAutomationPeer.cs
- BulletedListEventArgs.cs
- DbgUtil.cs
- RequestQueue.cs
- XPathDocumentBuilder.cs
- SByte.cs
- Quad.cs
- Baml6Assembly.cs
- WebPartDisplayMode.cs
- SqlCommandSet.cs
- Sql8ExpressionRewriter.cs
- EventToken.cs
- MachineKeySection.cs
- ADRoleFactoryConfiguration.cs
- ImportOptions.cs
- InvokeHandlers.cs
- CodeTypeReferenceExpression.cs
- HtmlAnchor.cs
- TemplateKeyConverter.cs
- ControlAdapter.cs
- OpCodes.cs
- IISUnsafeMethods.cs
- HealthMonitoringSectionHelper.cs
- PrefixHandle.cs
- JsonQNameDataContract.cs
- SerTrace.cs
- oledbconnectionstring.cs
- DataBoundLiteralControl.cs
- SerializationHelper.cs
- SystemWebExtensionsSectionGroup.cs
- DynamicPropertyHolder.cs
- TreeViewHitTestInfo.cs
- DecimalAverageAggregationOperator.cs
- _TransmitFileOverlappedAsyncResult.cs
- EntitySqlQueryCacheEntry.cs
- StubHelpers.cs
- CodeTypeDelegate.cs
- CompleteWizardStep.cs
- InternalsVisibleToAttribute.cs
- XmlSchema.cs
- Internal.cs
- IntegerValidator.cs
- ParameterCollection.cs
- ToolStripDropTargetManager.cs
- WorkflowPageSetupDialog.cs
- EntityClassGenerator.cs
- HotSpot.cs
- ObjectDataSourceFilteringEventArgs.cs
- IIS7UserPrincipal.cs
- DBDataPermission.cs
- ExpandedWrapper.cs
- MSAANativeProvider.cs
- WebPartTransformerCollection.cs
- ActivationServices.cs
- WorkflowPageSetupDialog.cs
- RecognitionResult.cs
- BitmapEffectState.cs
- TypeConverter.cs
- FileLogRecord.cs
- RowCache.cs
- AuthorizationSection.cs
- CatalogZoneAutoFormat.cs
- UIElementParaClient.cs
- XPathNavigatorKeyComparer.cs
- IRCollection.cs
- WindowVisualStateTracker.cs