Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- ImageListUtils.cs
- TextEditorSelection.cs
- JsonByteArrayDataContract.cs
- StatusBarDesigner.cs
- ITextView.cs
- BamlLocalizableResourceKey.cs
- ScriptMethodAttribute.cs
- MetadataSource.cs
- String.cs
- XmlComment.cs
- LockCookie.cs
- PtsContext.cs
- NotSupportedException.cs
- AvtEvent.cs
- CommandTreeTypeHelper.cs
- CqlWriter.cs
- XmlCharCheckingWriter.cs
- XPathParser.cs
- XmlTypeAttribute.cs
- HighlightComponent.cs
- ValidationService.cs
- Int32Rect.cs
- TextBoxAutoCompleteSourceConverter.cs
- CodeTypeDeclaration.cs
- SqlReferenceCollection.cs
- ReferenceConverter.cs
- ObjectStateEntryDbDataRecord.cs
- SessionEndingEventArgs.cs
- RoutedEventHandlerInfo.cs
- HttpApplication.cs
- UnsafeNetInfoNativeMethods.cs
- TiffBitmapDecoder.cs
- ProgressChangedEventArgs.cs
- FileCodeGroup.cs
- RawStylusActions.cs
- XmlQueryTypeFactory.cs
- EqualityArray.cs
- RegularExpressionValidator.cs
- ThemeDirectoryCompiler.cs
- DesignerLinkAdapter.cs
- ServiceRoute.cs
- DataGridViewHitTestInfo.cs
- ToolStripItemImageRenderEventArgs.cs
- Translator.cs
- AffineTransform3D.cs
- AddressingVersion.cs
- FunctionDetailsReader.cs
- RouteParametersHelper.cs
- EntitySetRetriever.cs
- ConfigurationSchemaErrors.cs
- StorageMappingItemCollection.cs
- XmlWrappingReader.cs
- XmlExtensionFunction.cs
- DataRecordObjectView.cs
- StylusCaptureWithinProperty.cs
- CfgSemanticTag.cs
- AdjustableArrowCap.cs
- ItemList.cs
- SortedDictionary.cs
- FormatterServices.cs
- SetterBase.cs
- UnsafeNativeMethods.cs
- ExtensionWindowResizeGrip.cs
- ColumnBinding.cs
- Membership.cs
- NameGenerator.cs
- BitmapEncoder.cs
- VirtualPathUtility.cs
- CheckBoxPopupAdapter.cs
- TcpConnectionPoolSettingsElement.cs
- Console.cs
- ExternalCalls.cs
- PagerSettings.cs
- LiteralControl.cs
- QilUnary.cs
- SchemaImporterExtension.cs
- ModelItem.cs
- ZipIOExtraFieldZip64Element.cs
- IsolationInterop.cs
- InternalConfigEventArgs.cs
- TreeNode.cs
- ADMembershipUser.cs
- TextSegment.cs
- RawStylusSystemGestureInputReport.cs
- OracleParameter.cs
- FeatureManager.cs
- FrameworkElement.cs
- SchemaNames.cs
- CodeVariableReferenceExpression.cs
- ColumnPropertiesGroup.cs
- WorkflowViewElement.cs
- HtmlFormAdapter.cs
- SapiRecoInterop.cs
- MD5.cs
- ErrorRuntimeConfig.cs
- UniqueEventHelper.cs
- RowsCopiedEventArgs.cs
- ButtonBase.cs
- SqlMetaData.cs
- TypeForwardedToAttribute.cs