Defining the root directory...

C

Chris

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
 
C

Chris

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
 
?

=?ISO-8859-1?Q?G=F6ran_Andersson?=

Chris said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,740
Latest member
JudsonFrie

Latest Threads

Top