How do I grant permissions to my .NET 2.0 program in Windows 2003?

D

dberman

I created an application under C# that runs as a Windows Service. On
my workstation the application runs fine. On my Windows 2003 server,
it doesn't. I used the .NET framework 2.0 InstallUtil to install my
Windows Service. The service appears in the service list, and if I try
to start it, it fires up and I can see in the Event Log that the
application started. However, the first thing my application does is
write an event to the Windows event log to check in, and that event
doesn't appear. The second thing the application will do is insert a
record in a SQL server database, that doesn't happen either.

I used to compile and run this on my Windows 2003 server just fine for
framework v1.1. With 1.1 I would just use the administrative tools in
the control panel to assign a trust level to my application. However,
it seems to have changed under 2.0 and now I can't figure out how to
give my application the necessary permissions to write to the event log
or open a network connection. Are there any articles that will walk a
person through how to do this? I'm searching MSDN and Google to no
avail...

Thank you!

David
 
N

Nicole Calinoiu

Under default CAS policy, all code running from the local machine has
unrestricted CAS permissions. Has the CAS policy on the Windows 2003
machine been altered to change the default local zone permission grant? If
not, why do you believe that you need to alter the CAS permission grant for
your service assembly?
 

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

Top