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

Re: How do I grant permissions to my .NET 2.0 program in Windows 2003? by Nicole

Nicole
Thu Jan 11 11:39:26 CST 2007

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?



<dberman@sen.us> wrote in message
news:1168270074.889606.220980@i15g2000cwa.googlegroups.com...
>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
>