Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Extensions / Security / RoleService.cs / 1305376 / 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
- ApplicationId.cs
- DataContract.cs
- MenuTracker.cs
- DynamicResourceExtensionConverter.cs
- DeviceSpecificDesigner.cs
- Win32.cs
- _TransmitFileOverlappedAsyncResult.cs
- MetadataFile.cs
- ResXResourceSet.cs
- ToolStripSplitStackLayout.cs
- UriTemplateTableMatchCandidate.cs
- NativeWindow.cs
- propertyentry.cs
- WebBrowser.cs
- SoapInteropTypes.cs
- SyndicationItem.cs
- MobileControl.cs
- EditableTreeList.cs
- HttpCookiesSection.cs
- CanExecuteRoutedEventArgs.cs
- JapaneseLunisolarCalendar.cs
- MutexSecurity.cs
- AudioDeviceOut.cs
- SiteMap.cs
- Floater.cs
- XmlSchemaAppInfo.cs
- ArrayElementGridEntry.cs
- NumericExpr.cs
- DataSetMappper.cs
- StyleXamlParser.cs
- CommandID.cs
- CommandField.cs
- TemplateBuilder.cs
- WizardForm.cs
- GridViewEditEventArgs.cs
- OdbcErrorCollection.cs
- PageVisual.cs
- TraceSwitch.cs
- AutoResetEvent.cs
- CodeParameterDeclarationExpressionCollection.cs
- MemberInfoSerializationHolder.cs
- ToggleButton.cs
- SelectionChangedEventArgs.cs
- SystemIcons.cs
- TransportBindingElement.cs
- XmlResolver.cs
- XmlFormatExtensionPrefixAttribute.cs
- DbProviderManifest.cs
- EntityDesignerUtils.cs
- StoreItemCollection.cs
- BaseHashHelper.cs
- SBCSCodePageEncoding.cs
- SamlAuthorizationDecisionClaimResource.cs
- RadioButton.cs
- FontStyles.cs
- RuntimeCompatibilityAttribute.cs
- TabletCollection.cs
- SerializationException.cs
- UpdateProgress.cs
- CodeSnippetStatement.cs
- codemethodreferenceexpression.cs
- TemplatingOptionsDialog.cs
- ThumbAutomationPeer.cs
- FileRecordSequenceCompletedAsyncResult.cs
- SiblingIterators.cs
- SequenceNumber.cs
- RuntimeIdentifierPropertyAttribute.cs
- SafeProcessHandle.cs
- RadioButtonFlatAdapter.cs
- XmlSerializerVersionAttribute.cs
- StaticSiteMapProvider.cs
- ThreadStateException.cs
- SqlDependencyUtils.cs
- ResourcePart.cs
- SchemeSettingElement.cs
- Logging.cs
- RouteParametersHelper.cs
- ControlType.cs
- ObjectIDGenerator.cs
- DBCSCodePageEncoding.cs
- EventMappingSettingsCollection.cs
- EdmComplexTypeAttribute.cs
- CodeEventReferenceExpression.cs
- DebugInfoExpression.cs
- SBCSCodePageEncoding.cs
- UnmanagedMarshal.cs
- ListSortDescription.cs
- TextInfo.cs
- SoapElementAttribute.cs
- DataGridViewSelectedRowCollection.cs
- MissingManifestResourceException.cs
- DynamicResourceExtension.cs
- PageBuildProvider.cs
- NonBatchDirectoryCompiler.cs
- StackOverflowException.cs
- CodeAttributeDeclarationCollection.cs
- WebInvokeAttribute.cs
- HttpAsyncResult.cs
- ZipFileInfoCollection.cs
- SelfIssuedAuthRSAPKCS1SignatureDeformatter.cs