Questions tagged [operationcontext]
41 questions
2
votes
0 answers
WCF Service OperationContext null
I have a wcf service. I am using this class for thread safe global variables:
public class WcfOperationContext : IExtension {
private readonly IDictionary items;
private WcfOperationContext() {
items = new…

Umut Derbentoğlu
- 1,146
- 5
- 18
- 39
1
vote
1 answer
Inspect ReaderQuotas settings via OperationContext
I have a WCF service for which I have specified custom binding/readerQuotas settings. However, the service still fails with the message:
The maximum string content length quota (...) has been exceeded"
I suspect that the readerQuotas settings may…

Cristian Lupascu
- 39,078
- 16
- 100
- 137
1
vote
0 answers
netPeerTCPBinding - Does OperationContext.Current.GetCallbackChannel broadcast?
I found two sources that seem to be contradicting each other:
"When the service receives a call, OperationContext.Current.GetCallbackChannel returns a channel to just that caller. It does not return a channel that broadcasts to all of the clients."…

larsbeck
- 665
- 2
- 7
- 11
1
vote
0 answers
WCF Set UserID in OperationContext
Im have a custom validator in my WCF service application where i validate the username and password with the standard Microsoft identity tables.
This function returns me data form the user including the UserID (Guid)
User user = new…

user2811133
- 69
- 2
- 7
1
vote
2 answers
How to figure out (on server side) which contract a WCF Client has used to connect (multiple contracts)?
Consider the following:
I have one master server and several servers on different locations which can communicate with the master server. Additionally (GUI) clients can connect to each server.
So I have a public interface which is known by…

toATwork
- 1,335
- 16
- 34
1
vote
1 answer
OperationContextScope vs MessageInpectors
Help me in understanding differences between these two. as per to me, Operation
ContextScope can be used irrespective of .NET application you are using like WCF, Console, Web, etc, anywhere this can be used if you are calling any other service like…

user3264937
- 81
- 14
1
vote
0 answers
retrieve client IpAddress in WCF service
I am trying to utilise a WCF service built in .Net 4.0 with custom business functionality in a html page (using jquery) and want to retrieve the client IPAddress in WCF service whoever is trying to access my service through the defined html page.…

Srikanth Reddy Ch
- 13
- 4
1
vote
0 answers
Access to WCF endpoint service type in custom SecurityTokenAuthenticator implementation
We have a authentication/authorization service that we need to use in our WCF services. I've implemented custom client/service credentials, along with corresponding tokens and supporting classes. Everything works except for one thing.
Part of the…

aasukisuki
- 1,186
- 1
- 11
- 33
1
vote
1 answer
Does OperationContextScope dispose communication channel as well?
Does the OperationContextScope dispose the communication channel as well when it's disposed?
In the following example, I'm getting a "The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it…

user3186786
- 27
- 3
1
vote
3 answers
How to use WCFMock w/ DI to mock OperationContext
I've been looking at WCFMock to support unit testing of my WCF Services that rely on data in the OperationContext.
If I understand it correctly, my services should receive an instance of IOperationContext which is mapped to an instance of…

cdarrigo
- 964
- 1
- 8
- 26
1
vote
0 answers
How can I provide server-side administrative control of WCF clients?
I have a WCF, tcp-based client server application (self-hosted) in which communication occurs via callbacks and InstanceContextMode is PerSession. I want to provide an Admin interface to this app which would allow an administrator to view details of…

JMc
- 971
- 2
- 17
- 26
1
vote
1 answer
How to write a Unit Test case in c# without using the Operation context?
In My Project i have a method PreAction() which is used in all the Methods. PreAction() contains the Operation context object i.e
OperationContext currentContext = OperationContext.Current
So when am trying to Invoke a Method X in that method I am…

Suchai Tammewar
- 31
- 4
1
vote
0 answers
IIS 8 - why WebOperationContext.Current.IncomingRequest is null in CheckAccessCore method of ServiceAuthorizationManager class
WCF 4.5
I have created and successfully implemented CustomAuthorizationManager which inherits ServiceAuthorizationManager class and overrides its CheckAccessCore method in the past on the IIS7.
Now, I have the following problem on IIS…

user2440955
- 11
- 2
1
vote
0 answers
WCF Operation Context - Contamination
I am looking into a problem whereby it seems that there is some cross contamination between different operations when retrieving an extension instance from OperationContext. It is one of those annoying concurrency based hard to replicate issues. I…

Myles McDonnell
- 12,943
- 17
- 66
- 116
1
vote
1 answer
WCF OperationContext
I'm developing a WCF service and if there is an error I want to serialize the incoming parameter from the original method that was called on the service. I am using IErrorHandler to catch all exceptions.
My initial thoughts were that I will store…
j_w_c