473,327 Members | 2,094 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

launching a socket server from asp.net

Hi all,
We are currently putting together a web based application which needs
real time communication with the server. In order to achieve this we
are writing an application which will run as a socket server to
process and send out data, we have been planning to run this as a
service. Unfortuantly hosting companies won't run services without a
dedicated server, which is expensive.

Back when i was a java developer i wrote a jsp application which
launched a socket server in a seperate thread when the application
start event fired. This worked, but was never rolled out into a
production environment, so i don't know how reliable a solution it
would have been. My thoughts have turned to whether a similar solution
would work in asp.net, as this should allow us to run our socket
server without needing a dedicated server. Does anyone have experience
of doing this in ASP.NET? Are there any obvious gotcha's, maybe
relating to security, performance, something else?

Your help will be much appreciated

thanks

James
Nov 18 '05 #1
2 1732
James,

For one, you can not program sockets using ASP.NET, but can do with .NET
using system.net.sockets namespace. The following article has a simple
client/server program using sockets.

http://www.developerfusion.com/show/3918/

The constraint, I am assuming, needs to listen on a port. So, as long as the
hosting company lets you do this, so you don't block their ports, it is
quite possible with .NET.

--
Manohar Kamath
Editor, .netWire
www.dotnetwire.com
"james b" <j@mesbridger.com> wrote in message
news:be**************************@posting.google.c om...
Hi all,
We are currently putting together a web based application which needs
real time communication with the server. In order to achieve this we
are writing an application which will run as a socket server to
process and send out data, we have been planning to run this as a
service. Unfortuantly hosting companies won't run services without a
dedicated server, which is expensive.

Back when i was a java developer i wrote a jsp application which
launched a socket server in a seperate thread when the application
start event fired. This worked, but was never rolled out into a
production environment, so i don't know how reliable a solution it
would have been. My thoughts have turned to whether a similar solution
would work in asp.net, as this should allow us to run our socket
server without needing a dedicated server. Does anyone have experience
of doing this in ASP.NET? Are there any obvious gotcha's, maybe
relating to security, performance, something else?

Your help will be much appreciated

thanks

James

Nov 18 '05 #2
you can start a backgound thread on appstartup. you will need a primer in
case iis is recycled, or your appdomain is recycled. also check that you
host isp hasn't blocked the port you want to use.

-- bruce (sqlwork.com)


"james b" <j@mesbridger.com> wrote in message
news:be**************************@posting.google.c om...
Hi all,
We are currently putting together a web based application which needs
real time communication with the server. In order to achieve this we
are writing an application which will run as a socket server to
process and send out data, we have been planning to run this as a
service. Unfortuantly hosting companies won't run services without a
dedicated server, which is expensive.

Back when i was a java developer i wrote a jsp application which
launched a socket server in a seperate thread when the application
start event fired. This worked, but was never rolled out into a
production environment, so i don't know how reliable a solution it
would have been. My thoughts have turned to whether a similar solution
would work in asp.net, as this should allow us to run our socket
server without needing a dedicated server. Does anyone have experience
of doing this in ASP.NET? Are there any obvious gotcha's, maybe
relating to security, performance, something else?

Your help will be much appreciated

thanks

James

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: simon place | last post by:
Spent some very frustrating hours recoding to find a way of closing a server socket, i'd not thought it would be any problem, however, after complete failure and as a last resort, i looked at the...
4
by: zbcong | last post by:
Hello: I write a multithread c# socket server,it is a winform application,there is a richtextbox control and button,when the button is click,the server begin to listen the socket port,waiting for a...
2
by: zhebincong | last post by:
Hello: I write a multithread c# socket server,it is a winform application,there is a richtextbox control and button,when the button is click,the server begin to listen the socket port,waiting...
1
by: John Sheppard | last post by:
Thanks to everyone that responded to my previous Socket Programming question. Now I have run into some behavior that I don't quite understand. Programming environment. VS.NET 2003, C#, Windows...
4
by: Chris Tanger | last post by:
Context: C# System.Net.Sockets Socket created with constructor prarmeters Internetwork, Stream and TCP everything else is left at the default parameters and options except linger may be changed...
2
by: Rene Sørensen | last post by:
We are 4 students working on a assignment, that our teacher gave use, normally we do this is C++, but the 4 of us, use C# more often that C++ so… We made a small games called reversi, now our job...
8
by: james b | last post by:
Hi all, We are currently putting together a web based application which needs real time communication with the server. In order to achieve this we are writing an application which will run as a...
4
by: Engineerik | last post by:
I am trying to create a socket server which will listen for connections from multiple clients and call subroutines in a Fortran DLL and pass the results back to the client. The asynchronous socket...
1
by: keksy | last post by:
Hi every1, I am writing a small client/server application and in it I want to send an image asynchronous from the client to the server through a TCP socket. I found an example code on the MSDN...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.