Click here to Skip to main content
15,896,557 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello everyone,

we need to have online users in our application,

i use InstanceContextMode = System.ServiceModel.InstanceContextMode.Single

and whenever user login and logout ,i save his name and callback

in dictionary collection ,but i have crazy problem , when user count are more than

20 ,service going to fault state,

i set MaxConnection,maxConcurrentCalls,maxConcurrentSessions and maxConcurrentInstances equal to 1000,

but it isn't helpful.

please help me,
Posted

1 solution

Please use tracing in WCF to rack your problem.
From your description is very hard to understand what happened under the hood.
As an issue i suppose it could be some memory leak problem.

So include tracing in your WCF , and look throuht it!.

XML
<system.diagnostics>
		<sources>
			<source name="System.ServiceModel" switchvalue="Information, Critical, Error">
							propagateActivity="true">
				<listeners>
					<add name="log" />
				</listeners>
			</source>
			<source name="System.ServiceModel.MessageLoging" switchvalue="Critical">
				<listeners>
					<add name="log" />
				</listeners>
			</source>
		</sources>
		<sharedlisteners>
			<add name="log" type="System.Diagnostics.XmlWriterTraceListener">
			initializeData="Traces.svclog" />
		</add></sharedlisteners>
		<trace autoflush="true" />
	</system.diagnostics>



And one more, for what purpose you set maxConcurrentInstances ?? As i suppose , it should be only one...
 
Share this answer
 
Comments
[no name] 7-Aug-12 1:40am    
i searched a lot for this problem ,and this solution discuss in a blog about WCF
i think my approach is not best approach,
can u tell me best approach to get online user in WPF application?
thanks a lot
[no name] 7-Aug-12 5:09am    
finally i solve,unhandled exception occur in our service.

thanks a lot

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900