Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 5th, 2007, 12:02 PM
Authorized User
 
Join Date: Sep 2003
Location: Park City, UT, .
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
Reply With Quote
  #2 (permalink)  
Old September 5th, 2007, 04:09 PM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 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
Reply With Quote
  #3 (permalink)  
Old September 5th, 2007, 04:33 PM
Authorized User
 
Join Date: Sep 2003
Location: Park City, UT, .
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 10:12 PM.


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