Click here to Skip to main content
15,949,741 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I want to create a socket connection in ASP.NET website for each website user who logs in. I create an object of TcpSocketClient and call the Connect function which is used to connect to the server within the (not ispostback) block. But it gives me an error after a button click or pageload function calls..

If i change the place where the server connection is made within the postback, it creates a new socket connection for each page load.

Please help me.

Thanks
priya.
Posted
Updated 28-Jul-10 5:31am
v2

1 solution

First of, are you sure you want to create socket connection for every user who logs in. What if you have 100 or 1000, or in the case of CP 10,000 + concurrent users?

Second, it appears, you need to read a whole lot as to how web application work. Every request is new connection, so you can't depend as to what you did when the page was first loaded.
 
Share this answer
 

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