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
- MemberMemberBinding.cs
- QuestionEventArgs.cs
- ToolCreatedEventArgs.cs
- SoapBinding.cs
- Imaging.cs
- LocalsItemDescription.cs
- TimeSpanConverter.cs
- SoapAttributes.cs
- baseaxisquery.cs
- ToolStripDropDownMenu.cs
- SerTrace.cs
- CfgRule.cs
- FileResponseElement.cs
- GPPOINT.cs
- HGlobalSafeHandle.cs
- ProfileInfo.cs
- CapiSafeHandles.cs
- TimeZoneNotFoundException.cs
- WorkflowOperationErrorHandler.cs
- XmlSchemaAnnotated.cs
- DragDeltaEventArgs.cs
- BorderGapMaskConverter.cs
- _NegotiateClient.cs
- BamlRecordReader.cs
- ParameterBuilder.cs
- ColorConvertedBitmapExtension.cs
- WebPartVerbsEventArgs.cs
- StorageEntityContainerMapping.cs
- GeneratedCodeAttribute.cs
- GridViewColumn.cs
- StateMachineHistory.cs
- TabControlDesigner.cs
- XPathQilFactory.cs
- XmlCharType.cs
- ImmutablePropertyDescriptorGridEntry.cs
- QilChoice.cs
- RuntimeConfigurationRecord.cs
- CacheHelper.cs
- ProviderCollection.cs
- ConfigurationValidatorAttribute.cs
- TdsParameterSetter.cs
- XPathException.cs
- WebPartChrome.cs
- RelationshipConstraintValidator.cs
- _TimerThread.cs
- ProcessStartInfo.cs
- GiveFeedbackEventArgs.cs
- TextEndOfLine.cs
- control.ime.cs
- DatePickerDateValidationErrorEventArgs.cs
- InfoCardCryptoHelper.cs
- PageContentCollection.cs
- AssertSection.cs
- UrlMapping.cs
- ContentPathSegment.cs
- SQLInt64Storage.cs
- TdsParser.cs
- indexingfiltermarshaler.cs
- InteropBitmapSource.cs
- DataGridViewLayoutData.cs
- StateFinalizationDesigner.cs
- CacheOutputQuery.cs
- TextProperties.cs
- FontUnitConverter.cs
- SignatureDescription.cs
- TypeLibConverter.cs
- LinqDataSourceDisposeEventArgs.cs
- UserControl.cs
- COM2PropertyPageUITypeConverter.cs
- UpdatePanelTrigger.cs
- MenuScrollingVisibilityConverter.cs
- BaseCodePageEncoding.cs
- RootBrowserWindowProxy.cs
- PerfService.cs
- SQLDateTime.cs
- LifetimeServices.cs
- Executor.cs
- PersonalizationStateQuery.cs
- RoutedUICommand.cs
- SystemNetworkInterface.cs
- CacheMemory.cs
- Font.cs
- SafeSecurityHelper.cs
- TraceSource.cs
- ManagedIStream.cs
- UnauthorizedWebPart.cs
- ComPlusServiceLoader.cs
- SQLGuidStorage.cs
- CompilationUtil.cs
- ButtonBase.cs
- ColorTranslator.cs
- GeometryGroup.cs
- DbProviderFactory.cs
- Int32CollectionConverter.cs
- DashStyles.cs
- DesignerForm.cs
- SimpleWorkerRequest.cs
- SecurityKeyIdentifier.cs
- ToolStripDropTargetManager.cs
- Drawing.cs