Microsoft IIS
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsSystem AdministrationMicrosoft IIS

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old June 3rd, 2004, 08:16 AM
emmah emmah is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 5 emmah User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
A question

If i wanted to protect the part of my web content (working with IIS) and i'd like to avoid stuff like system users or to set NTFS access for the folder i want to protect, what do i need to do?

Reply With Quote
  #2  
Old June 3rd, 2004, 10:53 PM
Doug G Doug G is offline
Grumpier Old Moderator
ASP Free God 11th Plane (10000 - 10499 posts)
 
Join Date: Sep 2003
Posts: 10,143 Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Weeks 4 Days 23 h 29 m 58 sec
Reputation Power: 181
You can try some authentication package like authentix, I guess, or write some asp authentication code yourself. But to protect images, doc files and other non-asp files from direct access you'll need to prevent anonymous browsers from accessing these files, and the only way I know is to use windows authentication.
__________________
======
Doug G
======
I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain

Reply With Quote
  #3  
Old June 7th, 2004, 10:04 AM
kbogart's Avatar
kbogart kbogart is offline
Contributing User
ASP Free Novice (500 - 999 posts)
 
Join Date: May 2004
Location: Cincinnati, OH
Posts: 550 kbogart User rank is Private First Class (20 - 50 Reputation Level)kbogart User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 27 m 30 sec
Reputation Power: 5
You could write a page that retrieves the desired content, and checks to see if they are authenticated first.

For example: Put your content in a secured folder.

Make your links in the form GET_CONTENT.ASP?doc=whatever.html

The GET_CONTENT.ASP checks the querystring for the desired document, verifies the person is "authorized" by using whatever means you choose, then uses the File Scripting object to read the file from the secured folder and deliver it to the browser.

Reply With Quote
  #4  
Old June 9th, 2004, 08:56 AM
emmah emmah is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 5 emmah User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
all right but...

But Doug, with windows authentication i have to open user accounts on my windows, which means i'm gonna have to let users enter my server, which i don't really like...

And kbogart, programming a script like that would i guess take me some time, which i don't really have, and if i did do the script i would have to update it from time to time... i really need something to get me the job done...

Gonna have to check out a bit more...gotta try harder thanks guys anyway


Reply With Quote
  #5  
Old June 9th, 2004, 09:30 AM
kbogart's Avatar
kbogart kbogart is offline
Contributing User
ASP Free Novice (500 - 999 posts)
 
Join Date: May 2004
Location: Cincinnati, OH
Posts: 550 kbogart User rank is Private First Class (20 - 50 Reputation Level)kbogart User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 27 m 30 sec
Reputation Power: 5
Actually, creating a GET_CONTENT.ASP file is quite simple.

Try something like this...

<%
'Authenticate your user and set a session variable of UserLoginOK to True

contentpath = "d:\inetpub\uclroot\misc testing\"
fileContent = rfile(contentpath & request.querystring("doc"))

if not session("userloginOK") then
select case right(request.querystring("doc"),3)
case "htm", "html", "txt"
Response.write fileContent
end select
else
response.write "Not authorized..."
end if
response.end

'The rfile() function reads a file and returns a string variable with the contents of the file
Public Function rfile( filename )
Set Sys = Server.CreateObject( "Scripting.FileSystemObject" )
If Sys.FileExists( filename ) Then
Set Txt = Sys.OpenTextFile( filename, 1 )
msg = Txt.ReadAll
Txt.Close
Else
msg = "FAIL: File does not exist."
End If
Set Sys = Nothing
rfile = msg
End Function
%>

If your content is straight HTML, this should work fine. If you have binary content like PDF and image files, you would need to adapt it to write headers for PDFs, images, etc with additional case entries.

Reply With Quote
  #6  
Old June 10th, 2004, 08:02 AM
emmah emmah is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 5 emmah User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
something smart enough

Well actually the problem is that i may actually have more then only HTML on my server... :I may happen that i have dunno how many types of files on it... The protection that you suggested is od header level... i want not only file, but directory protection also with iusernames and passwords... think that i'm gonna sniff arround a bit more, maybe see one of those packages... and let you know if i found something smart enough...


Reply With Quote
  #7  
Old June 14th, 2004, 06:05 AM
emmah emmah is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 5 emmah User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
not bad...

I've been sniffing arround a bit... And i foud a package.. dunno if you've met it before... it's called IISPassword.. and it is made EXACTLY for what i needed to do... I got everything on a plate, without win authentication or scripting.. not bad... not bad at all....

If you ever needed a thing that i was in need for, check out this one
http://www.troxo.com/products/iispassword/


Reply With Quote
Reply

Viewing: ASP Free ForumsSystem AdministrationMicrosoft IIS > A question


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT