Note that there are some explanatory texts on larger screens.

plurals
  1. POWindows services permission problems
    primarykey
    data
    text
    <p>I have written a windows service that uses the openpop mail client and retreives emails. Then it goes through the subject and body update databases and all kinds of stuff. It also downloads the attachments and creates a folder directory on the drive based on the timestamp of the email it goes by year, then the month, then the day, and then saves the image. So, I built this service on my machine in development using a class library project, a winform project for debugging, and a windows service project. All the logic is contained in a Classlibrary. I build the library and reference the dll in both the form and the windows service. When I build the service on my machine and install it using installutil it works fine, and does what it's supposed to do. But when I went to production, the OS is Windows Server 2003 R2, and it is using a different connection string for the LIVE database. </p> <p>The only things that changed were the connection string and the operating system. I installed the service and it installed fine, but does nothing. It doesnt create the folders or save the images to disk. I know I should have been logging errors, but this is my first job and I am new in this field. So I tried writing some logging events, but it doesn't create the log and write the events. As a matter of fact, if I try to create the log and write an event, as my first call in the onstart sub, it doesnt do it. Now I'm lost, and I am not sure where to go from here. If you took time to read this, I appreciate any input you may have.</p> <p>This is the code in my OnStart method.</p> <pre><code> Dim LiveEvents As New EventLog If Not EventLog.SourceExists("MySource") Then EventLog.CreateEventSource("MySource", "GL") End If LiveEvents.Source = "MySource" LiveEvents.Log = "GL" LiveEvents.WriteEntry("ServiceStarted and is working.", EventLogEntryType.Information) Dim Logic As New ProcessMail workTimer = New Timer(New TimerCallback(AddressOf Logic.ProcessMessages), Nothing, (1000 * 60 * 10), (1000 * 60 * 10)) LiveEvents.WriteEntry("Called Our DLL", EventLogEntryType.Information) MyBase.OnStart(args) </code></pre> <p>So, if you dont know the questions here they go. 1. If i need to create directorys and save files with a windows service in Windows Server 2003 R2. What System System.ServiceProcess.ServiceInstaller Account property should i be using ? 2. Is there any kind of special setup process that i would need to do in winows server 2003 R2 to allow the service i install to have permissions to have read write acces to directories ?</p> <p>Thank you for any information and help you can provide.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload