Windows Service Running Socket Server On Specified Port (Secured)

Jun 30, 2010

I wanted to know what are the risks of opening up a socket server on a specified port? Right now I have it limited to only accept requests from 1 specific IP to that port and all the other ones get rejected (using the windows firewall), is there a way to implement an authentication or anything else so I can allow it to be accessed from any IP worldwide yet have it secured?

View 1 Replies


ADVERTISEMENT

.net 2.0 Windows Service Not Running On Server 2008?

Dec 4, 2009

I have a windows service written in .net framework 2.0. This service installs and runs perfectly fine on both XP and windows server 2003.We have a new 2008 box that we are migrating over to, so need to get this windows service up and running.When i try to 'start' the windows service on the 2008 machine, i get "Windows could not start the <service> service on local computer. Error 1053: The service did not respond to the start or control request in a timely fashion."I have searched everywhere looking for an answer, and all I could find was a fix attributed to .net framework 1.1 for this same error. That; however, is not applicable here, as the service was written in 2.0.

View 3 Replies

Communications :: Socket - Connecting To Port 80 Of Server

Apr 21, 2008

I am new to socket communication. I found a few samples on the web and I managed to make my own host-client communication but i wanted to go a bit further and connect to port 80 of a server and it was just a disaster! First of all I know I can just use the functions that vb has itself but I want to make my own connections ... I have got some reasons I need this one! Do I really have to make them "connect" or just somehow without connecting I get the data? So I'm stack at the point that the connection is made ... it refuses to connect.

View 7 Replies

Socket Server Crasher - Enter IP And Port?

Mar 11, 2010

I have an application to make a server and clients to read/ send text to it but I want a program I can run from a remote computer that you enter the ip and port and it crashes the server.

View 2 Replies

Threading Windows Service TCP Socket Client?

Jan 22, 2012

I'm trying to build a multithreaded SMPP client with VS2008 and I'm getting bogged down in threading. Basically my main parent thread will interact with the windows service scheduler, get registry settings, and get a list of SMPP servers to connect to. Then it will launch a thread for each SMPP connection, which will need to keep it's TCP socket open to receive messages with, so the thread must remain running even if there aren't any events happening (no messages to receive)... but I can't seem to get it figured out.

[Code]...

The Start sub in the oChannel object does run, but once that sub is finished running the thread ends. In the Start sub, it calls other code that initiates a connection to the remote SMPP server, but that code asynchronously waits for an event to be raised regarding the connection status. Once the sub finishes, the async connection being attempted doesn't seem to be able to pin the thread down.

View 3 Replies

.Net Properly Shutdown An Asynchronous Socket Server Running On A Background Worker?

Mar 21, 2012

I have a Class called SocketSvr which handles an asynchronous socket server. It is called via the BackgroundWorker from my main form. Basically, I just want it to display my socket data information inside a textbox in the main form, and have a server start/stop button available on the main form to do those things.

Here is the code from Form1.vb:

Public Class Form1
Dim WithEvents Socketsvr As New SocketSvr
Private Sub ToggleServerButton_Click(ByVal sender As System.Object, _

[code]....

I am uncertain how to properly shut down requests from the client when the StopServer() function is run. In the code above, I place a cancellation queue for the background process. The funny thing is that once StopServer() is run, it will accept one more connection, then stop accepting thereafter.If I remove the following line from the code above:

listener.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, 1)

-- it crashes when I attempt to start the server a second time (complaining that I cannot reuse the socket, obviously) My guess is that I need to add something to the bw.CancellationPending call on the background worker?

View 1 Replies

Port Listening Via Windows Service?

Apr 13, 2009

I am trying to create a windows service (visual basic 2005) that will listen for a UDbroadcast. If it detects the broadcast it then run an external program. I havesuccessfully created the server and client programs using basic forms. I used the code from this forum

View 1 Replies

Socket Server, Windows Form App?

Jun 7, 2010

i took this code from another example, it works fine but it a windows console application.i took the code into a windows form app but it looks like i have to change somethingto start, it says client is not defined, so what should i use?lient.startClient(clientSocket, Convert.ToString(counter))

Dim serverSocket As New TcpListener(8888)
Dim clientSocket As TcpClient
Dim counter As Integer

[code].....

View 4 Replies

Create A Windows Service That Listens To A Port For Data?

Sep 17, 2009

I'm experiencing a weird problem. I need to create a Windows service that listens to a port for data. The data is comma separated, so I need to split it up and just write a few of the separated values to a file. This is a brief summary of my code:-

Do While True

tcpClient = tcpListener.AcceptTcpClient()
networkStream = tcpClient.GetStream()
Dim bytes(tcpClient.ReceiveBufferSize) As Byte

[code]....

Now the above code works fine. But suppose I just want to write only (2) to file i.e 2 of the comma separated values, problems arise. This is what happens:-

If I include both lines (1) and (2), output file = lines (1) and (2)
If I include only line (1) and comment out (2), output file = line (1)
If I include only line (2) and comment out (1), output file = BLANK ???

View 2 Replies

Windows Service Running Under A Network Account Is Calling An EXE And Running It Under System Account?

Aug 27, 2010

We have a windows service running under a network account that calls and runs an ActiveX exe. The exe is running under the local system account, not the network account of the service.

View 1 Replies

SQL Lookup On Server 2008 Running As A Win Service.

May 17, 2012

I am writing a service to get a count from a table on an SQL server. THe SQL box is in the same domain, and the service is runnign under the same account as the SQL box.

The box service is running on is Win 2008 in the domain. The interesting thing is that when I use this same code and run a normal EXE on that server, it runs no issues. In a service it crashe with:[code...]

View 4 Replies

VS 2005 MultiThreaded Server Socket: From Console To Windows Applications?

Nov 23, 2011

I would like to make a multi-socket TCP server (to accept multiple clients at the same time).I'm working with Visual Studio 2005 Express, maybe that's why files on CodeBank don't work..I found on the web an example about MultiThreaded Server Socket programming, but this is done for "Console application" in this way:

[Code]...

View 7 Replies

Running A Console Application As A Windows Service?

Jun 29, 2010

I have a console application that is ready to be used as a windows service, I have been looking around for a couple of hours and tried many of the tutorials out there but none of them worked with me.

The closest one was: [URL] but it didn't go into the process of doing it. I converted that code to VB.NET but then I don't know where to go from there. I have the Module1.vb which runs my console application all ready to be used.

show me a way to use my console application as a service, I tried using the InstallUtil feature but my app never showed under "services".

View 8 Replies

VS 2010 Running A Vbscript From A Windows Service?

Feb 21, 2012

'the below just creates a text file for my own sanity. Both files get 'created so I know the service is running as it should and not crashing. 'timer ticks every minute so if I delete the files once they have been 'created, they get recreated

Dim TextFile As New StreamWriter("C:LRQuadrant" & "test111" & ".txt")
TextFile.WriteLine("blah blah blah")
TextFile.Close()

I have a file called john.vbs. It only contains the following vbscript

'DIM objShell
'set objShell = wscript.createObject("wscript.shell")
'objShell.Run("CMD /C dir /s > dirlist.txt")

If I run this through command prompt, it does as I'd expect.'Nothing happens when the below code gets run.

Dim foo As New System.Diagnostics.Process
foo.StartInfo.WorkingDirectory = "c:"
foo.StartInfo.RedirectStandardOutput = True
foo.StartInfo.FileName = "cmd.exe"

[code]....

View 4 Replies

Running VBA Functions In A Server Side Access Database From A WCF Service

Sep 23, 2011

I've been researching for days and I've gotten to the point where my WCF service creates an Access object via com/interop.I've ran the Open Current Database call for the Access object without an error but Application.CurrentDB is still nothing/null. If the CurrentDB is nothing then I surely can't call Application.Run "myFunction" I realize WCF services aren't meant to be user interactive, but it's a long story why I'm trying to go this route. Basically I need to have a proof of concept ready sooner rather than later and the alternative (correct) route involves the complete re-writing of a large complex access VBA application. It's not a permissions issue, I have the IIS user names added to the security tab. What I really need is a way to set Environment.UserInteractive to true so my WCF service can create an instance of Access on my server machine, run the VBA functions, close out, return true.I'm using VS 2010 for the WCF, IIS 7 for my server, Access 2010 for the VBA application.

View 1 Replies

Windows Service Unable To Access A File In Program In Windows 2003 Server

Mar 12, 2010

I have a .net Windows Service developed in VB.net. I have a settings file in the root directory called Connections.XML and I am setting the basedirectory [code]...

When I schedule the service this is working absolutely fine in my Windows XP machine. But when I installed the same service in our development server (Windows 2003 64 bit Server) for some reason it is not able to locate this file.

View 1 Replies

Windows Service - Considering Seconds While Running So Can Not Compare Above Time?

Jul 23, 2010

I have written onw windows service..in that i have logic that is some part of code need to execute on certain time.. my service is running in every one min..

[code]...

But iam facing prob that it is considering seconds while running so can not compare above time..

View 4 Replies

Windows Service That Checks For Specific Running Task?

Feb 25, 2010

I need to have a windows service that capable of monitoring constantly whether my application is running or not. If not, the windows service will RUN it for me.

View 4 Replies

Identify Connection Lost Between Socket Server And Socket Client?

May 21, 2011

I wrote a Socket Client which will send the Socket Server some data and get some response from Server. This process will be running once in every 2 seconds.

Now what I need to know is How we can identify the connection lost between Server and Client?

I need this to be implemented in the Client side. If there is no connection then Client should automatically close the connection. Once the connection with the server is available in the next attempt it should connect automatically.

View 1 Replies

When Transfer System To A Machine Running Windows Xp Or Windows 2003 Server It Builds Successfully

Sep 25, 2011

I am building a Setup project for a Web system using Visual Studio 2008. I upgraded my development machine from Windows Xp to Windows 7. The problem started with Windows 7. Whenever I try to build I get the above error. I ve tried several solutions given online but I ve failed to get a solution. When I transfer the system to a machine running Windows Xp or Windows 2003 Server it builds successfuly.

View 4 Replies

Windows Azure Storage In VB: Not Running In A Hosted Service Or The Development Fabric?

Sep 4, 2010

I'm trying to run an instance of the Azure Blob Storage in the Azure Visual Studio 2010 development environment, but keep getting the followingrror:System.InvalidOperationException: Not running in a hosted service or the Development Fabric.The stack trace is pointing to these lines:

Imports Microsoft.WindowsAzure
Imports Microsoft.WindowsAzure.Diagnostics
Imports Microsoft.WindowsAzure.StorageClient

[code].....

View 2 Replies

Show A Dialog (based On Current Code Is Running In A Winform App OR Windows Service)?

Apr 7, 2011

I have some shared code I need to use both in a WinForm and a service. How can I test if my code is running in a service, so I can avoid problems with modal dialogs.

View 2 Replies

IDE :: Running RTD Server In Windows 7 But Not In XP?

May 18, 2011

I'm trying to make an RTD server unicode compliant. It is written in VB .NET 2003, and to my understanding, Unicode characters are used internally, so no conversion should be required, right?

When I run this on an English Windows xp machine, it works fine, but when testing on a machine with a Portuguese version of Windows 7, a couple of the RTD server's dialog boxes will not open in the add-in section of Excel. Does anyone have an idea why this would happen in Windows 7 Portuguese?

View 4 Replies

Windows Service Interacting With SQL Server Database?

Dec 24, 2010

I have a windows service application that is meant to interact with SQL server database (INSERT, UPDATE, ETC). The windows service application is also multi-threaded.I created an "App_Data " folder to keep my database and used app.config file for connection information, etc.

After installing and starting the service, nothing happens, the database doesnt get updated, etc.

Has anyone ever written a windows service application that interacts with a database? Kindly advice me on how to overcome this problem..

View 2 Replies

VS 2005 Find Files In A Server In A Windows Service?

Mar 26, 2009

I use VB.net to create a Windows Service . its job is to connect a server ( for exemple \10.10.10.10ox named P: and collect files .but the problem is the result of mapping the server ( Dir P: = "" ) return nothing i don't find my files !!!Do i have to use the ftp in windows service ?? because when i use a windows form apllication there is no problems and I find all the files

View 3 Replies

Re-use Socket (UDP) With Another Port?

Apr 17, 2008

I have a socket which I use to monitor data on a specific UPD port (Let's say 1200).[code]...

View 3 Replies

Performance - Running Application On Windows 2003 Server?

Mar 3, 2010

I've developed a VB.NET application with Visual Studio 2008. The application communicates with SQL Server and processes a text file.

My question is about performance. While I run it from Visual Studio 2008, it takes 3 sec to complete. The same is when I run the executable created by the Setup Wizard on my desktop (Windows XP sp 3). But if I run the executable installed on a Windows 2003 Server, it takes 15 sec to complete! What could be the reason of degrading performance on the server vs. the desktop? The .Net framework 3.5 SP1 is installed both on the desktop and the server.

View 1 Replies

C# - Read A XML Data From TCP Port Socket

Jun 2, 2010

I have a device which send me data over a particular port. The data is in XML Format.

Now I already did a small console application which listen for the data and print out the data on the screen.

Now my plans are to deserialize the xml data or I will create the insert statement into the database.

1) The device send me the data every second (if there is data to send me).

2) I cannot say how much data the device is going to send me.

How can I make sure to capture all data without loose any information..

View 2 Replies

Port / Socket Remains Open After Crash

Aug 14, 2009

I'm having this problem with a networked app in vb.net. If the program exits normally the port closes fine, however, if it crashes sometimes it remains open and I am unable to close it. The next time I run the program it is unable to open the port because it is already in use. Here's the exception: 10048: Only one usage of each socket address (protocol/network address/port) is normally permitted on how I can reclaim this port, or how I can close it? I tried using the reuse address socket option

[Code]...

View 7 Replies

C# - Make Service Act Dynamically Based On Service Running Condition?

Jul 6, 2011

i was trying to make my service act dynamically... i have set time for my service about for 2 min ,if suppose it was doin huge amount of work means it will exceeds that 2 min time limit then we need to check the service condition if work is pending means we need to run that instance until upto finish.

public static void StartService(string serviceName, int timeoutMilliseconds)
{
ServiceController service = new ServiceController(serviceName);[code]............

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved