Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Authentication Required needed locally - but not on the 'net 1

Status
Not open for further replies.

Einstein47

Programmer
Nov 29, 2001
737
0
0
US
I have searched everywhere and can't find anything on this. I'm hoping that someone here might be able to help.

I have an ASP site hosted on Brinkster, and it works fine. However, I just got a PC with WinXP and IIS so I have been trying to do local development. My site uses an Access DB (I know what you are going to say, but I have very few users), and it works well. The trouble happens when I try to run locally.

First there is the security issue. Each time I copy the MDB file from the server to my PC, I have to change the security permissions. Isn't there some way so that the directory can own the permissions and the files in that directory will just inherit the proper security? Does that make sense? Is that even possible?

Secondly, every time I go to a page locally that needs to read from the DB, I get a dialog saying "Authorization Required" and gives a place for username and password. Absolutely nothing I enter will get me past this dialog - except Canceling (hitting ESC). It is like my DB thinks it SHOULD have a password, but since it doesn't it gets confused. I just want the dialog to go away. If I have to enter a user/pass on the db and then set that in my connection string - I will do that. I just want to understand what is happening.

Here is my version info:
IIS 5.1
Access 2000

Here is my connection string info:
Code:
<%
Response.Expires = -1000
  Dim con,strCon
  Set con = Server.CreateObject("ADODB.Connection")
  con.ConnectionString="DRIVER={Microsoft Access Driver (*.mdb)}; " & _
  " DBQ=" & Server.MapPath("\site_name\db\db_name.mdb")
%>

Any takers? I'm sorry if I confused the issue. I feel I am just looking for some basic knowledge here. I just need to know how to ask it.

Einstein47
(For best results: hand wash in cold, tumble dry low. For not so good results: drag through puddles, pound on rocks, air dry on tree branch.)
 
it will be your security settings on IIS. check your Authentication methods are correct.
 
mbiro - yes to question #1, and I use the /localhost/site_name to get to my pages locally.

nicklieb - I think that is why I'm having problems, but I have no clue as to what the "correct" authentication methods need to be. Where can I find out what they should be?

Einstein47
For best results: hand wash in cold, tumble dry low.
For not so good results: drag through puddles, pound on rocks, air dry on tree branch.
[&#91;]Starbase47.com]
 
Ok nicklieb, I think I got it. I had to enable "Anonymous Access" and disable "Integrated Windows Authentication". I am still thinking that when I backup my remote DB locally, I will be overriding the security and will have to do all this again.

But at least it works now - Thanks again.

Einstein47
For best results: hand wash in cold, tumble dry low.
For not so good results: drag through puddles, pound on rocks, air dry on tree branch.
[&#91;]Starbase47.com]
 
When you CREATE/COPY a file into a folder the file inherits the permissions of the folder. If you MOVE a file into a folder it will retain the settings it had before the move.

You could put your db into a subfolder of your webroot and set the permissions on the folder to the permissions needed for the file and update your ASP connection file(s) accordingly. Then the next time you get a new version of the db from ftp it should inherit the permissions of the local folder.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top