Wrox Programmer Forums
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking 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 Basics 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 September 5th, 2007, 12:02 PM
Authorized User
 
Join Date: Sep 2003
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default Base Folder

Is it possible to specify (perhaps within web.config) that the root folder for a website should be some website subfolder?

I am using my own personal web domain to test a site that I'm building for a client. Rather than upload the site to my root folder, which happens to be:

  /web

I want to create a folder called:

  /web/testing

and ftp the site to that "testing" subfolder.

Problem is that all references to the site (i.e. ~/misc/about.aspx) break because it searches for something in the root "/web" folder rather than in what I want to be the root "/web/testing" folder.

Is there a simple way to make this work without having to alter all my links to something like:

  ~/testing/misc/about.aspx

etc...

Cheers.

- Roger Nedel
__________________
Cheers.

- Roger Nedel
 
Old September 5th, 2007, 04:09 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Yes, there is, but you probably can't fix that your self.

Syntax like:

~/misc/about.aspx

refers to the Application's root, not to the server's root.

So, when the application is /, then it refers to
/misc/about.aspx

But when the application is /Testing, then it's referring to:

/Testing/misc/about.aspx

To change your folder into an application, open its properties in IIS and click the Create button. With an ISP / host you'll need them to do this for you.

Alternatively, instead of going one level deeper, you can create a folder besides your current one. So, use /Testing instead /web.

Imar



---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
 
Old September 5th, 2007, 04:33 PM
Authorized User
 
Join Date: Sep 2003
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Imar,

Thank you. I'll have to take it up with my hosting company then.

Cheers.

- Roger Nedel





Similar Threads
Thread Thread Starter Forum Replies Last Post
Bug Base jackandjo BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 2 January 22nd, 2008 02:31 PM
d.base MathLearner VB Databases Basics 1 May 17th, 2007 07:39 AM
why use base[] indexers?? oooshola BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 January 31st, 2007 12:50 AM
App_Code folder shared on only 1 folder? rpeters83 ASP.NET 2.0 Professional 1 September 1st, 2006 10:53 PM
Making a folder virtual folder on button click in CsharpHelp C# 0 October 26th, 2005 05:57 AM





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