servicebehavior

WCF - Custom Credentials & Security Tokens

ε祈祈猫儿з 提交于 2019-12-09 06:30:56
问题 I'm fairly new to WCF development and have run into a couple problems whilst learning the framework. I have a service api which must support both REST & SOAP. So far this has been easy to implement especially with WCF4 and routing. I am currently working on authorization and have managed to extend AuthorizationManager by creating two new manager classes: "ApiKeyAuthorizationManager" & "ApiKeyAndTokenAuthorizationManager" Most of my services will require an ApiKey and Token (GUIDS) to be

Different Service behaviors per endpoint

有些话、适合烂在心里 提交于 2019-12-06 00:11:05
问题 The situation We are implementing different sort of security on some WCF service. ClientCertificate, UserName & Password and Anonymous. We have 2 ServiceBehaviorConfigurations, one for httpBinding and one for wsHttpBinding. ( We have custom authorization policies for claim based security ) As a requirement we need different endpoints for each service. 3 endpoints with httpBinding and 1 with wsHttpBinding. Example for one service: basicHttpBinding : Anonymous basicHttpBinding :

WCF service dataContractSerializer maxItemsInObjectGraph in web.config

£可爱£侵袭症+ 提交于 2019-12-05 20:43:34
问题 I am having issues specifying the dataContractSerializer maxItemsInObjectGraph in host's web.config. <behaviors> <serviceBehaviors> <behavior name="beSetting"> <serviceMetadata httpGetEnabled="True"/> <serviceDebug includeExceptionDetailInFaults="True" /> <dataContractSerializer maxItemsInObjectGraph="2147483646"/> </behavior> </serviceBehaviors> </behaviors> <services> <service name="MyNamespace.MyService" behaviorConfiguration="beSetting" > <endpoint address="http://localhost/myservice/"

WCF - Custom Credentials & Security Tokens

本秂侑毒 提交于 2019-12-03 08:21:50
I'm fairly new to WCF development and have run into a couple problems whilst learning the framework. I have a service api which must support both REST & SOAP. So far this has been easy to implement especially with WCF4 and routing. I am currently working on authorization and have managed to extend AuthorizationManager by creating two new manager classes: "ApiKeyAuthorizationManager" & "ApiKeyAndTokenAuthorizationManager" Most of my services will require an ApiKey and Token (GUIDS) to be present; when initially authenticating, you simply need a valid ApiKey and password to receive a Token. So

An error occurred when verifying security for the message

戏子无情 提交于 2019-11-28 22:54:48
When I try to call a WCF service I am getting the following message "An error occurred when verifying security for the message." When I remove the custom authenication the service works no problem. I can't figure out though what I have misconfigured in my web.config. Any insight would be appreciated. <system.serviceModel> <services> <service behaviorConfiguration="NAThriveExtensions.nableAPIBehavior" name="NAThriveExtensions.nableAPI"> <endpoint address="" binding="basicHttpBinding" bindingConfiguration="basicHttpBinding_Secure" contract="NAThriveExtensions.InableAPI"> </endpoint> <endpoint

WCF ConcurrencyMode Single and InstanceContextMode PerCall

亡梦爱人 提交于 2019-11-27 22:00:19
I have an issue with my wcf service config. I would like every call to my service create a new instance of the service. For the concurrency I would like to one call is finished before another start. Thus if I have a service like this one: [ServiceBehavior(ConcurrencyMode=ConcurrencyMode.Single, InstanceContextMode=InstanceContextMode.PerCall)] public class MyService: IMyService { public bool MyServiceOp() { Debug.WriteLine("thread "+ Thread.CurrentThread.ManagedThreadId.ToString()); Debug.WriteLine("start operation "); Do_work() Debug.WriteLine("end operation"); return true; } } When I call it

WCF ConcurrencyMode Single and InstanceContextMode PerCall

空扰寡人 提交于 2019-11-27 04:31:13
问题 I have an issue with my wcf service config. I would like every call to my service create a new instance of the service. For the concurrency I would like to one call is finished before another start. Thus if I have a service like this one: [ServiceBehavior(ConcurrencyMode=ConcurrencyMode.Single, InstanceContextMode=InstanceContextMode.PerCall)] public class MyService: IMyService { public bool MyServiceOp() { Debug.WriteLine("thread "+ Thread.CurrentThread.ManagedThreadId.ToString()); Debug

An error occurred when verifying security for the message

时光怂恿深爱的人放手 提交于 2019-11-27 02:05:57
问题 When I try to call a WCF service I am getting the following message "An error occurred when verifying security for the message." When I remove the custom authenication the service works no problem. I can't figure out though what I have misconfigured in my web.config. Any insight would be appreciated. <system.serviceModel> <services> <service behaviorConfiguration="NAThriveExtensions.nableAPIBehavior" name="NAThriveExtensions.nableAPI"> <endpoint address="" binding="basicHttpBinding"

WCF Error “Maximum number of items that can be serialized or deserialized in an object graph is '65536'”

本小妞迷上赌 提交于 2019-11-26 16:45:07
I am receiving the following error on a WCF call: Maximum number of items that can be serialized or deserialized in an object graph is '65536' I've read a ton of forum posts and many of them mention modifying the app.config and web.config to specify new behavior to allow larger object graphs. I've done that and this is what I have in those files: App.Config on the WPF project: <system.serviceModel> <behaviors> <serviceBehaviors> <behavior name=""> <serviceMetadata httpGetEnabled="false" /> <serviceDebug includeExceptionDetailInFaults="false" /> </behavior> </serviceBehaviors>

WCF Error “Maximum number of items that can be serialized or deserialized in an object graph is &#39;65536&#39;”

淺唱寂寞╮ 提交于 2019-11-26 04:55:43
问题 I am receiving the following error on a WCF call: Maximum number of items that can be serialized or deserialized in an object graph is \'65536\' I\'ve read a ton of forum posts and many of them mention modifying the app.config and web.config to specify new behavior to allow larger object graphs. I\'ve done that and this is what I have in those files: App.Config on the WPF project: <system.serviceModel> <behaviors> <serviceBehaviors> <behavior name=\"\"> <serviceMetadata httpGetEnabled=\"false