Create a writable folder in aspnet setup project

R

roger

I've created a web setup project for my aspnet app, and added
a web folder item "tmp" to the File System editor under the web
application folder.
(My app uses this folder for generating image files and such)

Problem is, I can't figure out how to make this folder writable by
the ASPNET user during installation.I've set the writable property
for the new folder object, but it doesn't give the permission to
the ASPNET user.


I thought to try and create a custom install action and manipulate
the directory permissions in there, but I can't figure out
how to change the current access permissions of an existing directory.
Alternatively, I could just create the tmp folder in the custom action,
but I don't see how to specify the permissions when creating a directory.
I see the FileStream constructor takes a FileAccess argument, but I don't
see any mechanism to pass one of those to Directory.CreateDirectory...


Any help appreciated..

Thanks
 
R

roger

Thanks for that tip.

However, when I load the activeds type library into my solution,
The symbols that I see in the ActiveDs namespace don't match
up with the code that this example shows.

According to the properties for the ActiveDs type library that I see,
it's version 1.0. Perhaps I have an older version than this example
assumes or something.


I've got Windows 2000 SP4, the .NET 1.1 framework,
and Visual Studio 2003.

I'll need to study more about ActiveDs to figure out what's up.

Unless anyone has any ideas....
 
R

roger

For the record,

I don't know whether this qualifies as clever or stupid,
but what I decided to do just use Process.Start to run
a cacls command from my custom install action in order
to manipulate the permissions for the folder in question.

Good enough for my purposes.
 

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top