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 / ASP.NET / General / June 2007

Tip: Looking for answers? Try searching our database.

Defining the root directory...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chris - 25 Jun 2007 16:45 GMT
I have created a site with VS2005, using asp.net/c#.  When I try to
deploy this site to our intranet asp server all of my links that were
"~/Folder/Site.aspx" no longer work because when I move it to
production it says that it cannot find the site.

So I'm working on a site on my own local PC which looks like this: C:
\ASP.net Website

When I move it to my production environment I copy to a folder X:
\MetaDim\Main where X is my mapped network drive.

All the files copy over, but when I move it over the links that use
the root character "~/" get messed up.  They should be:  "X:\MetaDim
\Main\Default.aspx" but the site sees it as "X:\Default.aspx" but that
file doesn't exist there.

So my question is, is there a way in the web.config to tell my website
where I want the root directory to be?  For example, can I create an
entry in web.config that would say something like <rootdir="MetaDim
\Main"/> so when I move it over to production, I can just add that?
Thanks
Patrice - 25 Jun 2007 17:28 GMT
~ refers to the root of the application so just use the IIS console to
define the root of your web application :
http://msdn2.microsoft.com/en-us/library/ha2y9493.aspx

Also how you use the X: drive is a bit unclear but keep in mind that
mappings are account dependents...

--
Patrice

>I have created a site with VS2005, using asp.net/c#.  When I try to
> deploy this site to our intranet asp server all of my links that were
[quoted text clipped - 17 lines]
> \Main"/> so when I move it over to production, I can just add that?
> Thanks
Chris - 25 Jun 2007 17:37 GMT
Thanks, I don't control the IIS but I will let them know.  What I mean
with the X drive is I have to throw my website files out to a public
lan directory, from there I can use a dashboard to promote those files
to development, integration, and production, etc...  But X drive is
just a mapping to that 'hold' area where I load my files to before
promoting them to actual web servers
Göran Andersson - 25 Jun 2007 17:42 GMT
> I have created a site with VS2005, using asp.net/c#.  When I try to
> deploy this site to our intranet asp server all of my links that were
[quoted text clipped - 14 lines]
> So my question is, is there a way in the web.config to tell my website
> where I want the root directory to be?

No. The root folder is the root folder of the web application. It's the
folder that is assigned to be the root of the application in the
settings for the web application in IIS.

>  For example, can I create an
> entry in web.config that would say something like <rootdir="MetaDim
> \Main"/> so when I move it over to production, I can just add that?

No, the web.config for the application level has to be in the root
folder. If the folder where the web.config is, isn't already the root
folder, the web.config file will not be the config file for the
application level, and can not contain any application level settings.
Even if there were such a setting, which there isn't.

Signature

Göran Andersson
_____
http://www.guffa.com


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.