473,322 Members | 1,703 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Create a writable folder in aspnet setup project

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
Jul 21 '05 #1
3 3624
Goto the following link and there you will find an example on how to change
permisisons on a file object. Use the same method for folder.

http://www.netomatix.com/DirectoryServices.aspx

Naveen Kohli

"roger" <xr**@rogerware.com> wrote in message
news:Xn*****************************@63.240.76.16. ..
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

Jul 21 '05 #2
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....
"Naveen K Kohli" <na*********@hotmail.com> wrote in
news:Ow**************@TK2MSFTNGP12.phx.gbl:
Goto the following link and there you will find an example on how to
change permisisons on a file object. Use the same method for folder.

http://www.netomatix.com/DirectoryServices.aspx

Naveen Kohli

"roger" <xr**@rogerware.com> wrote in message
news:Xn*****************************@63.240.76.16. ..
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



Jul 21 '05 #3
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.

roger <xr**@rogerware.com> wrote in news:Xns958887090C336rsrrogerwarecom@
204.127.199.17:
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....
"Naveen K Kohli" <na*********@hotmail.com> wrote in
news:Ow**************@TK2MSFTNGP12.phx.gbl:
Goto the following link and there you will find an example on how to
change permisisons on a file object. Use the same method for folder.

http://www.netomatix.com/DirectoryServices.aspx

Naveen Kohli

"roger" <xr**@rogerware.com> wrote in message
news:Xn*****************************@63.240.76.16. ..
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




Jul 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Ramil Domingo | last post by:
Hi All, I would like to know how to create a setup and deployment project for all my source code solution with varying projects such as VB.NET, C#, ASP.NET, Web Services, etc. so that I could...
1
by: Tom | last post by:
I created an msi using the Setup Wizard, but don't seem to be able to create a shortcut to the applicaton on the desktop (or prompt for one) or the menu. Also, I would like to add an "uninstall"...
5
by: David Webb | last post by:
The problem started when the Working Folder for a project was somehow set to the folder of another project. I set the correct working folder in VSS and deleted the .vbproj files that had been...
6
by: Frank Wilson | last post by:
Tom, It sounds to me like ASP, not ASP.NET is handling the request for WebForm1.aspx. This is most likely an IIS config issue that may have been caused by order of installation or...
9
by: Marc Miller | last post by:
Hi all, I have 2 dev. machines, the 1st is Win 2000 with .NET 7.0 and the 2nd is XP Pro with .NET 2003. My Web Server is Win 2000 Server with IIS 5.0. I can create a new project on my test...
3
by: roger | last post by:
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...
4
by: I_AM_DON_AND_YOU? | last post by:
There is one more problem I am facing but didn't get the solution. In my Setup Program I am not been able to create 2 things (when the program is intalled on the client machine ) : (1) create...
6
by: JonSteng | last post by:
..Net Visual Studio Professional 2003 Version 7.1.3088 ..Net Framework 1.1 SP1 Version 1.1.4322 IIS 5.1 Windows XP Professional SP2 Micron T3000 Laptop (1.5 GHz; 1GB RAM; 40GB HD with 17GB Free)...
3
by: sanghavi | last post by:
how to create a set up project in vb.net..how to run an application on a different machine
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.