Re: Custom 401 page problems
From: Mark (mark-at-redfox-co-uk)
Date: 09/25/04
- Next message: Jeff Cochran: "Re: Form submittal fails due to lack of permissions - How to fix?"
- Previous message: Jeff Cochran: "Re: localhost?"
- In reply to: David Wang [Msft]: "Re: Custom 401 page problems"
- Next in thread: Tom Pepper Willett: "Re: Custom 401 page problems"
- Reply: Tom Pepper Willett: "Re: Custom 401 page problems"
- Reply: David Wang [Msft]: "Re: Custom 401 page problems"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 25 Sep 2004 16:56:19 +0100
Thanks for your reply, perhaps I should clarify the steps I took.
To try and keep things at their most basic I placed a small gif
C:\WINDOWS\Help\iisHelp\common folder and edited the 401-3.htm file to
display that gif. I choose 401-3 because that is that page that displays if
I press cancel when the authentication dialogue window is cancelled.
The gif is not linked back to a path in the virtual server generating the
401 error, it is in the same folder as the 401-3 file itself and I did this
to avoid exactly the situation you describe. My thought process was that,
whatever happens, the user must have the necessary credentials or the 401-3
page itself would not display. What I get is the 401 page with an empty
placeholder of the graphic, not a 404 page.
I understand that the sucurity context of the locally logged on user is not
the same as anonymous internet access, my point about the gif displaying to
the locally logged on user served only to illustrate that the problem was
not an html coding error.
I dont think the issue is one of security context (just to be sure I have
just tried again granting rwx for IWAM, IUSR and everyone to
C:\WINDOWS\Help\iisHelp\common, which did not help). I wonder if the
problem is more likely to be one of what map path is in use when IIS sends
back a 401 page (the html does not reference a path the tag is <img
src="401.gif">)
Mark
"David Wang [Msft]" <someone@online.microsoft.com> wrote in message
news:eGz6ZSroEHA.2764@TK2MSFTNGP11.phx.gbl...
> > I realise it has to be a static page, but is there a limitation as
> > to including images or css formatting in the page? It seems to
> > fail to locate any graphic files, and text formatting must be
> > done within the page itself, which seems very basic.
>
> No, custom errors do not have the limitations that you are imagining. I
> think you are just misconfiguring the server and mis-authoring the
401.htm.
>
> You need to realize that 401.x indicates authentication failure of some
> sort, so IIS has no user context with which to execute a request.
>
> So, the 401.htm is a static file that IIS sends back to the browser, but
you
> modified it such that it now contains URL links to images/CSS BACK to the
> web server that the browser just failed authentication. The key question
> now is:
> Did you make *those* URL links of images/CSS accessible to an
> unauthenticated user so that the remote browser can retrieve them?
>
> If you did not, then an unauthenticated user first will get the 401.htm
for
> accessing something that requires authentication, and then also get 404
file
> not found or 401 access denied for each retrieval of the graphics/CSS
files
> referenced by the 401.htm -- thus have missing images/CSS.
>
>
> > If I drop a simple gif file in the iishelp\common folder and
> > edit the 401.htm to include the image, it is missing when
> > viewed over http (but works fine if the file is opened locally).
>
> I don't know if you realize this, but your comparison is actually
> inconclusive and wrong.
>
> Viewing the page over HTTP is not comparable to viewing it as a local
file.
> In the former case, there is a client/server interaction happening, and an
> impersonated identity by the server is actually accessing the
pages/graphics
> as governed through any client/server authentication protocols. In the
> latter, there is no client/server interaction and it is simply your logon
> identity opening files on the local filesystem. Clearly, privileges and
> user identity are different between the two cases, so your comparison is
> apples to oranges.
>
> --
> //David
> IIS
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> //
> "Mark" <mark-at-redfox-co-uk> wrote in message
> news:e0mYVgpoEHA.896@TK2MSFTNGP12.phx.gbl...
> Hi,
>
> As per an earlier post, I too, am trying to create custom error pages, but
> finding the 401 page is giving me problems.
>
> I realise it has to be a static page, but is there a limitation as to
> including images or css formatting in the page? It seems to fail to
locate
> any graphic files, and text formatting must be done within the page
itself,
> which seems very basic.
>
> If I drop a simple gif file in the iishelp\common folder and edit the
> 401.htm to include the image, it is missing when viewed over http (but
works
> fine if the file is opened locally).
>
> Is this right?
>
> Mark
>
>
>
>
>
- Next message: Jeff Cochran: "Re: Form submittal fails due to lack of permissions - How to fix?"
- Previous message: Jeff Cochran: "Re: localhost?"
- In reply to: David Wang [Msft]: "Re: Custom 401 page problems"
- Next in thread: Tom Pepper Willett: "Re: Custom 401 page problems"
- Reply: Tom Pepper Willett: "Re: Custom 401 page problems"
- Reply: David Wang [Msft]: "Re: Custom 401 page problems"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|