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
ADVERTISEMENT
Jul 7, 2009
In the past I had the indexing service installed on a Windows Server 2003 and used it to index files for my website. I did this by executing an OleDbCommand with a query and a connection string.How do I accomplish the same thing with the new "Windows Search Service" (Windows Server 2008) by using VB.NET? Does this work the same way so that I only need to change the Provider name which has been "MSIDXS.1" up to now? Case true, what is the new Provider name?
View 1 Replies
Jul 23, 2009
I am trying to communicate with a Windows service on a remote machine on the network but i keep getting an exception saying the following: "System.InvalidOperationException: Cannot open Service Control Manager on computer 'machine001'. This operation might require other priviledges. ---> System.ComponentModel.Win32Exception: Access is denied.
[Code]...
View 4 Replies
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
Nov 3, 2011
Windows 7, 64 Bit Windows search 4.0 VB.NET Code running on local machine but destined for a 2003 server serching in a local folder. Using the following code to search through a folder filled with PDFs for a single key word. The search word is not found. ETSResumes is the name of a catalog listed in the Indexing Services. It points to the folder with the PDFs. Desktop search or search can find the correct files.
[Code]...
View 3 Replies
Jul 19, 2011
I have written a service to run an exe.What I have also tried to do is check if the file is present on the local computer, and if not copy it from a networked drive to the local computer.
If File.Exists("\\static1\software\testapp.exe") = True Then
File.Copy("\\static1\software\testapp.exe", "C:\Program Files\Testing\testapp.exe")
End If
I have previously ensured that the directory exists.When I run this as a service, it doesn't work. No errors are thrown up, but the file is not copied.When I put this into a windows forms application it works fine.
I have used:
Imports System.IO
In the header. why this won't work?
I have also tried:
My.Computer.Network.DownloadFile("\\static1\software\testapp.exe", "C:\Program Files\Testing\testapp.exe")
And that also does not work.I am trying to run this on Windows XP Professional.
View 1 Replies
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
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
Aug 1, 2010
I've been developing in .NET (VB, C++, C#) for a number of years, but I am finally creating my first service application (in VB). I need to read/write to a file contained within a user's documents. As a service is not associated with a particular user, would a service have access to a user's documents? ...regardless if that user is signed on or not?
View 2 Replies
Mar 29, 2010
Is there a any code to create the windows service in VB.net 2005 that you can pass on. I am actually trying to make a Windows service which will query SQL as well as Oracle database using procedures. This service will keep running until it is manually shutdown. This is my first windows Service I am writing in VB.net.
View 1 Replies
May 19, 2009
I am using Vb 2005 to develope a windows service, i have completed a long flow,but at the end i am having a little problem.When i use process.start("abc.exe"), it didnt show me But when i have a little more analysis of the problem i noticed that its running in background by making windows service as its parten process, So it means process runs but as a service how i can show that application on desktop?
View 3 Replies
May 19, 2009
I will be googling this but in case I don't find it easily, here is my question - how do you install a windows service that you've developed on your own PC to a server? Is there an option to produce the package (I thought it was an msi file) which you can run on the server?
View 1 Replies
May 20, 2010
I'm creating a program to stop a particular windows service.This windows service was also written by me.The service will watch a folder and cut and paste the file to another location.The service was running OK.And I have another (TESTING) console application which will try to stop this service only. (I'm doing testing!)However, the app failed to stop the service.
Here is the code i use to stop the service.
VB.Net
' AutoMover is my windows service name.Dim controller As New ServiceController("AutoMover")controller.Stop()controller.WaitForStatus(ServiceControllerStatus.Stopped)controller.Start()
The debug line stop at WaitForStatus because the service didn't stop.Here is the Stop function from my windows service
VB.Net
Protected Overrides Sub OnStop() GC.Collect()End Sub
After a few seconds (may be 1 minutes or 2), there is an error message box pop up from window and said the following error msg.' Auto Move is my service Display Name.Could not stop the Auto Move service on Local Computer.Error 1053: The service did not respond to the start or control request in a timely fashion.If I click Stop from Services.msc, it stop successfully. Strange!!
View 2 Replies
Dec 25, 2009
I'm creating a program to stop a particular windows service.This windows service was also written by me.The service will watch a folder and cut and paste the file to another ocation.The service was running OK.And I have another (TESTING) console application which will try to stop this service only. (I'm doing testing!)
VB.Net
' AutoMover is my windows service name.Dim controller As New ServiceController("AutoMover")controller.Stop()controller.WaitForStatus(ServiceControllerSta
[code].....
View 5 Replies
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
Jul 26, 2011
I am writing a Windows service to import data from CSV files dropped into a directory. One of the steps is to load an XML file with validation rules which I load into a List(Of T). It will pull the data, and then I have it pass the list to a class that monitors the folder and processes the files. After that I clear the list and read in the next file configuration. Now I have noticed that the validation rules aren't matching up and it seems that the list is being passed as a reference type even though the signature is of a value type.Is there anything I can do to get around this?
[Code]...
So here when I pass it, at first it will have 3 validation rules in the new ImportService class I created, but when I call fields.Clear(), it wipes out the class member of the ImportService class.
View 4 Replies
Jul 27, 2009
I have created a windows service that monitors power events on the host machine. The next step that i wanted to do was to send custom messages to the service. To do this i have created a windows application and added a service controller control to it (drugged it from the toolbox). Initially i tried to send messages to my machine which worked fine (both the service controller and the service were running on the same machine)
Dim scSL As New System.ServiceProcess.ServiceController("MyFirstService", ".")
scSL.ExecuteCommand(128)
but when i tried to send a message to a remote machine on the network
Dim scSL As New System.ServiceProcess.ServiceController("MyFirstService", "machine001")
scSL.ExecuteCommand(128) i got the following error:
"System.InvalidOperationException: Cannot open Service Control Manager on computer 'machine001'. This operation might require other priviledges. ---> System.ComponentModel.Win32Exception: Access is denied.
Anyone knows what priviledges i need to set on the machine that has the service controller? Alternatively can anyone recommend a solution to this issue?
View 6 Replies
Apr 3, 2012
I need to find a good control for VB.Net to upload big files to an FTP server:
Can upload files up to 10GB
Uses passive mode
Provides feedback during upload, to make sure it's going OK
Can cancel and resume
Up to two concurrent connections
I read about WebClient + NetworkCredential, but it doesn't seem to provide progress infos. There are also the FTPWebRequest/FTPWebResponse classes from WebRequest/WebResponse, as well as WebClient.UploadFileAsync.
View 1 Replies
Jul 14, 2011
i have a Windows service that is hosting a WCF service through net.tcp and this is working great. I have also created a WCF service application. I am trying to add the net.tcp service reference to the service application. Then I add it to the GAC that goes ok but if I try to RegAsm the WCF service application to allow it to be called from Server.CreateObject I get the error:
Warning: Type library exporter encountered a type that derives from a
generic class and is not marked as
[ClassInterface(ClassInterfaceType.None)]. Class interfaces cannot be
exposed for such types. Consider marking the type with
[ClassInterface(ClassInterfaceType.None)] and exposing an explicit
interface as the default interface to COM using the
ComDefaultInterface attribute.
It does not work. I have tried to call it through a class library but this does not work either as the end point is not set correctly.
View 1 Replies
Dec 12, 2011
I have an application that allows the user to conduct database backups and restores. The users had been using Windows XP, with network security that allowed users to read the registry. For restores, the installation path to the SQL Server named instance was easily found by looking up the instance name in the registry using
restoreDir = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\" & m_DatabaseInstanceName & "\Setup", "SQLPath", Nothing).ToString
They have recently upgraded to Windows 7, and locked down the registry so that users can not read values from it. Is there a way (via code) to find the path to a named instance of SQL Server, so that the app can automatically place the database files (mdb & ldb) in the correct folder?
View 2 Replies
Oct 30, 2007
I have a simple Windows Service that reads from an Excel spreadsheet and imports the records into a SQL Server 2000 database table. Before it loads it checks if the file has been successfully imported before (using filename) and whether any of the records in the file have been imported before (using primary key). If these checks are ok I load the records into a datatable and then update the datatable to the database.
However, I need to do this in a transaction as I want to ignore the whole file if there is an error. The file goes to a discarded folder and the user gets an email with why the import failed. (This is likely to be because the store the record is for is not yet added to the database and the referential intergrity of the db fails). If there is no transaction the records before the failure record are imported. When the file is imported again (the store has been added to store table) the file is then rejected because duplicate records are already in the db.
Heres my code:
[CODE]...
View 3 Replies
Mar 9, 2010
I have VB.net console application which is working fine locally. It should start once I double click it.I created a setup project (using Setup and Deployment wizard) and publish it on the server, it does not work. It just flashes and then goes away.Would there be any dependencies I'm overlooking?
I included during my setup-
Primary output from 'myapp'
Source files from 'myapp'
Debug Symbols from 'myapp'
I even tried to add the exe (which works on my machine separately on the server, but does the same.
View 3 Replies
Aug 7, 2010
I have stored an excel file within an SQL Server Table having the corresponding column data type as varbinary (MAX) through a VB .NET windows application form. how can I retrieve and open the stored excel file for manipulation?
View 2 Replies
Mar 20, 2012
I will use the Background Intelligent Transfer Service (BITS) to transfer files from a client (laptop) to a shared folder on a server within our local network.The problem is a very slow network bandwith, if we transfer a file, the other clients canīt work, all requests to other clients (application) or viewing internet pages needs a long time.My idea is to use BITS in my tool to copy/transfer a file from client to server, also I hope to get more performance for the internet requests.
View 2 Replies
Jul 20, 2010
I'm trying to write a windows app that will download files from a server. It is working fine for small files, but not the larger ones (50Mb+)- I get the error "An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full."This is the code I am using:
Private Function DownloadFile(ByVal fileSource As String, _
ByVal fileDestination As String, _
ByVal WebRequestType As String) As Boolean
[code]....
View 1 Replies
Jul 18, 2011
Is it possible to store excel, word, pdf, .rar .zip files to a column in a table of a SQL Server 2005 DB.And also open the fie with excel, word, acrobat reader, etc????My other sollution would be to store the file on a location on a server and only sory the filename and location in my db and then open them with "Process.Start("filename")".My main problem with solution 2 is this:Lets say I install the programm on a pc called "manager". When I use the savefiledialog and I am on the manager pc the string C:/myfiles/test.xls will be stored
View 1 Replies
Oct 6, 2009
I have a windows service I created that checks for data to post to an off site webservice over SSL. The service checks every 10 seconds for data to send, if there is data it opens a connection to the remote webservice, and closes the connection after 120 seconds (still checking for data to send during this time). The service works fine if a user is RDP'd into the server, but as soon as no one is logged on and the service attempts to push data, I receive the following error:"The underlying connection was closed: An unexpected error occurred on a send."I have tried running the service as a local service, network service, under my login, and under a service account, but nothing seems to work. The PC it is running on is a windows 2003 server (virtualized - vmware)
Protected Overrides Function GetWebRequest(ByVal Uri As Uri) As System.Net.WebRequest Dim oWebrequest As System.Net.HttpWebRequest = MyBase.GetWebRequest(Uri) oWebrequest.KeepAlive = False oWebrequest.ConnectionGroupName = Guid.NewGuid.ToString oWebrequest.ProtocolVersion =
[code]....
View 1 Replies
Feb 23, 2010
I have a VB.NET executable program that I've been running nightly as a Windows Scheduled Task on a Windows Server 2003 machine. I have the source code, and it was compiled using VS 2005. Now I want to run it on a Windows Server 2008 R2 machine. If I try to "open" it from Windows Explorer, I get "The version of this file is not compatible with the version of Windows you are running." It is in Program Files(x86), so doesn't the OS know to run it as a 32-bit application? Do I have to load this in VS2008 and recompile it there as a 64-bit app? But all my old VB6 and VBScript scheduled tasks are running fine, why is the OS only complaining about this program?
View 1 Replies
Apr 24, 2012
I have a windows app created in 2005 with sql server backend. There's also a web service that is located on a web server at a hosting facility. In my app, when ever it needs to interact with the data, it calls the web service.Ive been having this issue with several screens that Ive developed in .Net. The user enters a date, and saves to the database. When the datagridview is refreshed, the date that they entered always displays one day earlier. Eg. If they entered 4/18/2012, it displays as: 4/17/2012.
The date is correct in the database. I verified that the problem resides on the web server. The default timezone set on the server is GMT -06.00 Central Time(US and Canada) and it cannot be changed on the shared server. The time zone where I'm at is Pacific Standard time. I'm not sure the best way to deal with this issue. Here's one way I was thinking: Retrieve today's date from the server (don't know how to do this), and compare it to the date on my machine so I know the difference. Then, when I'm looping through the datatable, add this same number to the dates to display correctly. Maybe it's better to retreive it from the database via the sql?
View 13 Replies
Aug 12, 2011
I've inherited a .NET app to support / enhance which reads in a couple of files of high hundreds of thousands of rows, and one of millions of row.The original developer left me code like :-
For Each ModelListRow As String In ModelListDataArray
If ModelListRow.Trim.Length = 0 Or ModelListRow.Contains(",") = False Then
GoTo SKIP_ROW
[code].....
and it takes an age (well, nearly half an hour) to import these files.
View 2 Replies