473,508 Members | 2,152 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Socket migration problem 2003 --> 2005

Fab
Hi,

The code below perfectly works with VS 2003.
When i use it with VS 2005, the application hangs (the processor is up to
100% and nothing else happens).

The code :

int port = System.Convert.ToInt16(strPort);
mainSocket = new Socket(AdressFamily.InterNetwork, SocketType.Stream,
ProtocolType.Tcp);
IPEndPoint ipLocal = new IPEndPoint(IPAdress.Parse("192.168.0.2"), port);

mainSocket.Bind(ipLocal); <-- THE APPLICATION HANGS HERE

mainSocket.Listen(10);
mainSocket.BeginAccept(new AsyncCallBack(OnClientConnect), null)

Does anyone got an idea to solve this problem ?

Many thanks in advance,

FB.
Jul 22 '06 #1
4 1121
Use an Int32 for the port.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist

What You Seek Is What You Get.
"Fab" <no**@none.comwrote in message
news:ey**************@TK2MSFTNGP05.phx.gbl...
Hi,

The code below perfectly works with VS 2003.
When i use it with VS 2005, the application hangs (the processor is up to
100% and nothing else happens).

The code :

int port = System.Convert.ToInt16(strPort);
mainSocket = new Socket(AdressFamily.InterNetwork, SocketType.Stream,
ProtocolType.Tcp);
IPEndPoint ipLocal = new IPEndPoint(IPAdress.Parse("192.168.0.2"), port);

mainSocket.Bind(ipLocal); <-- THE APPLICATION HANGS HERE

mainSocket.Listen(10);
mainSocket.BeginAccept(new AsyncCallBack(OnClientConnect), null)

Does anyone got an idea to solve this problem ?

Many thanks in advance,

FB.

Jul 23 '06 #2
Fab
Thanks for answering, but the problem is exactly the same with an Int32...
Jul 23 '06 #3
I'm stumped. I haven't had any similar problems.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist

What You Seek Is What You Get.
"Kevin Spencer" <uc*@ftc.govwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
Use an Int32 for the port.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist

What You Seek Is What You Get.
"Fab" <no**@none.comwrote in message
news:ey**************@TK2MSFTNGP05.phx.gbl...
>Hi,

The code below perfectly works with VS 2003.
When i use it with VS 2005, the application hangs (the processor is up to
100% and nothing else happens).

The code :

int port = System.Convert.ToInt16(strPort);
mainSocket = new Socket(AdressFamily.InterNetwork, SocketType.Stream,
ProtocolType.Tcp);
IPEndPoint ipLocal = new IPEndPoint(IPAdress.Parse("192.168.0.2"), port);

mainSocket.Bind(ipLocal); <-- THE APPLICATION HANGS HERE

mainSocket.Listen(10);
mainSocket.BeginAccept(new AsyncCallBack(OnClientConnect), null)

Does anyone got an idea to solve this problem ?

Many thanks in advance,

FB.


Jul 23 '06 #4
Fab
You mean that the exactly same code is working for you ?!
Jul 24 '06 #5

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

Similar topics

4
1256
by: William | last post by:
Well I am back. I am trying to back into the developing world. I have done a ton of the old visual studio developing. Now I see there is visual studio dot net 2003 and 2005. So my question is do I...
4
1539
by: Spurry Moses | last post by:
I know it's in Beta 2, but I can't report any good experiences with upgrading a project form 2003 to 2005. I tried to upgrade a 2003 project to C# Express 2005. My application has hardly...
7
1317
by: Rene | last post by:
I am still waiting for my copy of VS 2005 that I ordered about 2 weeks ago. When I finally get VS 2005, I will want to continue to run my projects using 2003 and at the same time I want to make a...
6
977
by: guy | last post by:
When migrating VB2003 source code to VB2005 are there any breaking changes? I can only find info that refers to different versions of the framework, and which is not what im looking for. cheers ...
1
947
by: Jarod | last post by:
Hey I have asp.net project developed in VS2003, now I want to convert it to VS2005 but to use it with file system not IIS how to do it ? Jarod
1
1396
by: Dan Munk | last post by:
Hello, I have a large project exclusively made up of interfaces (several hundred) that define the business objects used in our system. Heavy inheritance and aggregation are used in the project....
3
1673
by: robin9876 | last post by:
Is it possible to install Visual Studio 2003 and 2005 on the same pc?
4
1314
by: John Kotuby | last post by:
Hello all, I have VStudio 2005 currently installed on my workstation. However, I am collaborating on a project with an outside consultant who is using VS 2003. Every so often he sends me new or...
2
1103
by: =?Utf-8?B?RGF2aWQrKw==?= | last post by:
Dear list, Firstly, I hope I'm posting this on the right newsgroup as I'm more of a dabbler in ASP.NET website development than a fully fledged developer. I have a simple ASP.NET website which...
0
7225
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7124
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7385
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7498
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5629
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5053
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
3182
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1558
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
418
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.