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
- WeakEventManager.cs
- KerberosSecurityTokenAuthenticator.cs
- EpmContentSerializerBase.cs
- DataRecordInternal.cs
- webclient.cs
- DataSourceHelper.cs
- SoapRpcServiceAttribute.cs
- XmlAnyElementAttributes.cs
- StringToken.cs
- SchemaElementDecl.cs
- TextProperties.cs
- Inline.cs
- PropertyDescriptorCollection.cs
- ClassImporter.cs
- SQLDateTimeStorage.cs
- NativeStructs.cs
- HttpConfigurationContext.cs
- XmlRootAttribute.cs
- SQLBytesStorage.cs
- ProfileProvider.cs
- C14NUtil.cs
- ScrollBar.cs
- DataGridViewEditingControlShowingEventArgs.cs
- FileDialogPermission.cs
- SudsCommon.cs
- DetailsViewModeEventArgs.cs
- SmiConnection.cs
- DbConnectionOptions.cs
- WebMethodAttribute.cs
- DBAsyncResult.cs
- XmlSchemas.cs
- MeshGeometry3D.cs
- Encoding.cs
- OpenTypeCommon.cs
- RadioButtonFlatAdapter.cs
- PathFigure.cs
- NestPullup.cs
- EventLogPermission.cs
- EntityTypeBase.cs
- ServiceDeploymentInfo.cs
- EdmProviderManifest.cs
- VisualBasicExpressionConverter.cs
- BufferedOutputAsyncStream.cs
- ApplicationId.cs
- ToolStripContentPanelRenderEventArgs.cs
- SelectionWordBreaker.cs
- EmptyCollection.cs
- GenericsNotImplementedException.cs
- SaveFileDialog.cs
- Oid.cs
- ConfigurationLockCollection.cs
- ContainerUIElement3D.cs
- ErrorsHelper.cs
- UrlParameterReader.cs
- MatrixCamera.cs
- COSERVERINFO.cs
- TransactionBridge.cs
- MemoryRecordBuffer.cs
- DataShape.cs
- SqlFacetAttribute.cs
- PreservationFileWriter.cs
- DesignerPerfEventProvider.cs
- SecurityCapabilities.cs
- IDReferencePropertyAttribute.cs
- TreeWalker.cs
- IPipelineRuntime.cs
- HtmlCommandAdapter.cs
- SimpleTypesSurrogate.cs
- ConfigPathUtility.cs
- PrintPreviewDialog.cs
- ToggleProviderWrapper.cs
- WsatTransactionInfo.cs
- UnionExpr.cs
- CharacterHit.cs
- DateTime.cs
- GatewayDefinition.cs
- SmtpSection.cs
- SplitterPanel.cs
- XPathNodePointer.cs
- WebPartZoneCollection.cs
- PhysicalOps.cs
- MenuRenderer.cs
- DBDataPermissionAttribute.cs
- SubMenuStyle.cs
- CodeTypeReferenceExpression.cs
- ControlParameter.cs
- DataError.cs
- UnsafeNativeMethods.cs
- ModulesEntry.cs
- SuppressIldasmAttribute.cs
- QueryExpression.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- StreamGeometry.cs
- PackagingUtilities.cs
- MainMenu.cs
- DispatchChannelSink.cs
- TextBlock.cs
- SafeReversePInvokeHandle.cs
- WindowsTreeView.cs
- IntSecurity.cs