Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Setup / March 2004

Tip: Looking for answers? Try searching our database.

How do I set access rights of a directory when creating a deployment project.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Peter Str?iman - 26 Feb 2004 10:19 GMT
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!

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.