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
- FlowDocumentPage.cs
- RootBrowserWindow.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- regiisutil.cs
- ResourcePart.cs
- OLEDB_Util.cs
- ArgumentFixer.cs
- MessagingActivityHelper.cs
- ParenthesizePropertyNameAttribute.cs
- DataPagerFieldCommandEventArgs.cs
- EntityDesignerDataSourceView.cs
- FtpCachePolicyElement.cs
- XhtmlTextWriter.cs
- DrawingAttributeSerializer.cs
- Expression.cs
- NativeCppClassAttribute.cs
- AspNetSynchronizationContext.cs
- ThrowHelper.cs
- Duration.cs
- RelationshipNavigation.cs
- ToolStripContentPanel.cs
- DataSourceViewSchemaConverter.cs
- SqlBuffer.cs
- CompModSwitches.cs
- LoginCancelEventArgs.cs
- ToolStripOverflowButton.cs
- AnonymousIdentificationModule.cs
- Thread.cs
- WebPartDisplayModeEventArgs.cs
- PageCatalogPart.cs
- RefreshPropertiesAttribute.cs
- TreeWalkHelper.cs
- DriveInfo.cs
- TemplatePartAttribute.cs
- SpeechSeg.cs
- Inflater.cs
- PageVisual.cs
- StringExpressionSet.cs
- TemplatePartAttribute.cs
- BaseServiceProvider.cs
- IsolatedStorageFile.cs
- ToggleProviderWrapper.cs
- _SpnDictionary.cs
- ValueTypeFieldReference.cs
- NominalTypeEliminator.cs
- HeaderedContentControl.cs
- X509CertificateValidationMode.cs
- PropertyGridEditorPart.cs
- SqlProviderServices.cs
- HandleExceptionArgs.cs
- ReliableChannelBinder.cs
- IResourceProvider.cs
- CollectionsUtil.cs
- X509Chain.cs
- DbTransaction.cs
- DefaultEventAttribute.cs
- DrawingState.cs
- SecurityElement.cs
- UIElement.cs
- MetadataArtifactLoaderFile.cs
- AxHost.cs
- SkinBuilder.cs
- ServiceDiscoveryElement.cs
- DataGridViewCellValidatingEventArgs.cs
- ASCIIEncoding.cs
- NativeWrapper.cs
- HttpModuleCollection.cs
- XamlStyleSerializer.cs
- FontDifferentiator.cs
- filewebresponse.cs
- NetMsmqSecurity.cs
- BypassElement.cs
- ObjectSet.cs
- TextElementCollection.cs
- GenericUriParser.cs
- DbCommandTree.cs
- ISAPIWorkerRequest.cs
- shaperfactory.cs
- DataGridRelationshipRow.cs
- CultureInfoConverter.cs
- AdjustableArrowCap.cs
- FloaterParaClient.cs
- WebServicesInteroperability.cs
- LineMetrics.cs
- Axis.cs
- WebBrowserUriTypeConverter.cs
- ListViewInsertionMark.cs
- SmtpLoginAuthenticationModule.cs
- _TLSstream.cs
- OutputScopeManager.cs
- SoapReflectionImporter.cs
- DataGridViewIntLinkedList.cs
- DataGridSortCommandEventArgs.cs
- GenericEnumerator.cs
- UiaCoreApi.cs
- QuotaExceededException.cs
- ConnectionStringsSection.cs
- HyperLinkField.cs
- DataSetUtil.cs
- HttpTransportElement.cs