Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3662232
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T01:23:37+00:00 2026-05-19T01:23:37+00:00

a similar question was asked in question 494120 , but IMHO was not really

  • 0

a similar question was asked in question 494120, but IMHO was not really answered…

I want to upload files to a sharepoint using perl/WebDAV (from a Win32 host). To achive this, I need to authenticate with KERBEROS on the server. After googling for hours and trying different approaches, I’m not able to open a connection. Current code is this:

my $agent = HTTP::DAV::UserAgent->new(keep_alive=>1);  
$agent->agent('Agent');  
$agent->timeout(1000);  
my $d = HTTP::DAV->new(-useragent => $agent);  
$d->credentials( -user=>$user,-pass =>$pass, -url =>$url);  
$d->open( -url=>$url ) or die("Couldn't open $url: " .$d->message . "\n");  

When doing the $d->open(…), I always get “Couldn’t open $url: Unauthorized. Negotiate”. So, obviously the basic authentication doesn’t work.

Could anyone point me to the right path, please? I am not fixed to using WebDAV, any other mechanism would fit me as well. Just want to get it working…


Edit 1
When using LWP along with Authen::NTLM (as suggested by Madhur) also doesn’t work. It results in a 500 internal server error on IIS as well as on Apache. Since the same error occurs on two different web servers (with two different NTLM implementations) I guess that there’s gotta be a problem in the Authen::NTLM module.

Looking at the implementation of Authen::NTLM it seems to me that the code is kinda reverse engineered and neither implemented based on a specification nor is it really configurable. What turns up the question why the specification wasn’t used to implement the module…

Is using NTLM along with Perl such an exotic use case?


Edit 2
Based on Madhur’s suggestion, I tried accessing the Sharepoint with Curl. This works. But sniffing the NTLM messages of Curl and those sent by Perl shows me, that the message format is somehow different.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T01:23:38+00:00Added an answer on May 19, 2026 at 1:23 am

    Instead of using WebDAV. I would suggest you use out of the box web services.

    This gives overview on how to use sharepoint web services in PERL:

    http://www.squish.net/log/2008/10/11/perl-sharepoint/

    http://shareperl.blogspot.com/

    And this is the .NET code to upload the file using web service:
    http://www.oriolardevol.com/Article/Details/3

    Converting it to PERL code is left to you as its been years since I used PERL 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Somebody asked similar question not long ago. But nobody answered comprehensively. Assume I have:
I know a similar question has been asked but I have not found a
I realize a 'similar' question was asked but the other user is using a
There was a similar question asked here three years ago, but I want to
A somewhat similar question was asked on here but the answers did not help.
I saw a similar question asked and answered for ASP.net here How do I
A similar question was asked here: PHP variable like $myvar-test is not valid? And
A similar question was asked here but without a satisfying answer. I'm trying to
A similar question was asked about a year ago, and wasn't quite resolved, but
I am not sure if a similar question has been asked before, searched for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.