Code:
/ DotNET / DotNET / 8.0 / untmp / Orcas / RTM / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- _AutoWebProxyScriptEngine.cs
- MimeMapping.cs
- UIntPtr.cs
- ClientConfigPaths.cs
- TextTreeUndoUnit.cs
- RuntimeHelpers.cs
- Slider.cs
- IgnoreSectionHandler.cs
- MethodToken.cs
- PolyLineSegment.cs
- Int16AnimationUsingKeyFrames.cs
- WCFBuildProvider.cs
- XmlCDATASection.cs
- LockedAssemblyCache.cs
- MultiPageTextView.cs
- ColorAnimation.cs
- CompilerState.cs
- SimplePropertyEntry.cs
- RuntimeConfigLKG.cs
- TranslateTransform.cs
- CodeDirectionExpression.cs
- GridItemPattern.cs
- HandlerBase.cs
- DropShadowBitmapEffect.cs
- SingleQueryOperator.cs
- WCFServiceClientProxyGenerator.cs
- Column.cs
- WsdlInspector.cs
- AnchoredBlock.cs
- TextSerializer.cs
- CollectionConverter.cs
- UriTemplateCompoundPathSegment.cs
- TransformProviderWrapper.cs
- ComIntegrationManifestGenerator.cs
- Exceptions.cs
- CodeAttributeArgumentCollection.cs
- CheckBoxFlatAdapter.cs
- HashHelper.cs
- StreamWithDictionary.cs
- AccessibilityHelperForVista.cs
- SettingsBindableAttribute.cs
- WaitHandleCannotBeOpenedException.cs
- Soap11ServerProtocol.cs
- Transaction.cs
- RayHitTestParameters.cs
- XmlSchemaAttributeGroup.cs
- SchemaDeclBase.cs
- EventEntry.cs
- XPathNavigator.cs
- httpstaticobjectscollection.cs
- Expression.cs
- ProgressBar.cs
- TraceLevelHelper.cs
- MarshalDirectiveException.cs
- ResourcePermissionBase.cs
- TextDecorationCollection.cs
- Match.cs
- _SpnDictionary.cs
- Root.cs
- AnnotationAuthorChangedEventArgs.cs
- CryptographicAttribute.cs
- RootCodeDomSerializer.cs
- arc.cs
- WmlLinkAdapter.cs
- XmlNamespaceManager.cs
- Keyboard.cs
- SimplePropertyEntry.cs
- ToolStripPanelDesigner.cs
- XPathNavigatorReader.cs
- CheckBox.cs
- TypeBrowserDialog.cs
- DataGridCell.cs
- HitTestFilterBehavior.cs
- DataSourceExpression.cs
- NumericExpr.cs
- WebResourceAttribute.cs
- CngAlgorithmGroup.cs
- CalendarTable.cs
- SystemMulticastIPAddressInformation.cs
- BlurBitmapEffect.cs
- EventDescriptor.cs
- PrintEvent.cs
- ProjectionPlanCompiler.cs
- VisualTreeUtils.cs
- SubclassTypeValidator.cs
- TextEncodedRawTextWriter.cs
- TypedDataSetSchemaImporterExtensionFx35.cs
- HttpResponseInternalWrapper.cs
- LazyInitializer.cs
- DataTemplate.cs
- InheritanceContextChangedEventManager.cs
- AnimationClock.cs
- SqlUtil.cs
- WebBrowserProgressChangedEventHandler.cs
- Panel.cs
- PostBackOptions.cs
- StyleSelector.cs
- ChannelTracker.cs
- EventHandlersStore.cs
- ContentFileHelper.cs