Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- ArrangedElement.cs
- DBCSCodePageEncoding.cs
- DataBindingList.cs
- PrefixQName.cs
- graph.cs
- ScrollPattern.cs
- NameValuePermission.cs
- ResponseBodyWriter.cs
- CodeExporter.cs
- DataAdapter.cs
- Constant.cs
- JavaScriptObjectDeserializer.cs
- PhysicalOps.cs
- ETagAttribute.cs
- Registry.cs
- XmlTypeMapping.cs
- Vector.cs
- PointCollectionConverter.cs
- CompilerTypeWithParams.cs
- Floater.cs
- XsltException.cs
- UIElementCollection.cs
- Size3DConverter.cs
- EventHandlerList.cs
- RawStylusInput.cs
- TheQuery.cs
- BaseHashHelper.cs
- RelatedImageListAttribute.cs
- CompiledQuery.cs
- CatalogPart.cs
- ProtocolsConfiguration.cs
- SimpleTypeResolver.cs
- ManifestSignatureInformation.cs
- Reference.cs
- Soap.cs
- CollectionsUtil.cs
- Int16Storage.cs
- SecurityTokenProvider.cs
- PassportAuthenticationEventArgs.cs
- FaultFormatter.cs
- DisplayNameAttribute.cs
- TemplateLookupAction.cs
- XpsImageSerializationService.cs
- MiniCustomAttributeInfo.cs
- COM2TypeInfoProcessor.cs
- DeviceFiltersSection.cs
- DataException.cs
- QilPatternVisitor.cs
- SafeThemeHandle.cs
- QueryRewriter.cs
- SecurityUniqueId.cs
- TabPanel.cs
- SystemMulticastIPAddressInformation.cs
- UrlPath.cs
- QuaternionAnimationUsingKeyFrames.cs
- Helpers.cs
- UnhandledExceptionEventArgs.cs
- BreakRecordTable.cs
- UserMapPath.cs
- ModelUIElement3D.cs
- WebContext.cs
- PageAdapter.cs
- BeginSelectCardRequest.cs
- ProjectionPath.cs
- DiscoveryDocumentLinksPattern.cs
- HTMLTextWriter.cs
- DataObjectFieldAttribute.cs
- DefaultProfileManager.cs
- Exceptions.cs
- EntityStoreSchemaGenerator.cs
- AmbientLight.cs
- DataGridViewHitTestInfo.cs
- activationcontext.cs
- EditCommandColumn.cs
- ListViewSelectEventArgs.cs
- Canvas.cs
- CredentialCache.cs
- ImageEditor.cs
- StructuredProperty.cs
- MenuAutomationPeer.cs
- GridViewAutomationPeer.cs
- DiffuseMaterial.cs
- RuntimeUtils.cs
- DocumentsTrace.cs
- ClientProtocol.cs
- OdbcConnectionHandle.cs
- RoutedPropertyChangedEventArgs.cs
- ScrollPattern.cs
- UnsafeNativeMethods.cs
- PermissionSetEnumerator.cs
- SpanIndex.cs
- NetworkInterface.cs
- SqlFunctionAttribute.cs
- ToolStripLocationCancelEventArgs.cs
- AttachInfo.cs
- PaperSize.cs
- SoapIncludeAttribute.cs
- ThrowHelper.cs
- Int64Converter.cs
- XmlSerializerVersionAttribute.cs