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.
MartinHi 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
ray@.NOSPAM.greeble.com
(remove NOSPAM. from my e-mail address for a direct reply)
"Martin" <martin.stickley@.btinternet.com> wrote in message
news:5d4272e3.0307201050.4a6172f3@.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
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]" <ray@.NOSPAM.greeble.com> wrote in message news:<OCSPpc7TDHA.940@.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
> ray@.NOSPAM.greeble.com
> (remove NOSPAM. from my e-mail address for a direct reply)
Saturday, March 31, 2012
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment