Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Upload.LogonUser - password hardcoded

Posted on 2004-08-04
6
Medium Priority
?
581 Views
Last Modified: 2007-12-19
Hi all,

I'm using aspupload
and am using Upload.LogonUser "domain", "usrname", "password".

I'm wondering if there is anyway I could avoid hard-coding the password?

I've tried:

Set dbObj = Server.CreateObject("ADODB.Recordset")
dbObj.ActiveConnection = staff_login
dbObj.Source = "SELECT * FROM tblname WHERE username = '" & Session("username") & "'; "

Set Upload = Server.CreateObject("Persits.Upload")
Upload.LogonUser "domain", dbObj("fieldUsrname"), dbObj("fieldPassword")

but it doesn't work.
it does work if I hardcoded the username and password though....

any idea...?
thanks in advance :D
0
Comment
Question by:wmulyadi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 6

Accepted Solution

by:
casstd earned 672 total points
ID: 11722953
Hi,

       You may try this


Conn =  "Provider=sqloledb;Data Source=(local);Initial Catalog=Database;User ID=userid;Password=password"
Set strConn = Server.CreateObject("ADODB.CONNECTION")
strConn.Open Conn

SQL = "Select * from tblname where username='"&session("Username")&"';"
SET rs = Conn.Execute(SQL)
username = rs("Username")                      
password = rs("password")

Set Upload = Server.CreateObject("Persits.Upload.1")
Upload.LogonUser "domain", username, password

Hope it will work
0
 
LVL 3

Assisted Solution

by:JagC
JagC earned 664 total points
ID: 11724072
Always, always always print your variables if you think they should work.

response.write("Usrname= " & dbObj("fieldUsrname") )
response.write("<BR>password = " & dbObj("fieldPassword") )

this will print the values of the fields on the screen. See if they are what they should be. If they look ok and aspupload doesn't work then you have a problem :)
0
 
LVL 9

Assisted Solution

by:leechoonhwee
leechoonhwee earned 664 total points
ID: 11724385
Hmmm.. I think I think the recordset is not opened tatz why

Set dbObj = Server.CreateObject("ADODB.Recordset")
dbObj.ActiveConnection = staff_login
dbObj.Source = "SELECT * FROM tblname WHERE username = '" & Session("username") & "'; "
dbObj.Open()

Set Upload = Server.CreateObject("Persits.Upload")
Upload.LogonUser "domain", dbObj("fieldUsrname"), dbObj("fieldPassword")

0
 

Author Comment

by:wmulyadi
ID: 11728663
I'm out of the office now, and won't
be back until Tuesday, Aug. 10th.
I'll try your inputs when I get there.

Thanks a lot for the inputs.
0
 
LVL 6

Expert Comment

by:masirof
ID: 12708216
No comment has been added to this question in more than 21 days, so it is now classified as abandoned..
I will leave the following recommendation for this question in the Cleanup topic area:
Split: casstd & JagC & leechoonhwee

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

masirof
EE Cleanup Volunteer
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question