473,473 Members | 2,164 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Web config file in another app being accessed in error!!??

Hi

I am noticing some strange behaviour in some asp.net pages that I have
put together and am hoping someone can explain to me what is
happening.

I have two domains hosted at oneandone.co.uk. My main domain points to
the root /. space in my account and contains various htm and aspx
pages that work just fine (well I had problems with Session state but
that's another story!) the web.config file for this 'app' resides in
this root folder and is pretty standard apart from the fact that I
have added :
<customErrors mode="On" defaultRedirect="Login.aspx"/> which again
works fine.

The second domain, which I have just purchased is configured to point
to a sub folder off of the root. It happens to be called ./PlayArea/
and within this folder I have put an index.htm file which contains a
hyperlink to an aspx file. This folder has it's own web.config file
and this has it's customErrors set to :
<customErrors mode="On" defaultRedirect="Error.aspx"/> notice a
different default error page.

When I navigate to the URL of the second domain and click on the link
an error ocurrs somewhere and I am presented with :

Server Error in '/' Application.

The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its
dependencies) could have been removed, had its name changed, or is
temporarily unavailable. Please review the following URL and make sure
that it is spelled correctly.

Requested Url: /Login.aspx

I cannot see why the default redirect is kicking in anyway, but it
should surely attempt to redirect to Error.aspx and not Login.aspx as
this is the destination contained in the other web.config file.

Am I missing something obvious or does this seem bizarre to you.

Any help would be most appreciated.

Martin
Nov 17 '05 #1
2 3819
Hi Martin,

My guess is your root is set to be an IIS application, but the subfolder
(./PlayArea/) is not. So, when the server accesses /PlayArea, it uses the
Web.config file in what it sees as the root of the application, which is
your root folder.
--
Ray Dixon - Microsoft MVP
ra*@NOSPAM.greeble.com
(remove NOSPAM. from my e-mail address for a direct reply)
"Martin" <ma*************@btinternet.com> wrote in message
news:5d**************************@posting.google.c om...
Hi

I am noticing some strange behaviour in some asp.net pages that I have
put together and am hoping someone can explain to me what is
happening.

I have two domains hosted at oneandone.co.uk. My main domain points to
the root /. space in my account and contains various htm and aspx
pages that work just fine (well I had problems with Session state but
that's another story!) the web.config file for this 'app' resides in
this root folder and is pretty standard apart from the fact that I
have added :
<customErrors mode="On" defaultRedirect="Login.aspx"/> which again
works fine.

The second domain, which I have just purchased is configured to point
to a sub folder off of the root. It happens to be called ./PlayArea/
and within this folder I have put an index.htm file which contains a
hyperlink to an aspx file. This folder has it's own web.config file
and this has it's customErrors set to :
<customErrors mode="On" defaultRedirect="Error.aspx"/> notice a
different default error page.

When I navigate to the URL of the second domain and click on the link
an error ocurrs somewhere and I am presented with :

Server Error in '/' Application.

The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its
dependencies) could have been removed, had its name changed, or is
temporarily unavailable. Please review the following URL and make sure
that it is spelled correctly.

Requested Url: /Login.aspx

I cannot see why the default redirect is kicking in anyway, but it
should surely attempt to redirect to Error.aspx and not Login.aspx as
this is the destination contained in the other web.config file.

Am I missing something obvious or does this seem bizarre to you.

Any help would be most appreciated.

Martin

Nov 17 '05 #2
Ray

Thanks for your reply.

Is there something specific that i have to do to make the app in the
sub folder be recognised as a seperate app in its own right.

This is not running on my own server but with a hosting company. I
figure i may need to speak to their customer support.

Martin

"Ray Dixon [MVP]" <ra*@NOSPAM.greeble.com> wrote in message news:<OC*************@TK2MSFTNGP11.phx.gbl>...
Hi Martin,

My guess is your root is set to be an IIS application, but the subfolder
(./PlayArea/) is not. So, when the server accesses /PlayArea, it uses the
Web.config file in what it sees as the root of the application, which is
your root folder.
--
Ray Dixon - Microsoft MVP
ra*@NOSPAM.greeble.com
(remove NOSPAM. from my e-mail address for a direct reply)

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Amy L. | last post by:
I have a basic console application that uses a app.exe.config file for all the application settings. The application through several revisions now has over 100 options that are set in the...
3
by: colintanner | last post by:
I've a test web site set up as a virtual directory under default web sites in IIS. However when I browse to the main .aspx page I get an error because it is referencing a web.config that belongs to...
0
by: sonu | last post by:
hi, Currently i am using a app.config file to store the constants used in the business layer, the problem here is the business layer is being hosted on win2K machine where we cannot have a...
3
by: Blasting Cap | last post by:
I am working on a web app that I want to be able to use a separate config file on, in addition to the web.config file that's already working in the application. If I put the following in the...
5
by: mmcd79 | last post by:
I built a VB.net application that makes use of a machine level DB connection string setting, and a user level starting location setting. The machine level setting and the default user based...
9
by: tshad | last post by:
I am trying to get access to a file that may still being written because the file is so large (7-10MB). I get an error: The process cannot access the file 'c:\TestDocs\XMLFiles\492172.XML'...
3
by: =?Utf-8?B?RGFuYQ==?= | last post by:
I am re-posting this message after registering my posting alias. When I specify an end tag for the clear element of namespaces in my web.config file, the parser error "Unrecognized element 'add'"...
0
by: sonalivaidya1 | last post by:
hi I am using vs2005 for asp.net website development. I published my website. I transferred all files on the server using ftp. After transferring I tried to browse my website but I am getting...
14
by: E481610 | last post by:
how to write values into app config files using c# code in windows forms applications
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.