Permission wrting to the event log

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
 
M

Michael Nemtsev [MVP]

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>
 
P

Pure Heart

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

permission to write to a log file 1
flash 2
database connection 10
screen resolution independent 3
Problems writing to the Event Log 2

Top