By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,916 Members | 1,286 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,916 IT Pros & Developers. It's quick & easy.

Defining the root directory...

P: n/a
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

Jun 25 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
~ 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

"Chris" <dr*****@gmail.coma écrit dans le message de news:
11*********************@c77g2000hse.googlegroups.c om...
>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

Jun 25 '07 #2

P: n/a
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
Jun 25 '07 #3

P: n/a
Chris wrote:
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?
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.

--
Göran Andersson
_____
http://www.guffa.com
Jun 25 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.