Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- DbProviderSpecificTypePropertyAttribute.cs
- Timer.cs
- ProfilePropertySettingsCollection.cs
- ParagraphResult.cs
- SynchronizationFilter.cs
- SqlConnectionHelper.cs
- CodeChecksumPragma.cs
- HttpFormatExtensions.cs
- GacUtil.cs
- Avt.cs
- DocumentOutline.cs
- HostedHttpTransportManager.cs
- XslAst.cs
- AccessorTable.cs
- DataObject.cs
- TextContainer.cs
- FixedFindEngine.cs
- HttpWrapper.cs
- BuildProviderAppliesToAttribute.cs
- HorizontalAlignConverter.cs
- DbConnectionHelper.cs
- StateMachineWorkflowInstance.cs
- SchemaImporterExtensionsSection.cs
- LinkedResourceCollection.cs
- StyleTypedPropertyAttribute.cs
- CallbackCorrelationInitializer.cs
- Screen.cs
- Configuration.cs
- CopyNamespacesAction.cs
- BitStack.cs
- ScrollBarAutomationPeer.cs
- WebServicesDescriptionAttribute.cs
- WindowsToolbarAsMenu.cs
- ProfileService.cs
- CompModSwitches.cs
- SecureUICommand.cs
- UIElement3DAutomationPeer.cs
- Encoder.cs
- HtmlForm.cs
- DataGridView.cs
- LinkUtilities.cs
- InputBuffer.cs
- MachinePropertyVariants.cs
- CapacityStreamGeometryContext.cs
- MemberCollection.cs
- BuildResult.cs
- CompilerInfo.cs
- FormattedText.cs
- UICuesEvent.cs
- sqlpipe.cs
- TypeDescriptionProviderAttribute.cs
- Library.cs
- X509Chain.cs
- Event.cs
- Source.cs
- AttachedPropertiesService.cs
- wmiprovider.cs
- XmlSchemaNotation.cs
- RuleSettingsCollection.cs
- RowToFieldTransformer.cs
- AsymmetricSecurityBindingElement.cs
- ChtmlTextWriter.cs
- SmtpMail.cs
- AspNetCompatibilityRequirementsAttribute.cs
- CssStyleCollection.cs
- ipaddressinformationcollection.cs
- SSmlParser.cs
- FunctionImportElement.cs
- XmlMembersMapping.cs
- KeyGestureValueSerializer.cs
- StrokeNodeOperations.cs
- TransformDescriptor.cs
- NameValueFileSectionHandler.cs
- Single.cs
- FormViewInsertEventArgs.cs
- ViewPort3D.cs
- ApplicationException.cs
- WebPartCollection.cs
- NullableDoubleMinMaxAggregationOperator.cs
- TextFormatterHost.cs
- RecordsAffectedEventArgs.cs
- Closure.cs
- InputEventArgs.cs
- DataGridViewRowPostPaintEventArgs.cs
- HttpClientCredentialType.cs
- HyperLinkStyle.cs
- LineServicesCallbacks.cs
- IItemProperties.cs
- MethodCallConverter.cs
- ObjectReaderCompiler.cs
- SiteMapDataSourceView.cs
- BindingMAnagerBase.cs
- SqlBulkCopyColumnMappingCollection.cs
- SqlDataReaderSmi.cs
- ToolStripPanelSelectionBehavior.cs
- Underline.cs
- PreviewKeyDownEventArgs.cs
- CompatibleIComparer.cs
- PackageRelationshipSelector.cs
- Config.cs