David
Sat Mar 31 09:02:37 CDT 2007
On Mar 29, 10:02 am, "frogost...@gmail.com" <frogost...@gmail.com>
wrote:
> Hey there,
> I am needing some help with a project I'm trying to
> finish up. I have made a directory password protected in IIS Control
> Panel and added the Windows Authentication to it. Every time I browse
> the to the folder, IIS returns the Username/Password Dialogue like
> this:
>
> Enter Username and Password for
> ""(Authentication)
> Username:
> Password:
>
> Now my question is how do I fill in the "" with a custom string. In
> apache you use .htaccess and the Authname variable to fill in the ""
> but I know this is not possible for IIS. This is only 1 folder and not
> the whole site so the "" has to be distinct to that folder. Any help
> will be much appriciated
>
> Thanks
> Steve :)
Hmm... I do not understand why you ask for help to do something that
you "know this is not possible for IIS". ;-)
IIS does not use .htaccess for configuration, but it has just as
customizable and powerful configuration system of its own. And if you
run IIS7, you will see that its configuration system is like .htaccess
and httpd.conf... but I think it is done correctly in IIS -- IIS
actually runs well with its distributed config system enabled by
default, and it is fully extensible, scriptable, and automatable.
But back to your question. You simply need configure to that specific
folder in IIS to use Basic and/or Digest Auth and supply a domain
name, and that value should show up in the "" but only for requests to
that one specific folder (and below, if you wish for the settings to
inherit). Exactly the same functional ability as Apache, just
configured differently.
FYI: IIS does NOT return the username/password dialog. IIS actually
returns a 401 response with a WWW-Authenticate response header, which
the HTTP client interprets and displays the username/password dialog.
This is actually exactly what Apache performs, where the .htaccess
directives tell its extensibility modules to modify the response in
the same way. Same response, different configuration steps, no biggie.
Also, if you used Windows Authentication on Apache, then you will find
that "Authname" cannot do what you want, either. What you are talking
about is dependent on the authentication protocol and not web server.
Finally, if you want to make functional comparisons, you should
compare apples-to-apples. Please do not do something like "try to do X
with your existing knowledge, fail, and then start declaring that it
is hard to do X in IIS that is easy in Apache."
//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//