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

M

Martin

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
 
R

Ray Dixon [MVP]

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.
 
M

Martin

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
 

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

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top