Can't create test certificate for service

Blake81

Well-known member
Joined
Feb 23, 2006
Messages
304
Location
Georgia, USA
Programming Experience
1-3
I'm trying to compile a service, and it needs a certificate before it will work. When I try to create a test certificate, I get this error:

1018842646_adb80d5b66.jpg


Can someone help me figure out how to create the certificate, or to find a way to use this without a certificate? Thanks.
 
Thanks for the link. It looks like that site will give me a test certificate, but it's for IIS. Also, I don't know what would happen when the certificate expires. Since I don't have IIS, I can't generate a CSR. I'll have to keep looking for other options.
 
Are you sure you need a certificate? Maybe you shouldn't sign it? Also there is a tool MakeCert.exe that creates test certificates and is probably missing, it doesn't appear to be available any longer.
 
I thought there might be some kind of glitch in my version of Visual Basic. Anyway, I managed to create a certificate and compile it in Visual Studio at work. Now when I run installutil.exe, I get this:
1031640609_b3274910aa.jpg


Is there something I can change to stop that? I don't know where to look in the manifest to fix this.
 
Thanks! I got it installed. Now when I start it, it stops the service because it says it has nothing to do. I put all of my code in the Form1 class. Basically what I want this to do is just have a NotifyIcon in the system tray that will display Form1 when I right click and select it from a menu. How can I get a service to keep a notify icon in the tray? Mine won't even show it at all, even with this code:
VB.NET:
Public Class ProofWatcher
    WithEvents fsw As System.IO.FileSystemWatcher
    Public Shared filecomp() As String
    Protected Overrides Sub OnStart(ByVal args() As String)
        If My.Settings.prooffolder <> "" Then
            fsw = New System.IO.FileSystemWatcher(My.Settings.prooffolder, "*.txt")
            fsw.NotifyFilter = IO.NotifyFilters.FileName Or IO.NotifyFilters.LastWrite Or IO.NotifyFilters.Size
            fsw.EnableRaisingEvents = True
        Else
            Dim deffolder As String = "C:\"
            fsw = New System.IO.FileSystemWatcher(deffolder, "*.txt")
            fsw.NotifyFilter = IO.NotifyFilters.FileName Or IO.NotifyFilters.LastWrite Or IO.NotifyFilters.Size
            fsw.EnableRaisingEvents = True
        End If
        Me.NotifyIcon1.BalloonTipIcon = Windows.Forms.ToolTipIcon.Info
        Me.NotifyIcon1.BalloonTipText = "Service Started"
        Me.NotifyIcon1.BalloonTipTitle = "Service Started"


    End Sub
 
Windows Services doesn't have forms, they don't normally interact with the user desktop. IPC methods is the recommended way for UI applications to communicate with services, or with the simple interface of ServiceController.
 
Back
Top