Click here to Skip to main content
15,886,963 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
QuestionAjax call with RadioButtonList Pin
byka6-Oct-14 6:52
byka6-Oct-14 6:52 
SuggestionRe: Ajax call with RadioButtonList Pin
Eddy Vluggen6-Oct-14 8:18
professionalEddy Vluggen6-Oct-14 8:18 
AnswerRe: Ajax call with RadioButtonList Pin
sankarsan parida7-Oct-14 18:11
professionalsankarsan parida7-Oct-14 18:11 
QuestionWindows Service, design question, threading, how to write a delegate Pin
jkirkerx5-Oct-14 12:26
professionaljkirkerx5-Oct-14 12:26 
AnswerRe: Windows Service, design question, threading, how to write a delegate Pin
Kornfeld Eliyahu Peter6-Oct-14 1:03
professionalKornfeld Eliyahu Peter6-Oct-14 1:03 
QuestionRe: Windows Service, design question, threading, how to write a delegate Pin
Richard Deeming6-Oct-14 1:24
mveRichard Deeming6-Oct-14 1:24 
GeneralRe: Windows Service, design question, threading, how to write a delegate Pin
jkirkerx6-Oct-14 6:39
professionaljkirkerx6-Oct-14 6:39 
QuestionWindows Service, Little help getting started Pin
jkirkerx2-Oct-14 11:35
professionaljkirkerx2-Oct-14 11:35 
I stated my service project.
So I could not find instalutil on my hard drive, searched, OK, you just write a built-in one.

So I guess I need to get it installed first, and then running so I can attach to it to use the debugger.

Found this here on CJ
Translated it to VB

I think the path is wrong that I'm feeding to the installer class _servicePath, but I can't figure out a way to check the value.

Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.IOException

Public Shared Function install() As Integer

        Dim dwExitCode As Integer = 2

        Try
            Dim servicePath As String = Reflection.Assembly.GetExecutingAssembly.Location
            smtp_messenger.eventLog1.WriteEntry(servicePath, EventLogEntryType.Information, 1)

            Dim pathArray() As String = {servicePath}
            ManagedInstallerClass.InstallHelper(pathArray)

            dwExitCode = 0

        Catch ex As Exception
            dwExitCode = 1
            smtp_messenger.eventLog1.WriteEntry(ex.Message, EventLogEntryType.Information, 1)

        End Try


        Return dwExitCode

    End Function


Plus I don't get the eventlog thing, Am I using this right here? The MyServer, Should I replace that with my machine name?

eventLog1 = New System.Diagnostics.EventLog()
If (Not System.Diagnostics.EventLog.SourceExists(eventSourceName, "MyServer")) Then
  System.Diagnostics.EventLog.CreateEventSource(eventSourceName, logName)
End If

eventLog1.Source = eventSourceName
eventLog1.Log = logName

eventLog1.WriteEntry("Service has installed successfully", EventLogEntryType.Information, 1)


So I guess in a service, you can't display a message box. Not sure about the console line, I just need to be able to see some values so I can at least get the service installed and running.
AnswerRe: Windows Service, Little help getting started [solved] Pin
jkirkerx2-Oct-14 12:35
professionaljkirkerx2-Oct-14 12:35 
AnswerRe: Windows Service, Little help getting started Pin
Kornfeld Eliyahu Peter6-Oct-14 1:01
professionalKornfeld Eliyahu Peter6-Oct-14 1:01 
QuestionWindows Service that sends emails Pin
jkirkerx1-Oct-14 10:23
professionaljkirkerx1-Oct-14 10:23 
AnswerRe: Windows Service that sends emails Pin
Garth J Lancaster1-Oct-14 10:55
professionalGarth J Lancaster1-Oct-14 10:55 
GeneralRe: Windows Service that sends emails Pin
jkirkerx1-Oct-14 11:04
professionaljkirkerx1-Oct-14 11:04 
GeneralRe: Windows Service that sends emails Pin
Garth J Lancaster1-Oct-14 13:46
professionalGarth J Lancaster1-Oct-14 13:46 
GeneralRe: Windows Service that sends emails Pin
PIEBALDconsult1-Oct-14 11:32
mvePIEBALDconsult1-Oct-14 11:32 
GeneralRe: Windows Service that sends emails Pin
jkirkerx1-Oct-14 11:38
professionaljkirkerx1-Oct-14 11:38 
GeneralRe: Windows Service that sends emails Pin
PIEBALDconsult1-Oct-14 11:44
mvePIEBALDconsult1-Oct-14 11:44 
GeneralRe: Windows Service that sends emails Pin
jkirkerx1-Oct-14 11:45
professionaljkirkerx1-Oct-14 11:45 
AnswerRe: Windows Service that sends emails Pin
jschell3-Oct-14 9:11
jschell3-Oct-14 9:11 
GeneralRe: Windows Service that sends emails [Update on my progress] Pin
jkirkerx3-Oct-14 11:05
professionaljkirkerx3-Oct-14 11:05 
Questionasp:Menu select based on URL Pin
byka1-Oct-14 3:15
byka1-Oct-14 3:15 
AnswerRe: asp:Menu select based on URL Pin
Eddy Vluggen1-Oct-14 3:25
professionalEddy Vluggen1-Oct-14 3:25 
GeneralRe: asp:Menu select based on URL Pin
byka1-Oct-14 3:41
byka1-Oct-14 3:41 
QuestionRe: asp:Menu select based on URL Pin
ZurdoDev1-Oct-14 3:42
professionalZurdoDev1-Oct-14 3:42 
AnswerRe: asp:Menu select based on URL Pin
byka1-Oct-14 4:03
byka1-Oct-14 4:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.