[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Silverlight: InstanceContextMode and ConcurrencyMode

Posted on 2010-01-02
Medium Priority
Last Modified: 2012-05-08
We have a web service that's accessed from Silverlight that needs to be able to accept multiple requests however it's apparent that's not occurring.  Below are snippets of the service definition and behavior definition, please assist me in understanding why this service won't accept multiple requests.  Thanks in advance!

[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
public class RiteTrackServer
{ ... }

<service behaviorConfiguration="RiteTrackServer.RiteTrackServerBehavior" name="RiteTrackServer.RiteTrackServer">
    <endpoint address="" binding="basicHttpBinding" bindingConfiguration="RiteTrackServerBinding" contract="RiteTrackServer.RiteTrackServer"/>
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
Question by:HandelIT
LVL 25

Expert Comment

ID: 26170284
InstanceContextMode.Single should be used for only singleton lifetime behavior. Are you trying to create singleton object ? else change the InstanceContextMode to "PerSession" or "PerCall"

Have some clarifications on ur implementation of wcf.

Good practice or thumb rule for implementing WCF is "ServiceContract" should be used with Interface and "ServiceBehavior" should be used with a class which implements the service.

Accepted Solution

HandelIT earned 0 total points
ID: 26432648
This was resolved by us internally.  The issue was that you needed to remove this line from the service code definition:
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]

And you needed to set this tag in the Web.config to "false":
    <serviceHostingEnvironment aspNetCompatibilityEnabled="false"/>

Please close this question and refund the points.

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In previous Articles, we have discussed how we can upload a file using .asmx web service and isolated storage space. Here, in continuation to the topic, I am going to discuss how we can use WCF for the same purpose. Steps: 1.Create the silverli…
While working on Silverlight and WCF application, I faced one issue where fault exception occurred at WCF operation contract is not getting propagated to Silverlight client. So after searching net I came to know that it was behavior by default for s…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question