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
- NativeMethods.cs
- SqlRecordBuffer.cs
- StyleSheetComponentEditor.cs
- DataGridClipboardHelper.cs
- X509CertificateChain.cs
- ScriptingRoleServiceSection.cs
- ConnectionPoolManager.cs
- TdsParameterSetter.cs
- NameValueConfigurationCollection.cs
- UniqueIdentifierService.cs
- RequestCachingSection.cs
- DataBindingExpressionBuilder.cs
- AuthenticationModuleElementCollection.cs
- GroupDescription.cs
- CachingHintValidation.cs
- ToolStripStatusLabel.cs
- __ConsoleStream.cs
- ValidatingReaderNodeData.cs
- HwndSourceParameters.cs
- TraceSwitch.cs
- HttpServerUtilityBase.cs
- GridViewRowPresenter.cs
- SqlServices.cs
- LongValidatorAttribute.cs
- ErrorWrapper.cs
- ExtensibleClassFactory.cs
- AppDomainEvidenceFactory.cs
- ComponentSerializationService.cs
- EditingCoordinator.cs
- EditingScope.cs
- StaticTextPointer.cs
- TextBoxRenderer.cs
- MissingManifestResourceException.cs
- HttpCacheVaryByContentEncodings.cs
- EnumMemberAttribute.cs
- TypeSystem.cs
- DataListItemEventArgs.cs
- SafeNativeMethodsCLR.cs
- IListConverters.cs
- Error.cs
- SystemMulticastIPAddressInformation.cs
- UpdatePanelTrigger.cs
- ArrayList.cs
- BaseParagraph.cs
- NotSupportedException.cs
- SymmetricKey.cs
- TypeFieldSchema.cs
- ICspAsymmetricAlgorithm.cs
- AnnotationService.cs
- ControlPropertyNameConverter.cs
- CmsInterop.cs
- LinearKeyFrames.cs
- TextFormattingConverter.cs
- Empty.cs
- KeyInfo.cs
- ToolStripPanelRenderEventArgs.cs
- BinaryMessageFormatter.cs
- OleDbConnectionInternal.cs
- EventsTab.cs
- Highlights.cs
- SimpleBitVector32.cs
- WindowsStatic.cs
- VectorCollection.cs
- AnnotationDocumentPaginator.cs
- ModuleElement.cs
- FixedHighlight.cs
- StatusBarDesigner.cs
- HttpCachePolicyElement.cs
- URL.cs
- DateTimeStorage.cs
- BooleanFunctions.cs
- JournalNavigationScope.cs
- ProvidePropertyAttribute.cs
- MemberAccessException.cs
- GenericNameHandler.cs
- ParameterCollection.cs
- ping.cs
- _SslSessionsCache.cs
- AbsoluteQuery.cs
- Token.cs
- EncoderFallback.cs
- initElementDictionary.cs
- METAHEADER.cs
- ControlBuilderAttribute.cs
- EllipseGeometry.cs
- ThreadExceptionDialog.cs
- DefaultPrintController.cs
- WindowsUserNameSecurityTokenAuthenticator.cs
- ContractType.cs
- XmlReflectionMember.cs
- BuildDependencySet.cs
- EntityDataSourceDesignerHelper.cs
- DocumentEventArgs.cs
- DataGridSortCommandEventArgs.cs
- WindowsFormsHostPropertyMap.cs
- HtmlTable.cs
- RootBrowserWindow.cs
- ScriptModule.cs
- HGlobalSafeHandle.cs
- filewebrequest.cs