UnauthorizedAccessException on execution of C# Console App with cgi

This is the situation:
I'm using IIS6 on windows server 2003
In my wwwroot, I have set up a folder cgi-bin, with a script in it that launches a console application on the server.
This works fine, the console application gets launched, but it fails writing to a log file with the following exception:

System.UnauthorizedAccessException: Access to the path 'D:\Website\error.log' is denied.

Now, when I start the console application straight from command line on the server it works fine.
Moreover, the permissions for both the ASP.NET Machine account and the NETWORK SERVICE account on this folder D:\Website are set to allow everything.

Apparently I'm missing a setting somewhere, but I don't know where to look.

The script itself is launched under Internet Guest Account and then maybe your application is also called under that account. Set the permissions on D:\Website folder to give all permissions to internet

The script itself is launched under Internet Guest Account and then maybe your application is also called under that account. Set the permissions on D:\Website folder to give all permissions to internet guest account.

Featured Post

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package. For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…

Learn the basics of strings in Python: declaration, operations, indices, and slicing.
Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…

Learn the basics of modules and packages in Python.
Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…