473,507 Members | 2,776 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can a web user can be logged on as an account other than IUSR_?

Hello,

We are developing a web application written in classic ASP, which will
end up running on Windows 2000 server.

The site has a public side (the login page and related images), and a
private side (a series of ASP scripts which check session variables to
make sure the current user has logged in before delivering their
content).

As part of the private side of the site, there are a number of images
and other documents (PDFs, Powerpoint presentations, CSS files etc.).
Although securing these is not vital, it would be nice if people who
hadn't logged in couldn't access them.

Although we can restrict non-authenticated users from accessing the ASP
scripts (with an If ... End If wrapper around the content), I can't see
an easy way of preventing access to non-ASP files.

Is there any way of using ASP so that a user (for the duration of their
session) uses an account other than IUSR_MachineName? If we could do
this, then the web folders containing the semi-private content could be
set up so that IUSR_Machinename doesn't have access.

Alternatively, does anyone have any suggestions on how to restrict
access to certain parts of a website using IIS/ASP.

Thanks,

Steve.

Jul 22 '05 #1
5 1469
just disable anonymous access (in iis management console) for the folder
containing the private files.

that should do the job: anyonmous surfers will be presented with a login
box, while already authenticated ones can browse the files. of course this
only works when using windows authentication.

an interesting (and free) component in this case might be IISPassword
(http://www.troxo.com/products/iispassword/), which enables you to use a
unix-like .htaccess security system.

- thomas

<st****@bmtech.co.uk> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
Hello,

We are developing a web application written in classic ASP, which will
end up running on Windows 2000 server.

The site has a public side (the login page and related images), and a
private side (a series of ASP scripts which check session variables to
make sure the current user has logged in before delivering their
content).

As part of the private side of the site, there are a number of images
and other documents (PDFs, Powerpoint presentations, CSS files etc.).
Although securing these is not vital, it would be nice if people who
hadn't logged in couldn't access them.

Although we can restrict non-authenticated users from accessing the ASP
scripts (with an If ... End If wrapper around the content), I can't see
an easy way of preventing access to non-ASP files.

Is there any way of using ASP so that a user (for the duration of their
session) uses an account other than IUSR_MachineName? If we could do
this, then the web folders containing the semi-private content could be
set up so that IUSR_Machinename doesn't have access.

Alternatively, does anyone have any suggestions on how to restrict
access to certain parts of a website using IIS/ASP.

Thanks,

Steve.

Jul 22 '05 #2
Hello,

Thanks for your reply.

We are not using Windows authentication (this will be a website with
some 800 or so users), so we are using a method where by the user logs
in using a form with their username and password (not a windows user
account password), which is then checked in a database and a session
cookie created.

What I really want is a piece of code that will automatically (and
without intervention) login a website visitor in to the server under a
second account (eg. authenticated_webuser) once they have successfully
been validated by my code.

We had thought of simply redirecting logged in users to
http://user:pa**@mysite.com/myscript.asp once they had successfully
logged in, where user and pass are a standard username and password for
all visitors who have logged in. However, http://user:pass no longer
seems to be supported (and was it ever supported in browsers other than
IE?). Never the less, it's a good illustration of what I'm trying to
achieve.

Thanks for the IISPassword tip. I looked at it, but I really need
something that can integrate security with session cookies.

Steve.

Jul 22 '05 #3
<st****@bmtech.co.uk> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
Hello,

We are developing a web application written in classic ASP, which will
end up running on Windows 2000 server.

The site has a public side (the login page and related images), and a
private side (a series of ASP scripts which check session variables to
make sure the current user has logged in before delivering their
content).

As part of the private side of the site, there are a number of images
and other documents (PDFs, Powerpoint presentations, CSS files etc.).
Although securing these is not vital, it would be nice if people who
hadn't logged in couldn't access them.

Although we can restrict non-authenticated users from accessing the ASP
scripts (with an If ... End If wrapper around the content), I can't see
an easy way of preventing access to non-ASP files.


Place the non ASP files outside of the web root path and use an ASP with
ADODB.Stream and Response.BinaryWrite to send them to the users after you
have verified their username and password. Use this example but send the
appropriate mime-type:
http://www.aspfaq.com/show.asp?id=2161

--
Tom Kaminski IIS MVP
http://www.microsoft.com/windowsserv...y/centers/iis/
http://mvp.support.microsoft.com/
http://www.iistoolshed.com/ - tools, scripts, and utilities for running IIS
Jul 22 '05 #4
It can be done with an ISAPI filter:
http://www.flicks.com/prod.htm#authnx

"Steve" <st****@bmtech.co.uk> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Hello,

Thanks for your reply.

We are not using Windows authentication (this will be a website with
some 800 or so users), so we are using a method where by the user logs
in using a form with their username and password (not a windows user
account password), which is then checked in a database and a session
cookie created.

What I really want is a piece of code that will automatically (and
without intervention) login a website visitor in to the server under a
second account (eg. authenticated_webuser) once they have successfully
been validated by my code.

We had thought of simply redirecting logged in users to
http://user:pa**@mysite.com/myscript.asp once they had successfully
logged in, where user and pass are a standard username and password for
all visitors who have logged in. However, http://user:pass no longer
seems to be supported (and was it ever supported in browsers other than
IE?). Never the less, it's a good illustration of what I'm trying to
achieve.

Thanks for the IISPassword tip. I looked at it, but I really need
something that can integrate security with session cookies.

Steve.
Jul 22 '05 #5
Thanks for your replies everyone.

I found another method which seems to work well too...

http://www.isapirewrite.com/

This is an ISAPI filter (the lite version of which is freeware) which
lets you rewrite URLs before they are passed to IIS.

So you can get it to dynamically change requests for:

mysite.com/private/images/foo.jpg

to

mysite.com/deliverfile.asp?file=images/foo.jpg

(for example)

I did a quick test, and it seems to work well. The config file allows
the use of regular expressions, so its pretty powerful. Posting here
in case it's of use to others.

Steve.

Jul 22 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
7632
by: Joshua Beall | last post by:
Hi All, What is the best way to use a cookie to remember a logged in user? Would you store the username and password in two separate cookies? Should the password be plain text? Hashed? Not...
1
1275
by: rl30 | last post by:
ASP.NET vs SQL Server¸ I have an ASP.NET Application In IIS I checked the Integrated Windows Authentication option In Web.Config the connection string include Integrated Security = SSPI and...
5
2062
by: Michelle Stone | last post by:
Hi everybody I am writing a simple asp.net application using form authentication. I store the list of all users and their passwords in an SQL Server database table. My client recently told me...
4
2320
by: - Steve - | last post by:
I'm trying to change a user's password using objUser.Invoke("setPassword", "newpassword") It works fine as a console application if I'm logged in with someone with the correct permissions. If...
3
3073
by: martin | last post by:
Hi, I have a website that runs under Annotmous access. I am trying to find out the account that the page is running under the line Response.Write("<hr>" & Page.User.Identity.Name & "<hr>") ...
11
4832
by: Derek Martin | last post by:
Using VB.Net, I would like to retrieve the currently logged in user's DN from Active Directory. Alternatively, if, using WindowsIdentity, or something similar, I would like to get the user's full...
3
5006
by: pealy2 | last post by:
Sorry if this is in the wrong group, I've searched long & hard without finding anything even slightly useful. (recommendations for a more relevant group gratefuly received) I need to change the...
18
23755
by: Arthur | last post by:
Hi All, I would like to get the name of the user given their networkID, is this something Active Directory would be useful for?(For intranet users) If so, can you please point me to some sample...
2
1939
by: youknowwho | last post by:
Hi, I have two administrator accounts in my machine and the guest account is disaled. I logged in with one admin account and disable the other anmin account. So now i have only one admin account...
0
7313
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7481
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5619
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5039
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3190
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
758
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
411
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.