473,396 Members | 2,002 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,396 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 3627
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.