void AddBehaviors(ServiceDescription service) { // The philosophy here is to respect settings from configuration // At the moment, none of the settings we care about can be modified // through configuration. That may change in the future. // However, we never want to silently overwrite a user's configuration. // So we should either accept overrides or reject them, but never // silently update them. // ServiceBehaviorAttribute serviceBehavior = EnsureBehaviorAttribute(service); serviceBehavior.InstanceProvider = new ComPlusInstanceProvider(this.info); serviceBehavior.InstanceContextMode = InstanceContextMode.Single; // SHOULD: There is no reason to not allow concurrency at this level serviceBehavior.ConcurrencyMode = ConcurrencyMode.Multiple; serviceBehavior.UseSynchronizationContext = false; service.Behaviors.Add(new SecurityCookieModeValidator()); if (AspNetEnvironment.Enabled) { AspNetCompatibilityRequirementsAttribute aspNetCompatibilityRequirements = service.Behaviors.Find<AspNetCompatibilityRequirementsAttribute>(); if (aspNetCompatibilityRequirements == null) { aspNetCompatibilityRequirements = new AspNetCompatibilityRequirementsAttribute(); service.Behaviors.Add(aspNetCompatibilityRequirements); } } }
public override void EnsureCompatibilityRequirements(System.ServiceModel.Description.ServiceDescription description) { if (description.Behaviors.Find <AspNetCompatibilityRequirementsAttribute>() == null) { AspNetCompatibilityRequirementsAttribute item = new AspNetCompatibilityRequirementsAttribute(); description.Behaviors.Add(item); } }
public override void EnsureCompatibilityRequirements(System.ServiceModel.Description.ServiceDescription description) { if (description.Behaviors.Find<AspNetCompatibilityRequirementsAttribute>() == null) { AspNetCompatibilityRequirementsAttribute item = new AspNetCompatibilityRequirementsAttribute(); description.Behaviors.Add(item); } }
public override void EnsureCompatibilityRequirements(ServiceDescription description) { AspNetCompatibilityRequirementsAttribute aspNetCompatibilityRequirements = description.Behaviors.Find <AspNetCompatibilityRequirementsAttribute>(); if (aspNetCompatibilityRequirements == null) { aspNetCompatibilityRequirements = new AspNetCompatibilityRequirementsAttribute(); description.Behaviors.Add(aspNetCompatibilityRequirements); } }
private void AddBehaviors(System.ServiceModel.Description.ServiceDescription service) { ServiceBehaviorAttribute attribute = this.EnsureBehaviorAttribute(service); attribute.InstanceProvider = new ComPlusInstanceProvider(this.info); attribute.InstanceContextMode = InstanceContextMode.Single; attribute.ConcurrencyMode = ConcurrencyMode.Multiple; attribute.UseSynchronizationContext = false; service.Behaviors.Add(new SecurityCookieModeValidator()); if (AspNetEnvironment.Enabled && (service.Behaviors.Find<AspNetCompatibilityRequirementsAttribute>() == null)) { AspNetCompatibilityRequirementsAttribute item = new AspNetCompatibilityRequirementsAttribute(); service.Behaviors.Add(item); } }
public override void EnsureCompatibilityRequirements(ServiceDescription description) { AspNetCompatibilityRequirementsAttribute aspNetCompatibilityRequirements = description.Behaviors.Find<AspNetCompatibilityRequirementsAttribute>(); if (aspNetCompatibilityRequirements == null) { aspNetCompatibilityRequirements = new AspNetCompatibilityRequirementsAttribute(); description.Behaviors.Add(aspNetCompatibilityRequirements); } }
/// <summary> /// The set asp net compatibility requirements. /// </summary> private void SetAspNetCompatabilityRequirements() { this.Description.Behaviors.Remove<AspNetCompatibilityRequirementsAttribute>(); var item = new AspNetCompatibilityRequirementsAttribute { RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed }; this.Description.Behaviors.Add(item); }