Questions tagged [instancecontextmode]

31 questions
1
vote
0 answers

WCF instancing mode Per Session not working as expected

I'm writing a WCF application that generates sets of data, and allows the client to create them, navigate through them, and retrieve data from them. The data is stored in static variables of the service class. Particuarly, they're stored in a…
JoeMjr2
  • 3,804
  • 4
  • 34
  • 62
0
votes
1 answer

Workflow 4 Service Application and InstanceContextMode & ConcurrencyMode

The question is pretty simple: how do you set InstanceContextMode & ConcurrencyMode in WF4 WCF Workflow Service Application?
Martynas
  • 1,064
  • 10
  • 21
0
votes
1 answer

Switching from instancecontextmode.Single to PerCall Loop through event problem

I'm fairly new to using the WCF and trying to improve some old pieces of code (so forgive me if I'm asking some dumb questions). I have a WCF in singleton mode and to improve my response time, I want to switch to a per-call mode. My only problem is…
Niedda
  • 1
0
votes
0 answers

WCF Service file lock with InstanceContextMode.PerCall

As the title made you wonder already, shouldn't this be regarded as an exclusive or? The way I did understand the PerCall, each new request should create a new Service object, with a new set of variables, et cetera. So how is it actually possible…
kvirk
  • 97
  • 1
  • 10
0
votes
1 answer

How to get status of execution of a method declared as Single Instance Mode

I have declared my service behavior as single instance mode as stated below [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single)] public class Service : IService { [OperationBehavior] public void DoSomething() { …
Nani
  • 1,148
  • 3
  • 20
  • 35
0
votes
1 answer

Getting exceptions when InstanceContextMode is set to per session or per call

I am trying to make an application(for learning purpose) that can log in and will create an instance of "user" then save their userid in it. Then they can invoke the getUserid method and get the userid they saved. But if I use single…
0
votes
1 answer

WCF ServiceBehavoir.InstanceContextMode in Azure Cloud Service

Does anyone know how the WCF ServiceBehavoir.InstanceContexMode is affected when hosting the WCF service in Azure? A service that is configured for PerCall instancing, and handles multiple concurrent requests on-prem, does not seem to process more…
controlbox
  • 522
  • 4
  • 13
0
votes
0 answers

InstanceContextMode of WCF

I have a Web service create by WCF, and it could response for the client's request, such as adding or updating data. Let's call the main part of service Context, because some method(supposed method A) would spend a long time to handle, but I don't…
Alanight
  • 353
  • 2
  • 8
  • 23
0
votes
1 answer

WCF Authentication for Per Call Instance Mode

I am developing a WCF based ERP application. My service is using Per Call instance mode and Concurrency mode Multiple. I am using custom UserName/Password validator for authentication. Since for Per Call services, services instance is created…
Pradeep
  • 299
  • 2
  • 8
  • 15
0
votes
1 answer

Castle Windsor Wcf self host with InstanceContextMode.Single

So, I have implemented a stateful Wcf Service self-hosted inside a windows service. I use this service as a remote hardware driver (kind of). As the service has to force serialed access to the underlying hardware, I set the service as a unique…
andreapier
  • 2,958
  • 2
  • 38
  • 50
0
votes
2 answers

MVC Single Instance Object

I need to declare an object in MVC app. This object consume memory so I need it to be created once when app start and won't be destroy until recycled. The same instance of the object also should be able accessed across application within…
Buzz
  • 321
  • 2
  • 3
  • 20
0
votes
1 answer

How to avoid unnecessary objects getting initialized WCF

We have a WCF service exposing several operations with BasicHttpBinding and the service implementation is some thing like this Public Class MyService { private IHandler1 _handler1 = GetHandler1(); private IHandler2 _handler1 = GetHandler12(); …
CSharped
  • 1,247
  • 4
  • 20
  • 49
0
votes
0 answers

Trouble With WCF InstanceContextMode.PerSession

I'm trying to get to grips with WCF instancing and I'm having trouble with sessions. Either my assumption of how it works is incorrect or I'm missing something. On my Service contract (implementation not the interface), I've set the service…
Steviebob
  • 1,705
  • 2
  • 23
  • 36
0
votes
2 answers

WSDualHttpBinding in WPF not responding

I have problem with using WCF WSDualHttpBinding only in WPF application. Before changes this WCF worked. Now not working. I changed only ServiceBehaviour (ConcurrencyMode and InstanceContextMode) to: [ServiceBehavior(IncludeExceptionDetailInFaults =…
Musketyr
  • 745
  • 1
  • 16
  • 37
0
votes
1 answer

WCF - Webhttpbinding, see significant difference between PerCall and PerSession

I have tried to configure my wcf webhttpbinding (restful) service both PerSession and PerCall. As far as I understand webhttpbinding does NOT use sessions to satisfy the restful principles, however I see significant performance differences when…
Armen Nazarian
  • 95
  • 1
  • 2
  • 5