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
- WebBrowserHelper.cs
- SafeCryptContextHandle.cs
- Html32TextWriter.cs
- RtfToXamlReader.cs
- ThemeConfigurationDialog.cs
- ErrorLog.cs
- RSAPKCS1SignatureFormatter.cs
- XmlDesignerDataSourceView.cs
- StylusEventArgs.cs
- RawKeyboardInputReport.cs
- FileDocument.cs
- XamlNamespaceHelper.cs
- codemethodreferenceexpression.cs
- Delegate.cs
- Compiler.cs
- AssociativeAggregationOperator.cs
- ControlBuilderAttribute.cs
- DES.cs
- HandlerWithFactory.cs
- Label.cs
- RootBrowserWindow.cs
- DataFormat.cs
- Inflater.cs
- CatalogZoneDesigner.cs
- CheckBoxStandardAdapter.cs
- Canvas.cs
- CssTextWriter.cs
- RadioButton.cs
- StreamedFramingRequestChannel.cs
- StylusEditingBehavior.cs
- ThousandthOfEmRealPoints.cs
- HostingEnvironmentException.cs
- ComplexTypeEmitter.cs
- WaitForChangedResult.cs
- ContextProperty.cs
- CryptographicAttribute.cs
- RowTypePropertyElement.cs
- ImageSourceConverter.cs
- mediaeventargs.cs
- indexingfiltermarshaler.cs
- InternalTypeHelper.cs
- SafeLibraryHandle.cs
- DateTimeUtil.cs
- PathFigureCollectionConverter.cs
- TemplateKey.cs
- XmlTextAttribute.cs
- ConfigurationManagerHelperFactory.cs
- AsyncOperationContext.cs
- AlternationConverter.cs
- ProfilePropertyMetadata.cs
- ProtocolsSection.cs
- XmlSchemaSimpleTypeUnion.cs
- ToolTipService.cs
- SqlCacheDependencyDatabase.cs
- EntityClientCacheEntry.cs
- LateBoundBitmapDecoder.cs
- MetadataPropertyvalue.cs
- CommandLineParser.cs
- FileDialogPermission.cs
- XmlJsonReader.cs
- ScriptReferenceBase.cs
- LinkLabel.cs
- ComponentCollection.cs
- ContentElement.cs
- HorizontalAlignConverter.cs
- BooleanToVisibilityConverter.cs
- KnownBoxes.cs
- DesignerForm.cs
- Triplet.cs
- SqlParameterizer.cs
- StylusDownEventArgs.cs
- StorageConditionPropertyMapping.cs
- XmlReflectionImporter.cs
- SystemColorTracker.cs
- PersonalizationStateInfoCollection.cs
- WriteStateInfoBase.cs
- BrowserTree.cs
- CodeDOMProvider.cs
- DocumentSequence.cs
- dsa.cs
- SelectionItemPatternIdentifiers.cs
- HMACSHA384.cs
- ConvertEvent.cs
- SemanticAnalyzer.cs
- HttpCapabilitiesBase.cs
- Coordinator.cs
- WindowShowOrOpenTracker.cs
- GeneralTransform3DTo2DTo3D.cs
- IPGlobalProperties.cs
- printdlgexmarshaler.cs
- SelectionUIService.cs
- ObjRef.cs
- EmissiveMaterial.cs
- UserControlParser.cs
- CqlParserHelpers.cs
- PagesSection.cs
- ParagraphResult.cs
- TabItem.cs
- MatrixAnimationUsingPath.cs
- PersonalizableAttribute.cs