Solved

Sharepoint 2010: xmlhttp PUT in VBA denied with valid credentials

Posted on 2011-02-22
8
1,326 Views
Last Modified: 2012-06-27
In an Access application the following VBA instructions return error 401 (Unauthorized) where UserName and pw represent valid credentials:
...
xmlhttp.Open "PUT", sharepointFileName, False, UserName, pw
xmlhttp.Send sBody
MsgBox xmlhttp.Status
...
Does anybody know what could be causing this?
0
Comment
Question by:dgmoore1
[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
  • 4
  • 3
8 Comments
 
LVL 28

Expert Comment

by:omgang
ID: 34954467
Just taking a stab at this since I don't work with Sharepoint at all...but what happens if you leave off the username and pass?
xmlhttp.Open "PUT", sharepointFileName, False

If you receive a prompt for username and password from the Sharepoint site then it suggests a problem with either the username or password in the variables you are using.  If you still receive the 401 error, however, it suggests a problem witht he URL in the sharepointFileName variable.

OM Gang
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 34954469
At the bottom of this page http://msdn.microsoft.com/en-us/library/ms757849%28VS.85%29.aspx, it says that credentials are not automatically sent to the server....
0
 

Accepted Solution

by:
dgmoore1 earned 0 total points
ID: 34955400
I found the problem - the credentials passed must include the domain. I prepended the domain to the username and everything clicked.
0
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 34955425
Cool, glad you got it.
0
 

Author Comment

by:dgmoore1
ID: 34955895
I've done this before in other Sharepoint environments and it wasn't necessary to supply the domain name, so this one had me stymied.
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 34956214
Well, you know they keep changing things...
0
 

Author Comment

by:dgmoore1
ID: 34956532
...and not telling anybody!
0
 

Author Closing Comment

by:dgmoore1
ID: 34990852
Found the solution myself
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

627 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