Solved

UnauthorizedAccessException on execution of C# Console App with cgi

Posted on 2011-02-25
2
727 Views
Last Modified: 2013-12-25
Hello!

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.

Open in new window


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.

Thanks in advance for your time!
Dieter
0
Comment
Question by:DieterW
2 Comments
 
LVL 13

Accepted Solution

by:
devlab2012 earned 500 total points
ID: 34980447
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.
0
 

Author Closing Comment

by:DieterW
ID: 34997581
That worked!
I hadn't heard of the Internet Guest Account.
Thanks!
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

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.

Join & Write a Comment

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…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
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…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now