Permission wrting to the event log

  • Thread starter Thread starter Pure Heart
  • Start date Start date
P

Pure Heart

hi

i used the below code in my application to write exception messages to the
application event log of windows

Dim msgText As New System.Text.StringBuilder()
' Open Application.
msgText.Append(Me.Message)
msgText.Append(ControlChars.CrLf)
msgText.Append(Me.StackTrace)
Dim ApplicationEventLog As _
New EventLog("Application", ".", Me.AppDomainName)
ApplicationEventLog.WriteEntry( _
msgText.ToString, eventType)
ApplicationEventLog.Dispose()
ApplicationEventLog = Nothing
msgText = Nothing

but i run time i get a security error seems a matter of permissions haw cna
i pass that probleam, this software will run on many pcs with different users
and passwords ?

thank you

--
Ammar S. Mitoori
IT Head QIMCO Co.
Tel : +9744831199
Mobile : +9745378400
Fax : +9744831643
 
Hello Pure,

What kind of app you are running?! And under which account? u can use task
manager to check the name of account where process runned

---
WBR,
Michael Nemtsev [Microsoft MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


PH> hi
PH>
PH> i used the below code in my application to write exception messages
PH> to the application event log of windows
PH>
PH> Dim msgText As New System.Text.StringBuilder()
PH> ' Open Application.
PH> msgText.Append(Me.Message)
PH> msgText.Append(ControlChars.CrLf)
PH> msgText.Append(Me.StackTrace)
PH> Dim ApplicationEventLog As _
PH> New EventLog("Application", ".", Me.AppDomainName)
PH> ApplicationEventLog.WriteEntry( _
PH> msgText.ToString, eventType)
PH> ApplicationEventLog.Dispose()
PH> ApplicationEventLog = Nothing
PH> msgText = Nothing
PH> but i run time i get a security error seems a matter of permissions
PH> haw cna i pass that probleam, this software will run on many pcs
PH> with different users and passwords ?
PH>
PH> thank you
PH>
 
hi

its an application im developing not using so haw i can give it permission
to write on computers who will install my software
--
Ammar S. Mitoori
IT Head QIMCO Co.
Tel : +9744831199
Mobile : +9745378400
Fax : +9744831643
 
Back
Top