Network streaming-worked when server was console app but not when server web form

xailer

Newcomer
Joined
May 5, 2003
Messages
2
Hi,Im having trouble with network streaming app.
I basicaly took the code for the server from console app(where it worked as itshould)and put it in a code behind of a web form page.Server app basicaly starts TcpListener instance and when a client wants to connect it accepts a connection and downloads some data from a file to client
Now Im having two problems:
When browsing to this page I get an error saying:"System.Net.Sockets.SocketException: Only one usage of each socket address (protocol/network address/port) is normally permitted".The weird thing is when a server was a console app I did use port 65000 with no problems whatsoever.
Second problem lies within client app,which is a Console app.When defining host name in TcpClient's constructor what do I use?Should I use "localhost" or full path to .aspx file or virtual path or maybe something completely different?

Even when this two things fixed should I fix something else in a code that worked for console server app but it won't work here?

thank u for your time
 
I don't understand how you hope that this will work - anything created in an ASP page will by default only exist for the lifetime of that request (probably less than a second).
 
still...

There probably ain't much practical use for it but since Im learning about network streaming...u never know when u gonna need something!
 
Back
Top