Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
|
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 10th, 2006, 04:13 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 440
Thanks: 0
Thanked 0 Times in 0 Posts
Default Changing bin directory from web.config?

I think I have read somewhere that it is possible to change the bin directory for some web application, so that it is not the default bin directory in the root of the site, which is used. However, I cannot find the way to do it.

Is it possible to include some tag, in the web.config file of the application, which spicifies an alternative bin directory? And in this case, how?

Thanks, Jacob.
__________________
Danish audio books for download at http://www.lytenbog.dk (Danske lydbøger til download).
 
Old July 10th, 2006, 06:07 PM
Wrox Technical Editor
 
Join Date: Dec 2005
Posts: 271
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Jacob,

From what I understand it is NOT possible to change the application dependent directories.

ScottGu writes:

here is unfortunately a few technical reasons why we can't make [the directory names] configurable:

1) Some of the directory names need to be identified before the application starts up. Specifically, you can only set assembly loading policy as part of app-domain creation. As such, the configuration of the directories would have to be set in something other than the local web.config (most likely machine.config) -- which breaks xcopy deployment as well as deployments in hosting environments (where you don't have access to change the machine.config).

2) Blocking the directories needs to be done through a native ISAPI filter (there is no other secure way to-do this out of the box). This filter also can't read from the web.config files of the application (otherwise it would significantly impact perf on all requests -- both asp.net and every other file extension -- to the system). It would also require that you reboot the web-server on every change (which is ugly too). In theory we could enable a registry setting to make this configurable -- but again this starts to get very ugly in terms of breaking deployments and makes administration a nightmare (among other things -- you'd have to be an admin on the box to deploy your app). This also breaks all hosting environment deployments.

Read more here: http://forums.asp.net/2/691250/ShowThread.aspx

Brian Goldfarb writes:

Alternate Solutions Considered
In selecting this solution, we considered a number of other options including using a single root directory for framework content, making the directory naming configurable, and using various other syntax elements to distinguish the framework directories.

Read more here: http://blogs.msdn.com/bgold/archive/...15/257961.aspx

- Adam Kahtava [http://adam.kahtava.com]
 
Old July 12th, 2006, 06:42 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 440
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Adam, though the answer was not what I hoped for :) .

Actually, I already read one of the references before, but thought that the bin directory was different, i.e. that it was in fact possible to change the path locally through the web.config file.

Thanks, Jacob.
 
Old July 12th, 2006, 07:06 PM
Wrox Technical Editor
 
Join Date: Dec 2005
Posts: 271
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Jacob,

Glad I could help. From the discussion on the ASP.NET forum it looked as though the ASP.NET team actually considered allowing application directory names to be modified, but thank goodness they didn’t. :)

Changing the application directory names would be a maintenance programmer’s nightmare. It's nice to be able to customize certain aspects of your environment, but at some point customizations make things more complex then they need to be.

- Adam Kahtava [http://adam.kahtava.com]





Similar Threads
Thread Thread Starter Forum Replies Last Post
web.config dpkbahuguna ASP.NET 3.5 Basics 2 August 26th, 2008 09:41 AM
web.config vs. app.config darlo Visual Studio 2005 11 August 20th, 2008 07:23 AM
How to get the directory of app.config cczhangjm C# 2 May 28th, 2007 02:55 AM
Web.Config tranzformerz ASP.NET 1.0 and 1.1 Basics 1 August 29th, 2005 05:59 PM
Changing Password in Active Directory chandu80 General .NET 0 June 6th, 2005 02:47 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.