Hi,
I have a complex web application that can be customized by writing code at
runtime. The application reads code from a database, compiles it, and saves
a compiled assembly in a directory.
First I have to create a directory where I store the compiled files. I have
thought of two different settings.
I could create a sub-directory under the "bin" directory of my web
application.
or
I could create a sub-directory under Program Files.
The problem is that the default ASPNET account has limited access rights and
it does not have write access for either of those two directories.
Is there an (easy) way of modifying the access rights of a destination
directory in the deployment project.
Regards,
Peter Str?iman
bill_77 - 17 Mar 2004 01:21 GMT
I ran into the same thing trying to create an error log file. I discovered that I *could* create it in the root of the virtual directory my app runs in. It might also be able to write to subdirs under that but I didn't try that and wouldn't be too surprised if it can't.
To get the absolute path of your virtual directory use:
string myPath = this.Context.Request.MapPath("");
Enjoy!