Re: authentication by Lord
Lord
Sun Apr 11 06:44:35 CDT 2004
I might be wrong, but what you request can't really be done. You most
probably got an FTP username / password to upload the files. If you want
todo what you say, best bet is to create a simple login script, that can use
that username and password, and hardcode this username and password into the
files you want to secure. There are ways of securing a whole folder, but
AFAIK, that would have to be done from the server's side, by your server
Admin, if it's not yourself. I haven't done this myself yet, but I'm sure
others would tell you howto do that.
Here is a very very basic login script, which you can simply include at the
top of all your pages:
<%
iUsername = "this_is_your_username"
iPassword = "this_is_your_password"
fUsername = request..form("username")
fPassword = reuqest.form("password")
if iUsername <> fUsername & iPassword <> fPassword then
response.write("You need Administrative access for this page.<BR>")
server.execute("loginform.html")
response.end()
end if
simply said, if the username / password pair doesn't match, it displays a
form, where the user can enter his username / password, and this then gets
submitted to this script.
hth
--
Kind Regards
Rudi Ahlers
+27 (82) 926 1689
Greater love has no one than this, that he lay down his life for his friends
(John 15:13).
"vasanth kumar" <vasanth.kumar@eds.com> wrote in message
news:OgBZ8S7HEHA.700@TK2MSFTNGP09.phx.gbl...
Hi,
I am running IIS server for hosting webpages. For one of the folders I
want to enable the authentication. How to do this? My webpage is not asking
login/password, when the page is accessed in browser.
I don't want to maintain one more set of username & passwords. Server
has already username & passwords. I just want to use that facility. All I
need is only username in my scripts.
I want this authentication only for few pages/folders.
Any help appreciated.
Can somebody suggest me a good book.
Regards,
Vasanth