473,406 Members | 2,633 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,406 software developers and data experts.

Sockets in .NET Windows Service

Hi,

I had used Sockets in my windows service which is being developed in C#. Earlier I wrote an application and I converted that to service. But the sockets are being blocked(or) not initializing. I am using this to receive multicast streams. Please let me know for any suggestions or answers.

Thanks in advance
Black
Sep 4 '08 #1
7 1883
Plater
7,872 Expert 4TB
Ammend your firewall instructions to allow your sockets to go through.
Sep 4 '08 #2
I had completly disabled the firewall. But I am unable to connect in Windows Service. When I ported the same code to Windows Forms application, it worked fine. Thanks in advance
Sep 12 '08 #3
pootle
68
Could it be a permission problem? Are you running on Vista?
Sep 12 '08 #4
Plater
7,872 Expert 4TB
Ooo yeah, make sure your service runs as administrator and see if the sockets connect.
If not, you are going to need to put some sort of output logic in your code so you can track whats going on (unless you can debug services, in which case a breakpoint and stepping through code will work)
Sep 12 '08 #5
check the Allow data transfer between service and desctop option.
Service properties, second tab

I use the same structure(service that runs a TCP server), but I never had
such problems. If it runs as an exe application youŽll have to check the service
presets.
Sep 12 '08 #6
check the Allow data transfer between service and desctop option.
Service properties, second tab

I use the same structure(service that runs a TCP server), but I never had
such problems. If it runs as an exe application youŽll have to check the service
presets.
I had checked the service to allow "Interact with Desktop" and Administrator options, even with Network Service option. I had debugged the service but it fails only when kSocket.Send(...). encounters. I had written several services but this is my first one with sockets. Please help. Thanks

and forgot.. I am using "Socket" class.
Sep 13 '08 #7
Plater
7,872 Expert 4TB
Well what is the exception that is thrown when you reach the .Send() call? It might tell you something usefull.
Sep 15 '08 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Darren Thomas | last post by:
Dear all, I have written a TCP server as a windows service that accepts connections using the System.Net.Sockets.Socket class. I use the various asynchronous methods in the socket class. I'm...
11
by: kshetgar | last post by:
I am experiencing a wierd problem... I have a C#.Net application Server which uses Sockets. It listens on port 11000. and it runs as a Windows Service. If I run it as a consple Application,...
0
by: Kumar Shetgar | last post by:
I am experiencing a wierd problem... I have a C#.Net application Server which uses Sockets. It listens on port 11000. and it runs as a Windows Service. -- If I run it as a consple...
2
by: Dave | last post by:
Hi. I have an application that uses sockets, as per below: m_clientSocket = new Socket (AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp ); int iPortNo =8000; IPEndPoint ipEnd =...
3
by: jwpaco | last post by:
I am new to services and I have quite the task. I need a windows service that will, once started, open a socket and listen for client connections. When a connection is made, the client will want...
0
by: richard.charts | last post by:
Well, unfortunately, I couldn't get any answer on the msdn forums, so I'll give it a shot here. Real question at the bottom....
2
by: =?Utf-8?B?U2Vhbk1hYw==?= | last post by:
I am familiar with how to use winsock in vb6 to create a network app. I'm trying to find a way to take the current vb6 app and create a windows service using system.net.sockets. How do you create...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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,...
0
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...

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.