1

I have WCF service using netTcpBinding (so default InstanceContextMode=PerSession).
Service is being called from ASP.Net Web Application using code similar to:

ServiceClient service = new ServiceClient();
service.ServiceMethod1();
service.Close();

So, we create a proxy instance here - call the required method and - close the service.

Query -
When do we say that a WCF Session is created?
Is it correspond to one ASP.Net Session... so suppose one user having an ASP.Net Session, whatever calls this user will make to service from his session will also mean a WCF session?

Thank you!

1 Answer 1

2

When do we say that a WCF Session is created?

When you first call the service from a new proxy instance.

Is it correspond to one ASP.Net Session... so suppose one user having an ASP.Net Session, whatever calls this user will make to service from his session will also mean a WCF session?

No. WCF session doesn't work in the same way as ASP.NET session. WCF session is with out of the box implementation maintained per proxy. Once you close your service client the session is gone.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you :-) just found a good read - codeidol.com/csharp/wcf/Instance-Management/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.