473,387 Members | 1,619 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Defining the root directory...

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
3 2586
~ 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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Ed | last post by:
Hello, I took a course in asp about 2 years ago and I was practicing with IIS 5.0. Then I put it down for a while. Now trying to get back to it. I can't run asp files from subdirectories of...
5
by: Leszek | last post by:
Hello, Could anybody explain what's a difference between a virtual directory and an application root under IIS? I'm a little bit confused. This is mu problem: Let's assume the following...
7
by: Bennett Haselton | last post by:
If you create a ASP.Net Web application in Visual Studio .Net, you apparently have to specify the target as a directory on a web server, e.g. www.hostname.com/dirname, with "dirname" being the name...
4
by: Jerry | last post by:
I'm having just a bit of trouble wrapping my brain around the task of working with folders that are above the site's root folder. I let users upload photos (.jpg/.gif files) which can...
4
by: Win, Pats | last post by:
I have a snippet of HTML that I inject into a number of pages throughout my Web site at runtime. My problem is that I'm not getting the image to appear in all documents into which this snippet is...
19
by: Steve Franks | last post by:
I am using VS.NET 2005 beta 2. When I run my project locally using the default ASP.NET Development Web Server it runs using a root address like this: http://localhost:11243/testsite/ However...
8
by: news.microsoft.com | last post by:
I have two completely distinct ASP.NET (2.0) web applications. They share no code, they have distinct web.config files, they don't even link to each other. During development, they have lived...
2
by: news.sbcglobal.net | last post by:
I hope I can explain this well enough to understand. I have a master page that is used by almost all of the pages in my site. On the master page is a table. In one of the cells in this table, I...
4
by: =?Utf-8?B?SnVhbiBEZW50?= | last post by:
Hi, I am getting the following in a VC++ EXE (using VS2005) that links several C++ DLLs and uses MFC and ATL, when I try to start it under the debugger: ------- 'Exactus.UX.Studio.v1.exe':...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.